@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.
- package/README.md +14 -6
- package/README.zh.md +16 -6
- package/bin/ai-monitor.js +2 -0
- package/bin/runtime-capabilities.json +1 -1
- package/dist/ai-monitor-NUKSJPLE.js +33 -0
- package/dist/ai-monitor.js +136 -0
- package/dist/{auth-A5OO4VS4.js → auth-MVAEBGBP.js} +24 -15
- package/dist/{automation-FD2QZUP6.js → automation-6L6IAYRK.js} +6 -7
- package/dist/{capability-SKI4GHF4.js → capability-74N7AN5X.js} +35 -38
- package/dist/{chunk-OAWPT7VP.js → chunk-2I5SZ5DS.js} +2 -2
- package/dist/{chunk-QWSA3EOD.js → chunk-7WBCSJL6.js} +23 -9
- package/dist/{chunk-4PSTYEG5.js → chunk-AMURHMS3.js} +11 -7
- package/dist/{chunk-KPQY44JQ.js → chunk-AWW2T2WL.js} +3 -0
- package/dist/chunk-BQFLABJQ.js +186 -0
- package/dist/{chunk-E25OSZLJ.js → chunk-COOMXFUG.js} +3 -3
- package/dist/chunk-EFGUBGA6.js +64 -0
- package/dist/{chunk-HQCY3QCA.js → chunk-H35VDOAE.js} +18 -13
- package/dist/{chunk-VDICGXCY.js → chunk-HIMOBNEY.js} +2 -2
- package/dist/{chunk-JEUXDY3B.js → chunk-HQED4YB4.js} +1 -1
- package/dist/chunk-HRFYYEXR.js +1285 -0
- package/dist/{chunk-UYJMEHAF.js → chunk-JZY6WWAP.js} +22 -21
- package/dist/{chunk-2F64AZYH.js → chunk-KA5WKR5P.js} +2 -2
- package/dist/{chunk-YVG6QD3V.js → chunk-LFJ7N36I.js} +103 -8
- package/dist/{chunk-EEARZNHE.js → chunk-LPKIMGIU.js} +89 -37
- package/dist/chunk-NNK3JBH4.js +60 -0
- package/dist/{chunk-WMDO53YK.js → chunk-OTZ4JQDU.js} +2 -2
- package/dist/{chunk-SOSFRU3O.js → chunk-PLNS5J33.js} +58 -26
- package/dist/chunk-PUSFEC6B.js +29 -0
- package/dist/{chunk-Z3Q2AEIN.js → chunk-R2SVAO4G.js} +14 -2
- package/dist/{chunk-K2Z7QHDR.js → chunk-RB26WNLM.js} +52 -15
- package/dist/chunk-SVNED423.js +556 -0
- package/dist/{chunk-AWVZTN2B.js → chunk-THTROEGD.js} +1 -1
- package/dist/{chunk-QVRIDN42.js → chunk-UCMO4LKL.js} +2 -2
- package/dist/{chunk-JSBLCLFE.js → chunk-VLOGOM7N.js} +13 -7
- package/dist/{chunk-GBSACKFB.js → chunk-XPARQSYS.js} +528 -299
- package/dist/{chunk-72NJKS7O.js → chunk-XZDKAR4N.js} +4 -4
- package/dist/{community-report-client-TJVCLZ3K.js → community-report-client-ULRNXLQV.js} +1 -1
- package/dist/{compat-check-WFEKVLTH.js → compat-check-W4XC27RG.js} +5 -4
- package/dist/{config-U4I7X25P.js → config-264GB6C7.js} +28 -14
- package/dist/{context-CDB5H5PD.js → context-SOQDFZIB.js} +8 -6
- package/dist/{data-integration-QE37EQ3A.js → data-integration-UNJ7EPW2.js} +6 -6
- package/dist/{evaluation-LR4YDYWL.js → evaluation-Q3AIGFOG.js} +14 -159
- package/dist/index.js +98 -589
- package/dist/{local-data-upload-client-KCMG6J62.js → local-data-upload-client-YTWMAAGE.js} +1 -1
- package/dist/{memory-SNFR5M23.js → memory-ZLTTULZK.js} +9 -10
- package/dist/{metadata-6QM6EED5.js → metadata-EN2IWCDI.js} +11 -10
- package/dist/{model-KEVCEXWD.js → model-NAKQWK4W.js} +4 -5
- package/dist/{personal-semantic-preference-7VXQPP2N.js → personal-semantic-preference-UGN67KTN.js} +46 -15
- package/dist/{project-semantic-PSEPYH2L.js → project-semantic-5OP3YPZD.js} +19 -16
- package/dist/{sync-22ACDK5Z.js → sync-LDJQZRQH.js} +9 -9
- package/dist/{te-agent-BJ36B4QI.js → te-agent-WNNAD4AJ.js} +303 -17
- package/dist/{te-analysis-WQ6D6YG4.js → te-analysis-KIMH6AGU.js} +399 -205
- package/dist/{te-community-VRWMFGI6.js → te-community-P7NNBVCS.js} +17 -15
- package/dist/{te-dataops-YTLFTTW7.js → te-dataops-ZRKSG4R7.js} +13 -11
- package/dist/{te-engage-V2QW7TIC.js → te-engage-PVBVNRSU.js} +13 -12
- package/dist/{te-kb-4AQLISDR.js → te-kb-W7PRC7QN.js} +80 -20
- package/dist/{te-system-CYWSK3UN.js → te-system-F4ZU2HRQ.js} +6 -7
- package/dist/{te-team-6ELNGBWT.js → te-team-5ONMRGKF.js} +9 -8
- package/dist/{things-HFWLGCUH.js → things-PFENSIF4.js} +9 -8
- package/dist/{update-3CRVVHV5.js → update-EUZ4GNND.js} +8 -6
- package/dist/{workspace-2CKQX2XL.js → workspace-Z7L33OBQ.js} +6 -7
- package/package.json +12 -7
- package/skills/ae-agent/SKILL.md +19 -5
- package/skills/ae-agent/references/a2a.md +103 -0
- package/skills/ae-agent/references/command_index.md +11 -0
- package/skills/ae-ai-monitor/SKILL.md +179 -0
- package/skills/ae-ai-monitor/references/read-commands.md +866 -0
- package/skills/ae-analysis/SKILL.md +43 -25
- package/skills/ae-analysis/references/adhoc_export.md +3 -1
- package/skills/ae-analysis/references/ai_models.md +1 -0
- package/skills/ae-analysis/references/analysis_data_retrieval.md +1 -1
- package/skills/ae-analysis/references/analysis_gateway_assets.md +2 -0
- package/skills/ae-analysis/references/asset_authentication_export.md +1 -1
- package/skills/ae-analysis/references/asset_authentication_update.md +6 -2
- package/skills/ae-analysis/references/asset_search.md +1 -1
- package/skills/ae-analysis/references/bad_case_begin.md +12 -0
- package/skills/ae-analysis/references/bad_case_get.md +12 -0
- package/skills/ae-analysis/references/bad_case_history.md +12 -0
- package/skills/ae-analysis/references/bad_case_list.md +12 -0
- package/skills/ae-analysis/references/bad_case_review.md +51 -0
- package/skills/ae-analysis/references/bad_case_run.md +12 -0
- package/skills/ae-analysis/references/bad_case_submit.md +12 -0
- package/skills/ae-analysis/references/bad_case_submit_to_page.md +12 -0
- package/skills/ae-analysis/references/bad_case_sync_evaluation.md +11 -0
- package/skills/ae-analysis/references/bi_panel_list.md +1 -1
- package/skills/ae-analysis/references/bi_panel_share.md +3 -1
- package/skills/ae-analysis/references/catalog_list.md +2 -0
- package/skills/ae-analysis/references/command_index.md +44 -35
- package/skills/ae-analysis/references/dashboard_daily_report_update.md +2 -0
- package/skills/ae-analysis/references/dashboard_handover.md +3 -1
- package/skills/ae-analysis/references/dashboard_list.md +3 -3
- package/skills/ae-analysis/references/dashboard_report_data_export.md +1 -1
- package/skills/ae-analysis/references/dashboard_share.md +3 -1
- package/skills/ae-analysis/references/dashboard_update.md +3 -2
- package/skills/ae-analysis/references/filter_value_list.md +2 -0
- package/skills/ae-analysis/references/folder_share.md +8 -2
- package/skills/ae-analysis/references/governance_recommendation_export.md +2 -2
- package/skills/ae-analysis/references/governance_recommendation_run_update.md +3 -1
- package/skills/ae-analysis/references/personal_semantic_preference_add.md +9 -1
- package/skills/ae-analysis/references/personal_semantic_preference_delete.md +2 -0
- package/skills/ae-analysis/references/personal_semantic_preference_get.md +2 -0
- package/skills/ae-analysis/references/personal_semantic_preference_list.md +10 -2
- package/skills/ae-analysis/references/personal_semantic_preference_update.md +8 -0
- package/skills/ae-analysis/references/project_data_power_upsert.md +3 -1
- package/skills/ae-analysis/references/project_mark_time_create.md +2 -0
- package/skills/ae-analysis/references/project_mark_time_update.md +2 -0
- package/skills/ae-analysis/references/project_member_add.md +3 -1
- package/skills/ae-analysis/references/project_member_batch_update.md +3 -1
- package/skills/ae-analysis/references/project_member_handover_run.md +3 -1
- package/skills/ae-analysis/references/project_member_update.md +3 -1
- package/skills/ae-analysis/references/project_owner_update.md +8 -2
- package/skills/ae-analysis/references/project_role_upsert.md +5 -3
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +16 -1
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki_plan_schema.md +14 -1
- package/skills/ae-analysis/references/project_space_share.md +8 -2
- package/skills/ae-analysis/references/property_get.md +2 -0
- package/skills/ae-analysis/references/public_link_list.md +3 -1
- package/skills/ae-analysis/references/query_cancel.md +4 -1
- package/skills/ae-analysis/references/report_data_run.md +1 -1
- package/skills/ae-analysis/references/report_list.md +3 -3
- package/skills/ae-analysis/references/scenario_append.md +2 -2
- package/skills/ae-analysis/references/scenario_collect.md +15 -4
- package/skills/ae-analysis/references/scenario_evaluation.md +17 -1
- package/skills/ae-analysis/references/scenario_list.md +7 -7
- package/skills/ae-analysis/references/system_oauth2_update.md +3 -1
- package/skills/ae-analysis/references/system_third_party_login_upsert.md +4 -2
- package/skills/ae-analysis/references/user_tag_create.md +4 -1
- package/skills/ae-analysis/references/user_tag_get.md +2 -0
- package/skills/ae-analysis/references/user_tag_models.md +8 -2
- package/skills/ae-analysis/references/user_tag_update.md +5 -2
- package/skills/ae-analysis/references/virtual_property_create.md +12 -1
- package/skills/ae-analysis/references/virtual_property_sql_rule_update.md +10 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-project-semantic-wiki.mjs +55 -13
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/company-kb.mjs +2 -2
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-rules.md +2 -2
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-schema.md +7 -1
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/wait-compile-run.mjs +79 -0
- package/skills/ae-automation/SKILL.md +4 -2
- package/skills/ae-capability/SKILL.md +16 -8
- package/skills/ae-community/SKILL.md +1 -0
- package/skills/ae-dataops/SKILL.md +1 -0
- package/skills/ae-engage/SKILL.md +1 -0
- package/skills/ae-evaluation/SKILL.md +17 -2
- package/skills/ae-generate-tracking-plan/SKILL.md +5 -0
- package/skills/ae-kb/SKILL.md +8 -4
- package/skills/ae-kb/references/analysis-workflow.md +11 -2
- package/skills/ae-kb/references/publication.md +45 -0
- package/skills/ae-kb/references/query-workflow.md +3 -1
- package/skills/ae-kb/references/versions.md +1 -1
- package/skills/ae-metadata/SKILL.md +1 -0
- package/skills/ae-migrate-tracking-code/SKILL.md +2 -1
- package/skills/ae-team/SKILL.md +1 -1
- package/skills/ae-tracking-matrix/SKILL.md +170 -0
- package/skills/ae-tracking-matrix/assets//345/237/213/347/202/271/346/250/241/347/211/210.xlsx +0 -0
- package/skills/ae-tracking-matrix/i18n.yaml +12 -0
- package/skills/ae-tracking-matrix/references/ae-capabilities.md +93 -0
- package/skills/ae-tracking-matrix/references/business-semantic-checks.md +30 -0
- package/skills/ae-tracking-matrix/references/categories/acquaintance_social_tracking_plan_template.md +256 -0
- package/skills/ae-tracking-matrix/references/categories/blockchain_game_tracking_plan_template.md +213 -0
- package/skills/ae-tracking-matrix/references/categories/card_game_tracking_plan_template.md +407 -0
- package/skills/ae-tracking-matrix/references/categories/casual_game_tracking_plan_template.md +218 -0
- package/skills/ae-tracking-matrix/references/categories/casual_music.md +112 -0
- package/skills/ae-tracking-matrix/references/categories/chess_cards_tracking_plan_template.md +301 -0
- package/skills/ae-tracking-matrix/references/categories/ecommerce_tracking_plan_template.md +356 -0
- package/skills/ae-tracking-matrix/references/categories/fishing.md +775 -0
- package/skills/ae-tracking-matrix/references/categories/game_basic_module_tracking_plan.md +89 -0
- package/skills/ae-tracking-matrix/references/categories/idle_card.md +27 -0
- package/skills/ae-tracking-matrix/references/categories/idle_game_tracking_plan_template.md +415 -0
- package/skills/ae-tracking-matrix/references/categories/interactive_video.md +133 -0
- package/skills/ae-tracking-matrix/references/categories/merge.md +639 -0
- package/skills/ae-tracking-matrix/references/categories/mmo_mobile_tracking_plan_template.md +406 -0
- package/skills/ae-tracking-matrix/references/categories/mmo_web.md +230 -0
- package/skills/ae-tracking-matrix/references/categories/music.md +137 -0
- package/skills/ae-tracking-matrix/references/categories/online_education_tracking_plan_template.md +414 -0
- package/skills/ae-tracking-matrix/references/categories/qipai_mj.md +199 -0
- package/skills/ae-tracking-matrix/references/categories/reading_tracking_plan_template.md +158 -0
- package/skills/ae-tracking-matrix/references/categories/roguelike_tracking_plan_template.md +546 -0
- package/skills/ae-tracking-matrix/references/categories/rpg.md +195 -0
- package/skills/ae-tracking-matrix/references/categories/short_drama_tracking_plan_template.md +115 -0
- package/skills/ae-tracking-matrix/references/categories/simulation_business_tracking_plan_template.md +151 -0
- package/skills/ae-tracking-matrix/references/categories/slg_tracking_plan_template.md +260 -0
- package/skills/ae-tracking-matrix/references/categories/slots_tracking_plan_template.md +232 -0
- package/skills/ae-tracking-matrix/references/categories/stranger_social_tracking_plan_template.md +359 -0
- package/skills/ae-tracking-matrix/references/categories/tower_defense.md +365 -0
- package/skills/ae-tracking-matrix/references/categories/video_editor_tracking_plan_template.md +211 -0
- package/skills/ae-tracking-matrix/references/categories/wechat_minigame.md +132 -0
- package/skills/ae-tracking-matrix/references/category-registry.md +77 -0
- package/skills/ae-tracking-matrix/references/data-verification/diagnosis_kb.md +230 -0
- package/skills/ae-tracking-matrix/references/data-verification/sql_checks.md +406 -0
- package/skills/ae-tracking-matrix/references/data-verification/tracking_plan_comparison.md +128 -0
- package/skills/ae-tracking-matrix/references/eval-cases.md +74 -0
- package/skills/ae-tracking-matrix/references/naming-dict.md +238 -0
- package/skills/ae-tracking-matrix/references/optimization-checklist.md +85 -0
- package/skills/ae-tracking-matrix/references/plan-generation/export-schema.md +142 -0
- package/skills/ae-tracking-matrix/references/plan-generation/module-baseline.md +47 -0
- package/skills/ae-tracking-matrix/references/plan-generation/reference.md +794 -0
- package/skills/ae-tracking-matrix/references/plan-generation/template-catalog.md +94 -0
- package/skills/ae-tracking-matrix/references/scene-routing.md +80 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/android.md +3787 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/c.md +827 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocos2d-lua.md +655 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocos2d-x.md +953 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/cocoscreator.md +1128 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/corona.md +714 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/egret.md +1268 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/flutter.md +776 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/h5-and-app-sdk-integration.md +182 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/ios.md +2755 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/javascript.md +1182 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/layaair.md +1300 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/macos.md +1369 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/mini-program-mini-game.md +1692 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/openharmony.md +902 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/react-native.md +763 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/uni-app.md +1107 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/unity.md +1532 -0
- package/skills/ae-tracking-matrix/references/sdk/client-sdk/unreal.md +845 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/android_sdk_faq.md +228 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/ios_sdk_faq.md +149 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/java_sdk_faq.md +407 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/javascript_sdk_faq.md +163 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/minigame_sdk_faq.md +149 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/miniprogram_sdk_faq.md +153 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/python_sdk_faq.md +232 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/sdk_log_guide.md +314 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/sdk_usage_notes.md +117 -0
- package/skills/ae-tracking-matrix/references/sdk/faq/unity_sdk_faq.md +148 -0
- package/skills/ae-tracking-matrix/references/sdk/integration-tools/filebeat-logstash-guide.md +645 -0
- package/skills/ae-tracking-matrix/references/sdk/integration-tools/logbus2_guide.md +307 -0
- package/skills/ae-tracking-matrix/references/sdk/integration-tools/logbus2_parser_plugin.md +347 -0
- package/skills/ae-tracking-matrix/references/sdk/integration-tools/restful_api_notes.md +72 -0
- package/skills/ae-tracking-matrix/references/sdk/integration-tools/ta-datax-writer-guide.md +264 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/c.md +566 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/erlang.md +409 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/golang.md +446 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/java.md +557 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/lua.md +457 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/nodejs.md +490 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/php.md +523 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/python.md +484 -0
- package/skills/ae-tracking-matrix/references/sdk/server-sdk/ruby.md +442 -0
- package/skills/ae-tracking-matrix/references/sdk/te-data-rules/data-rules.md +391 -0
- package/skills/ae-tracking-matrix/references/sdk/te-data-rules/first-event-validation.md +91 -0
- package/skills/ae-tracking-matrix/references/sdk/te-data-rules/preset-properties-system-fields.md +635 -0
- package/skills/ae-tracking-matrix/references/sdk/te-data-rules/updatable-events.md +113 -0
- package/skills/ae-tracking-matrix/references/sdk/te-data-rules/user-identification-rules.md +466 -0
- package/skills/ae-tracking-matrix/references/standard-base/README.md +22 -0
- package/skills/ae-tracking-matrix/references/standard-base/basic_event_data.md +174 -0
- package/skills/ae-tracking-matrix/references/standard-base/common_event_properties.md +20 -0
- package/skills/ae-tracking-matrix/references/standard-base/common_event_properties_setup.md +7 -0
- package/skills/ae-tracking-matrix/references/standard-base/data_type_design_principles.md +14 -0
- package/skills/ae-tracking-matrix/references/standard-base/gameplay_event_data.md +370 -0
- package/skills/ae-tracking-matrix/references/standard-base/id_system_faq.md +47 -0
- package/skills/ae-tracking-matrix/references/standard-base/integration_must_know.md +37 -0
- package/skills/ae-tracking-matrix/references/standard-base/multi_platform_integration_notes.md +27 -0
- package/skills/ae-tracking-matrix/references/standard-base/multi_user_id_system_recommendations.md +23 -0
- package/skills/ae-tracking-matrix/references/standard-base/tracking_notes.md +14 -0
- package/skills/ae-tracking-matrix/references/standard-base/user_data.md +46 -0
- package/skills/ae-tracking-matrix/references/standard-base/user_id_system.md +13 -0
- package/skills/ae-tracking-matrix/references/system-fields.md +297 -0
- package/skills/ae-tracking-matrix/references/te-field-translations.md +1791 -0
- package/skills/ae-tracking-matrix/references/workflows/data-verification.md +232 -0
- package/skills/ae-tracking-matrix/references/workflows/feasibility-analysis.md +829 -0
- package/skills/ae-tracking-matrix/references/workflows/integration-qna.md +355 -0
- package/skills/ae-tracking-matrix/references/workflows/plan-generation.md +283 -0
- package/skills/ae-tracking-matrix/references/workflows/plan-lint.md +168 -0
- package/skills/ae-tracking-matrix/references/workflows/plan-review-optimize.md +205 -0
- package/skills/ae-tracking-matrix/references/workflows/prd-to-suggestions.md +75 -0
- package/skills/ae-tracking-matrix/references/workflows/troubleshooting.md +36 -0
- package/skills/ae-tracking-matrix/references/workflows/validated-upload.md +107 -0
- package/skills/ae-tracking-matrix/scripts/build_template_catalog.py +114 -0
- package/skills/ae-tracking-matrix/scripts/export_tracking_plan.py +53 -0
- package/skills/ae-tracking-matrix/scripts/finalize_plan.py +166 -0
- package/skills/ae-tracking-matrix/scripts/lint_tracking_plan.py +674 -0
- package/skills/ae-tracking-matrix/scripts/plan_contract.py +200 -0
- package/skills/ae-tracking-matrix/scripts/plan_types.py +60 -0
- package/skills/ae-tracking-matrix/scripts/prepare_delivery.py +169 -0
- package/skills/ae-tracking-matrix/scripts/sync_plan.py +296 -0
- package/skills/ae-tracking-matrix/scripts/upload_plan.py +340 -0
- package/dist/chunk-AMBFK2K3.js +0 -28
- package/dist/chunk-Y74WTIKJ.js +0 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# analysis scenario append
|
|
2
2
|
|
|
3
|
-
Pass original text to `--text`; never pre-encode it. The CLI automatically sends `text` as UTF-8 Base64 with `content_encoding=base64`, for both user feedback and answer revisions and for execute, validate and dry-run. Common collects the exact decoded text. Other fields, including `--user-message`, retain their existing representation. Encoding is reversible and is not encryption. Deploy Common support first; old unmarked requests remain accepted by new Common. An older Common rejects the new marker; do not retry or fall back to plain text.
|
|
3
|
+
Pass the original user text, or the business body of an answer revision, to `--text`; never pre-encode it. The CLI automatically sends `text` as UTF-8 Base64 with `content_encoding=base64`, for both user feedback and answer revisions and for execute, validate and dry-run. Common collects the exact decoded text. Other fields, including `--user-message`, retain their existing representation. Encoding is reversible and is not encryption. Deploy Common support first; old unmarked requests remain accepted by new Common. An older Common rejects the new marker; do not retry or fall back to plain text.
|
|
4
4
|
|
|
5
5
|
Command: `ae-cli analysis scenario append`. Capability: `analysis.scenario.append`. Risk: `write`.
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ The optional `--project-id` flag remains accepted for compatibility, but omissio
|
|
|
12
12
|
|
|
13
13
|
Append user feedback or a revised answer to the original [scenario](scenario_collect.md); never create a second scenario simply because the user corrected, challenged or clarified the original answer. No correctness rating is accepted. `--validate`/`--dry-run` do not emit entries.
|
|
14
14
|
|
|
15
|
-
Required: `--question-id` original scenario ID, `--entry-type` user_feedback or answer_revision, `--target-answer-id` actual answer being challenged/revised, and `--text` exact user message (max4096) or exact revised answer (max16384). Preserve the user's words even when you disagree. Do not classify an objection as proof of error. A new requirement or ordinary follow-up is not automatically negative feedback. If the target cannot be reliably identified, do not guess a scenario or answer ID. Preserve the text for clarification rather than misattributing it.
|
|
15
|
+
Required: `--question-id` original scenario ID, `--entry-type` user_feedback or answer_revision, `--target-answer-id` actual answer being challenged/revised, and `--text` exact user message (max4096) or exact revised business answer body (max16384). For `answer_revision`, apply the [business answer content boundary](scenario_collect.md#business-answer-content): exclude client memory citations, rendering directives and local artifact paths while preserving substantive business content. Do not apply these exclusions to `user_feedback` or `--user-message`. Preserve the user's words even when you disagree. Do not classify an objection as proof of error. A new requirement or ordinary follow-up is not automatically negative feedback. If the target cannot be reliably identified, do not guess a scenario or answer ID. Preserve the text for clarification rather than misattributing it.
|
|
16
16
|
|
|
17
17
|
After any substantive reply to the same scenario (recheck, explanation, correction or scope clarification), append answer_revision even when the conclusion stays the same. This records how the Agent responded to feedback; it does not assert that the previous answer was wrong. Reuse actual earlier call references when no new query is needed. If the triggering user request was not already captured as user_feedback, pass its exact original text as --user-message (max4096) on answer_revision. This preserves neutral scope changes, ordinary explanations and refinements without calling them negative feedback. Omit this flag when the same text is already stored in user_feedback; never duplicate it. Acknowledgments such as thanks alone need no entry. For answer_revision, also supply `--query-path` as described in collect (ordered existing call references only, no query results) and a new `--answer-id` (defaults to answer:<current-turn-id>); target_answer_id still points at the old answer. Do not overwrite old answers or feedback. Feedback accepts no answer_id/query_path/user_message. `--project-id` must identify the source analysis project to append a sample. `--entry-id` defaults to current-turn-id:entry-type; preserve it on retries. It is independent of text so retries do not become new entries. If multiple distinct entries of the same type are intentionally submitted in one turn, assign distinct stable suffixes from real message identities.
|
|
18
18
|
|
|
@@ -10,13 +10,24 @@ The optional `--project-id` flag remains accepted for compatibility, but omissio
|
|
|
10
10
|
|
|
11
11
|
Read [append](scenario_append.md) for later user feedback and answer revisions. Both commands support `--validate` and `--dry-run`, which do not emit collection events.
|
|
12
12
|
|
|
13
|
-
Pass the
|
|
13
|
+
Pass the business answer text defined below to `--answer`; never pre-encode it. The CLI automatically sends `answer` as UTF-8 Base64 with `content_encoding=base64` for execute, validate and dry-run. Common decodes a copy for validation and collection; encoded requests and validation responses retain the wire representation. This is reversible encoding, not encryption. Only `answer` is encoded by collect; other fields retain their existing representation. Deploy Common support before upgrading the CLI. New Common accepts legacy unmarked plain-text requests; older Common rejects the encoding marker, and the CLI never retries with plain text. On rejection, follow the existing collection-failure behavior and answer normally.
|
|
14
14
|
|
|
15
15
|
## Collection only
|
|
16
16
|
|
|
17
|
-
Once a complete scenario answer is ready, collect one sample
|
|
17
|
+
Once a complete scenario answer is ready, collect one sample containing the exact business answer body that will be delivered, excluding client-only metadata as specified below. Keep the original request plus confirmed scope clarifications together in question; do not replace the original goal with the last short user message. Do not self-rate or ask for a rating. Multiple CLI data queries are one sample. Metadata/discovery/help or asset writes alone are not scenarios. An attempted failed query still qualifies when its existing call ID is available. Do not conduct extra queries just for collection.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
### Business answer content
|
|
20
|
+
|
|
21
|
+
Apply this boundary before calling collect and before appending an `answer_revision`. Collect the business answer, not the entire client message envelope:
|
|
22
|
+
|
|
23
|
+
- Exclude the entire `<oai-mem-citation>...</oai-mem-citation>` block, including memory file references, citation entries and rollout IDs, and equivalent client-only provenance metadata.
|
|
24
|
+
- Exclude client rendering directives such as `visualize` payloads and standalone local artifact embeds. Do not collect machine-local paths such as `/Users/...`, `/tmp/...` or `file://...` from output links; retain meaningful business link labels and surrounding explanations. Keep accessible business report/evidence URLs.
|
|
25
|
+
- Preserve the original business wording, numbers, tables, conclusions, scope, uncertainty and failure explanations. Do not summarize, improve, correct or omit substantive content while removing metadata. If a chart or attachment carries essential findings, include those findings in the actual user-facing answer body before collection; never invent unseen attachment contents.
|
|
26
|
+
- Check the prepared answer for leftover client metadata before sending it. These exclusions apply to assistant answers only; preserve the user's original question, feedback and follow-up wording.
|
|
27
|
+
|
|
28
|
+
For example, an answer stating `Registered accounts: 63.` followed by a memory-citation block must collect `Registered accounts: 63.` only. The delivered message may still contain client-required metadata outside that business body.
|
|
29
|
+
|
|
30
|
+
Required flags: `--question` original request and confirmed clarifications, max8192; `--answer` exact business answer body, max16384; `--query-path` an ordered JSON array of 1..64 actual CLI call references, total max20000 characters. Each step accepts only `capability_id`, at least one existing `invocation_id` or `client_request_id`, and optional short `purpose` (max256). Preserve execution order, including relevant discovery/definition calls and failed attempts; at least one step must be an attempted analysis data query. Exclude collection/feedback calls. Prefer only the actual response meta.invocation_id. If it is unavailable, use the gateway meta.client_request_id only when actually returned. The business request_id in query parameters or stderr is NOT client_request_id; never relabel it. Do not add client_request_id alongside an available invocation_id. Never invent IDs or rerun business queries just to obtain one; if no gateway ID is available, do not fabricate a reference. A revision can reuse relevant earlier calls and add new calls in their original order, without rerunning them.
|
|
20
31
|
|
|
21
32
|
Do not upload result rows, data/error excerpts, query parameters, full transcripts, credentials or private reasoning. Purpose is a short operation label, not a reasoning trace or self-evaluation. Do not summarize large result sets for collection. Existing call telemetry already records parameters/status/timing; this event only links the path. Pass decoded JSON directly to --query-path; @file syntax is not supported by this command.
|
|
22
33
|
|
|
@@ -25,7 +36,7 @@ Do not upload result rows, data/error excerpts, query parameters, full transcrip
|
|
|
25
36
|
```bash
|
|
26
37
|
ae-cli analysis scenario collect --question-id '<original-user-turn-id>' \
|
|
27
38
|
--question '<original question and confirmed clarifications>' \
|
|
28
|
-
--answer '<exact
|
|
39
|
+
--answer '<exact business answer body without client-only metadata>' \
|
|
29
40
|
--query-path '[{"capability_id":"analysis.report.get","invocation_id":"<definition-call-id>","purpose":"Inspect metric definition"},{"capability_id":"analysis.report_data.run","invocation_id":"<query-call-id>","purpose":"Compare requested weeks"}]' \
|
|
30
41
|
--project-id 196
|
|
31
42
|
```
|
|
@@ -10,7 +10,23 @@ Check whether the path addresses the requested subquestions and whether the answ
|
|
|
10
10
|
|
|
11
11
|
Assess answers as correct, incomplete, wrong, or unverifiable internally. A wrong answer requires a demonstrable defect relevant to the scenario. An incomplete answer has a demonstrable substantive omission or unresolved subquestion, even when honestly acknowledged. A correct answer requires adequate support for the actual requested outcome; a plausible path alone cannot establish a numeric analysis answer as correct. Unverifiable means the available path/answer/feedback cannot establish correctness. Do not turn path compliance into an overall success label. A later revision never erases an earlier defect or the original goal. Judge each answer against the confirmed requirements at that point; a newly added requirement is not retroactively an omission.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## Select useful regression cases
|
|
14
|
+
|
|
15
|
+
Keep answer-quality assessment separate from recommendation. Select Bad Cases where missing, misunderstood or inconsistently understood project business semantics caused the answer defect, and adding or clarifying those semantics could improve it. A knowledge base is only one possible carrier, alongside metric configuration, asset descriptions or confirmed business rules; its existence, absence or publication plan is not a selection criterion. Recommend only when the supplied evidence supports all three:
|
|
16
|
+
|
|
17
|
+
- A specific failure against the user's requirement at that point, with evidence linking it to business meaning: a metric/population/time definition, asset meaning or mapping, join relationship, attribution rule or business scope. A wrong result, contradiction or omission alone does not establish a semantic cause.
|
|
18
|
+
- The business semantics to add or clarify and why they address this defect. Existing project definitions that the Agent demonstrably misinterpreted or never acquired can qualify; definitions already correctly understood followed by arithmetic, execution or writing errors do not. Do not invent a rule, available asset or correct numeric result. If the authoritative definition is unknown, name the ambiguity to resolve without asserting a preferred rule as truth.
|
|
19
|
+
- An observable improvement criterion after that clarification, not merely a more fluent answer. For conflicting answers, verify the disputed semantic rule and its consistent application; neither the earlier nor the later answer is ground truth by default. Repeating an instruction to be complete or double-check calculations is not a business-semantic clarification.
|
|
20
|
+
|
|
21
|
+
Reserve needing verification for a specific suspected semantic mismatch whose disposition depends on an identifiable missing fact, such as what a queried status/date field means for the requested metric. State that evidence question; do not submit it as a recommended candidate. Do not put every unverifiable number or unfilled requirement in this queue: without a concrete suspected semantic mismatch, exclude it from recommendations with its evidence limitation. The possibility of an undiscovered source alone does not justify further verification. If the only demonstrated limitation is missing source data, unavailable permissions, or infrastructure failure, exclude it from this business-semantic regression set. Honest disclosure of a limitation is not itself an answer defect; missing evidence does not prove that data is absent everywhere. A proxy explicitly distinguished from the requested metric is not a proven substitution. A false claim of completion or a scope substitution can qualify despite data gaps only when evidence links the defect to business semantics.
|
|
22
|
+
|
|
23
|
+
A broader quality audit may report operational failures or incomplete service separately when requested; do not relabel them as business-semantic defects. Zero recommendations is valid. Preserve historical defects and semantic deduplication, but do not fill a quota or weaken evidence requirements to produce candidates.
|
|
24
|
+
|
|
25
|
+
## Write the finding
|
|
26
|
+
|
|
27
|
+
For project archive review, follow [scenario list](scenario_list.md) for pagination, semantic deduplication and compact output. For recommended cases, use "回答有误" or "回答不完整" as appropriate. Describe one primary defect in at most two short sentences: what the user required versus what the answer did, including only the decisive evidence (for example a contradictory pair of counts). Name the business semantics to add or clarify in one short sentence, then give one short, testable improvement sentence. For Chinese output, keep the finding within 80 characters and each of the semantic clarification and improvement within 60 characters, including punctuation; use similarly compact wording in other languages. Prefer one decisive comparison over several counts and business terms over raw field names. These limits apply to both the displayed finding and its persisted reason parts, not the original answer or evidence. Avoid investigation chronology, call inventories and abstract conclusions such as "the answer did not fully meet the need" without the concrete mismatch.
|
|
28
|
+
|
|
29
|
+
Keep answer/entry IDs, necessary prior-turn context, dates, feedback support and query evidence internally for reproducibility; concise wording must not discard that evidence or rewrite the archived question/answer. Group repeated questions/defects with distinct-scenario occurrence counts. Briefly separate cases needing verification and excluded cases from recommendations. These are discovery dispositions, not new API review states. The finding, semantic clarification and improvement criterion are review proposals, never certified ground truth.
|
|
14
30
|
|
|
15
31
|
These are independent model judgments, not certified ground truth. Keep evaluations separate from immutable collection; human review can calibrate them. When samples are supplied as local files, read only those files, supplied call records and this guide, never hidden fixtures, test expectations or the collector's private reasoning.
|
|
16
32
|
|
|
@@ -17,7 +17,8 @@ This is an L2 typed command backed by `analysis.scenario.list` in Common's ta-cl
|
|
|
17
17
|
|
|
18
18
|
- `--project-id` is required. `--days` defaults to 7 (1..90); `--limit` defaults to 20 (1..50); `--offset` defaults to 0.
|
|
19
19
|
- Days are calendar days including today, using the deployment timezone, and select the initial question's `collected_at`. The first response supplies the exact `meta.start_time`, exclusive `meta.end_time`, and `meta.timezone`.
|
|
20
|
-
- Output `data.items` contains one scenario per authenticated source user + Agent session + question. Each has `initial` (
|
|
20
|
+
- Output `data.items` contains one scenario per authenticated source user + Agent session + question. Each has `initial` (original question, business answer and path), `entries` (ordered feedback and answer revisions), and `conflicting_records`. Entry targets must still be checked by the evaluator; collection does not validate their existence.
|
|
21
|
+
- With Common support for historical answer filtering, assistant answer fields omit client memory-citation blocks, rendering directives and local artifact link destinations on read. Business wording, user questions/feedback, identities and call evidence remain unchanged; stored archives are not rewritten. This also applies to answers loaded for Bad Case submission and previously saved Bad Case readback. Older deployments may still return the original client metadata; it is not business evidence.
|
|
21
22
|
- While `meta.has_more` is true, repeat with the same project, days and limit, `--offset <meta.next_offset>` and `--end-time '<first meta.end_time>'`. Do not advance the snapshot time on later pages. The command never applies a badcase filter.
|
|
22
23
|
- The boundary filters collection timestamps, not a transaction across asynchronous archive writes. Late writes can still change totals between pages. If totals change, disclose the changing archive and do not claim a complete stable snapshot; retain distinct source identities to avoid double counting.
|
|
23
24
|
- Evaluate complete scenarios incrementally and keep compact findings plus source identities in task context. Do not sample only negative-feedback records. Do not claim full coverage until all pages are read. If context or execution limits stop the review, explicitly state how many of `meta.total` scenarios were reviewed.
|
|
@@ -32,18 +33,17 @@ The service removes exact retry identities. The Agent performs semantic deduplic
|
|
|
32
33
|
|
|
33
34
|
Do not assume relative time windows are equivalent: this calendar week and the trailing seven days can have different boundaries. Merge their questions only when the archive explicitly confirms the same dates; otherwise keep them separate. Conversely, equivalent phrasing with the same explicit dates, metric and defect should be grouped and counted together.
|
|
34
35
|
|
|
35
|
-
For an ordinary question inventory, return a concise question summary, the initial answer duration and occurrence count; do not assess quality unless requested. For badcases,
|
|
36
|
+
For an ordinary question inventory, return a concise question summary, the initial answer duration and occurrence count; do not assess quality unless requested. For badcases, apply the recommendation gate in the independent evaluation guide, including to historical defects preserved in later-revised scenarios. An incomplete or wrong answer alone does not establish a business-semantic defect; apply the evidence-based causal test regardless of how semantics are stored. Keep cases needing verification and operational/data limitations separate from recommendations. Unsupported objections or unavailable numeric proof alone are not confirmed badcases. Judge revisions against the user's confirmed scope at that point, rather than treating a new requirement as an earlier omission.
|
|
36
37
|
|
|
37
38
|
## Final response
|
|
38
39
|
|
|
39
40
|
Use the user's language. For Chinese badcase requests, use this compact table:
|
|
40
41
|
|
|
41
|
-
| 问题 | 回答耗时 | 评估结论 |
|
|
42
|
-
| --- | --- | --- | --- | --- |
|
|
43
|
-
|
|
|
44
|
-
| 分析收入下降的原因 | 未采集 | 回答不完整 | 用户要求分析下降原因,回答只列收入变化,没有分析原因。 | 1 |
|
|
42
|
+
| 问题 | 回答耗时 | 评估结论 | 发现原因 | 待补充业务语义 | 改善标准 | 出现次数 |
|
|
43
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
44
|
+
| 查询新增付费客户 | 42.3秒 | 回答有误 | 回答把新增付费客户理解成支付记录,计入了续费。 | 新增付费客户按首次付费客户去重,排除续费。 | 按首次付费时间限定范围,去重统计客户数。 | 1 |
|
|
45
45
|
|
|
46
|
-
These are examples, never presumed findings. The reason is mandatory
|
|
46
|
+
These are examples, never presumed findings. The reason is mandatory: at most two short sentences explaining one primary defect with decisive evidence. Name the business semantics to add or clarify and give one short, testable improvement criterion. A fluent restatement, a generic completeness instruction or an unsupported preferred number is not a semantic repair. Briefly list cases needing verification with the missing evidence, and group exclusions by cause; neither belongs in the recommended table. A compact list with the same finding/semantic-clarification/criterion fields is also suitable when comparing a few supplied cases. Do not output verdict codes, raw JSON, a separate evidence dump, internal IDs, full query paths, all answer versions, or a latest/fixed status by default. Retain provenance internally for a requested drilldown. If evidence is insufficient, exclude that scenario from confirmed badcases and briefly state the number of scenarios that could not be judged. State the actual project/window and review coverage once. A finding is an Agent assessment, not certified ground truth.
|
|
47
47
|
|
|
48
48
|
## Answer duration and CLI execution detail
|
|
49
49
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# system oauth2 update
|
|
2
2
|
|
|
3
|
+
This is a `high-risk-write` operation because it changes access, ownership, or authentication policy. Preview the affected scope with `--dry-run`, obtain explicit user confirmation, then use global `--yes` for non-interactive execution. Validation and dry-run do not apply the change.
|
|
4
|
+
|
|
3
5
|
Use when the user needs to enable or disable company OAuth2 login.
|
|
4
6
|
|
|
5
7
|
Do not use it outside the system oauth2 operation or with fields absent from the inspected capability schema.
|
|
@@ -7,7 +9,7 @@ Do not use it outside the system oauth2 operation or with fields absent from the
|
|
|
7
9
|
Command:
|
|
8
10
|
|
|
9
11
|
```bash
|
|
10
|
-
ae-cli system oauth2 update --company-id <company-id> --enable-oauth2 <true_or_false>
|
|
12
|
+
ae-cli system oauth2 update --company-id <company-id> --enable-oauth2 <true_or_false> --yes
|
|
11
13
|
```
|
|
12
14
|
|
|
13
15
|
Capability id: `system.oauth2.update`.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# system third-party-login upsert
|
|
2
2
|
|
|
3
|
+
This is a `high-risk-write` operation because it changes access, ownership, or authentication policy. Preview the affected scope with `--dry-run`, obtain explicit user confirmation, then use global `--yes` for non-interactive execution. Validation and dry-run do not apply the change.
|
|
4
|
+
|
|
3
5
|
Use when the user needs to create or update a third-party login configuration using protected secret sources.
|
|
4
6
|
|
|
5
7
|
Do not use it outside the system third-party-login operation or with fields absent from the inspected capability schema.
|
|
@@ -7,8 +9,8 @@ Do not use it outside the system third-party-login operation or with fields abse
|
|
|
7
9
|
Command:
|
|
8
10
|
|
|
9
11
|
```bash
|
|
10
|
-
ae-cli system third-party-login upsert --company-id <company_id> --login-type feishu --app-id <app_id> --app-secret-file <chmod_600_file>
|
|
11
|
-
ae-cli system third-party-login upsert --company-id <company_id> --login-type dingtalk --app-id <app_id> --corp-id <corp_id> --agent-id <agent_id> --dd-scan-app-id <scan_app_id> --app-secret-file <chmod_600_file> --dd-scan-app-secret-file <chmod_600_file>
|
|
12
|
+
ae-cli system third-party-login upsert --company-id <company_id> --login-type feishu --app-id <app_id> --app-secret-file <chmod_600_file> --yes
|
|
13
|
+
ae-cli system third-party-login upsert --company-id <company_id> --login-type dingtalk --app-id <app_id> --corp-id <corp_id> --agent-id <agent_id> --dd-scan-app-id <scan_app_id> --app-secret-file <chmod_600_file> --dd-scan-app-secret-file <chmod_600_file> --yes
|
|
12
14
|
```
|
|
13
15
|
|
|
14
16
|
Capability id: `system.third_party_login.upsert`.
|
|
@@ -6,7 +6,7 @@ Do not use it for uploaded-ID tags; use `user-tag create-id`. A successful creat
|
|
|
6
6
|
|
|
7
7
|
The response reports this directly: `computation.triggered_automatically=true`, `computation.status=submitted`, and `result_freshness.is_stale=true`. Follow `next_action`; when it is `poll_get`, invoke `next_capability_id` with the exact `next_input` returned by the command.
|
|
8
8
|
|
|
9
|
-
Flags: `--project-id`, `--tag-name`, `--display-name`, `--definition-request` required. Optional: `--authenticated-only`, `--zone-offset`, `--entity-id`, `--enable-auto-refresh`, `--auto-refresh-schedule`, `--auto-refresh-cron`. The tag type comes from `definition_request.type`.
|
|
9
|
+
Flags: `--project-id`, `--tag-name`, `--display-name`, `--definition-request` required. Optional: `--authenticated-only`, `--zone-offset`, `--entity-id`, `--enable-auto-refresh`, `--enable-history-tag-backup`, `--auto-refresh-schedule`, `--auto-refresh-cron`. The tag type comes from `definition_request.type`. For a SQL tag, explicitly pass the project entity whose IDs the first result column represents. Follow the [SQL tag subject selection rules](user_tag_models.md#sql-tag) before creating it.
|
|
10
10
|
|
|
11
11
|
`tag_name` is a machine identifier: 1-80 characters, starts with a letter, and contains only letters, digits, or underscores. `display_name` is 1-80 characters. The CLI rejects violations before dispatch.
|
|
12
12
|
|
|
@@ -51,3 +51,6 @@ Append one of these options to the create command:
|
|
|
51
51
|
`time` uses 24-hour `HH:mm`. `month_days` accepts 1-31; dates absent from a month are skipped. Weekly/monthly schedules require their respective day array; other frequencies reject those fields. The structured form preserves the page's daily/weekly/monthly frequency selection. Cron uses the page's custom schedule mode and preserves every cron field.
|
|
52
52
|
|
|
53
53
|
Schedules use the tag timezone. Use the existing `--zone-offset` only with an offset supported by the project; omit it to use the project's default behavior. Inspect `user-tag get` for `enable_auto_refresh` (1=enabled, 0=disabled), `scheduler_ui_config`, and `cluster_zone_offset` after creation.
|
|
54
|
+
|
|
55
|
+
To retain historical tag values after scheduled refreshes, pass `--enable-history-tag-backup true` together with a schedule, for example `--auto-refresh-schedule '{"frequency":"daily","time":"02:30"}'`. Backup defaults to off.
|
|
56
|
+
Read the tag with `user-tag get`: `enable_history_tag_backup=1` means enabled; the native read may omit the field or return null when disabled. Use `history-tag list` to check for a completed historical version after a scheduled refresh.
|
|
@@ -13,3 +13,5 @@ Flags: `--project-id`, `--tag-names` JSON array.
|
|
|
13
13
|
```bash
|
|
14
14
|
ae-cli analysis user-tag get --project-id <project_id> --tag-names '["user_level"]'
|
|
15
15
|
```
|
|
16
|
+
|
|
17
|
+
Pass `--include-history-dates true` to include `has_history_versions` and `is_cross_source` on each returned tag. Local tags return `available_history_dates` newest first; an empty list has no selectable fixed date. Cross-source tags omit the list because dates are not enumerated locally. Keep this flag omitted for ordinary computation polling.
|
|
@@ -62,10 +62,16 @@ From a fixed date through today:
|
|
|
62
62
|
|
|
63
63
|
## SQL tag
|
|
64
64
|
|
|
65
|
+
Before creating a SQL tag, identify who receives one tag value. Use `ae-cli project entity list --project-id <project_id>` to find that analysis entity in the target project. If its source field is unclear, inspect it with `project entity get`. Pass the resolved entity ID explicitly as `--entity-id`. When editing an existing SQL tag, read its entity with `analysis user-tag get` and keep that entity.
|
|
66
|
+
|
|
67
|
+
Trace the first column of the final SELECT through any aliases, CTEs and joins to the selected entity's identifier. Check that the final rows have that entity's grain. A compatible SQL type, a CAST or a matching alias does not establish identity. A reference tag can supply the calculation; reuse its entity only when the request targets the same subject.
|
|
68
|
+
|
|
69
|
+
For example, a reference SQL grouped by `#account_id` computes one value per account. For an account tag, select the project's account entity. For a user tag, return `#user_id` and compute one value per user using verified project fields or a verified account-to-user mapping. Renaming `#account_id` to `#user_id` still returns account IDs. If the intended entity is ambiguous, ask who should receive the tag. If the entity is clear but the mapping or the rule for combining accounts is unknown, ask for that missing information before issuing the write.
|
|
70
|
+
|
|
65
71
|
Return one row per distinct analysis-subject ID, with the tag value in the second column; a list tag requires a native SQL `ARRAY(varchar)` value, not a JSON string or repeated scalar rows. The server infers the tag type from that column, so do not add `selectType`; aggregate repeated subjects in the SQL itself, for example with `array_agg(DISTINCT CAST(value AS varchar))` and `GROUP BY` the subject ID.
|
|
66
72
|
|
|
67
73
|
```json
|
|
68
|
-
{"type":"sql","sql":"SELECT \"#user_id\", 'payer' AS tag_value FROM hive.ta.v_event_1 WHERE ${PartDate:partdate} AND \"$part_event\"='pay'","params":[{"name":"partdate","type":"part_date","recent_day":"1-7"}]}
|
|
74
|
+
{"type":"sql","sql":"SELECT DISTINCT \"#user_id\", 'payer' AS tag_value FROM hive.ta.v_event_1 WHERE ${PartDate:partdate} AND \"$part_event\"='pay'","params":[{"name":"partdate","type":"part_date","recent_day":"1-7"}]}
|
|
69
75
|
```
|
|
70
76
|
|
|
71
77
|
SQL tags support only `${PartDate:name}` dynamic placeholders. Every placeholder requires one `params` item with `type=part_date` and either `recent_day` or `start_time` plus `end_time`. `Text`, `Number`, `Variable`, `Time`, and `Selector` parameters are valid for general SQL analysis but are not valid for SQL tags.
|
|
@@ -74,7 +80,7 @@ For `recent_day`, `0-7` means 最近7天 and includes today; `1-7` means 过去7
|
|
|
74
80
|
`${base_date}` is a separate built-in computation-date macro, not a user-configurable dynamic placeholder. SQL tags may use `${base_date}`, a formatted value such as `${base_date:yyyy-MM-dd}`, or a server-supported offset such as `${base_date:yyyy-MM-dd-1*day}`. Keep the macro in `sql` and do not add it to `params`; it is expanded when the tag is calculated. Expansion produces plain text, so quote the macro when the SQL expression expects a string or date literal:
|
|
75
81
|
|
|
76
82
|
```json
|
|
77
|
-
{"type":"sql","sql":"SELECT \"#user_id\", 'payer' AS tag_value FROM hive.ta.v_event_1 WHERE \"$part_date\"='${base_date:yyyy-MM-dd}' AND \"$part_event\"='pay'"}
|
|
83
|
+
{"type":"sql","sql":"SELECT DISTINCT \"#user_id\", 'payer' AS tag_value FROM hive.ta.v_event_1 WHERE \"$part_date\"='${base_date:yyyy-MM-dd}' AND \"$part_event\"='pay'"}
|
|
78
84
|
```
|
|
79
85
|
|
|
80
86
|
Before writing a SQL tag, use `analysis sql-table list --project-id <project_id> --usage tag_cluster`, then call `analysis sql-table columns --project-id <project_id> --table-ref <table_ref> --usage tag_cluster`. The `tag_cluster` authorized table set is intentionally different from the general analysis SQL table set; do not reuse a table discovered with the default `usage=analysis`.
|
|
@@ -6,11 +6,11 @@ Do not use it for ID-file value replacement or to create a missing tag. A change
|
|
|
6
6
|
|
|
7
7
|
The response distinguishes both paths. An update that triggers recomputation returns `computation.triggered_automatically=true`, `result_freshness.is_stale=true`, and `next_action=poll_get` with an exact capability/input pair. An unchanged definition or display-name/remark-only update returns `computation.status=not_triggered`, `result_freshness.status=fresh`, and `next_action=none`.
|
|
8
8
|
|
|
9
|
-
Flags: `--project-id`, `--tag-name` required. Optional: `--display-name`, `--definition-request`, `--authenticated-only`, `--remark`, `--zone-offset`, `--enable-auto-refresh`, `--auto-refresh-schedule`, `--auto-refresh-cron`. The tag type comes from `definition_request.type` when the definition changes.
|
|
9
|
+
Flags: `--project-id`, `--tag-name` required. Optional: `--display-name`, `--definition-request`, `--authenticated-only`, `--remark`, `--zone-offset`, `--enable-auto-refresh`, `--enable-history-tag-backup`, `--auto-refresh-schedule`, `--auto-refresh-cron`. The tag type comes from `definition_request.type` when the definition changes.
|
|
10
10
|
|
|
11
11
|
`display_name` is at most 80 characters and `remark` is at most 400 characters. The CLI rejects violations before dispatch. `tag_name` is an existing exact identifier and cannot be renamed by update.
|
|
12
12
|
|
|
13
|
-
Read `user_tag_models.md` before changing the definition. The backend validates and compiles `definition_request` inside update and refuses to modify the tag if clarification is required.
|
|
13
|
+
Read `user_tag_models.md` before changing the definition. For SQL, check the replacement query against the existing tag's entity using the [SQL tag subject selection rules](user_tag_models.md#sql-tag). The backend validates and compiles `definition_request` inside update and refuses to modify the tag if clarification is required.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
ae-cli analysis user-tag update --project-id <project_id> --tag-name user_level --display-name "User Level v2"
|
|
@@ -29,3 +29,6 @@ ae-cli analysis user-tag update --project-id <project_id> --tag-name user_level
|
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
Read `user-tag get` after updating to verify `enable_auto_refresh` (1=enabled, 0=disabled), `scheduler_ui_config`, and `cluster_zone_offset`. Schedule-only updates return `computation.status=not_triggered` and `next_action=none`.
|
|
32
|
+
|
|
33
|
+
Use `--enable-history-tag-backup true|false` to switch historical backups independently. Enabling requires periodic refresh already active or a schedule in the same update. Omitting the flag preserves the saved switch. A backup-only update keeps the schedule and does not start a calculation.
|
|
34
|
+
Read the tag with `user-tag get`: `enable_history_tag_backup=1` means enabled; the native read may omit the field or return null when disabled. Use `history-tag list` to check for a completed historical version after a scheduled refresh.
|
|
@@ -11,6 +11,7 @@ Command:
|
|
|
11
11
|
```bash
|
|
12
12
|
ae-cli analysis-meta virtual-property create --project-id <project_id> --property-name '#vp@demo' --table-type event --select-type string --sql-expression 'event_name' --sql-event-relation-type relation_default
|
|
13
13
|
ae-cli analysis-meta virtual-property create --project-id <project_id> --property-name '#vp@demo' --property-desc demo --table-type event --select-type string --sql-expression "CASE WHEN status = 1 THEN 'active' ELSE 'inactive' END" --sql-event-relation-type relation_by_setting --related-events '[{"eventName":"purchase"}]' --property-remark demo
|
|
14
|
+
ae-cli analysis-meta virtual-property create --project-id <project_id> --property-name '#vp@user_tier' --table-type user --select-type string --sql-expression 'ta_tag."vip_level"'
|
|
14
15
|
ae-cli analysis-meta virtual-property create --project-id <project_id> --sql-expression '<sql>' --v-prop '{"property":{"column_name":"#vp@demo","table_type":"event","select_type":"string"}}' --properties '[...]'
|
|
15
16
|
```
|
|
16
17
|
|
|
@@ -40,7 +41,7 @@ Output is a successful gateway envelope with no business data.
|
|
|
40
41
|
|
|
41
42
|
## Decision Rules
|
|
42
43
|
- `sql_expression` / `related_events` cannot be written from experience alone; they must be built from real project metadata.
|
|
43
|
-
-
|
|
44
|
+
- Start with `--project-id`, `--property-name`, `--table-type`, `--select-type`, and `--sql-expression`. Event relation flags apply only to event properties.
|
|
44
45
|
- If `--sql-event-relation-type=relation_by_setting`, `--related-events` must contain event names from `analysis-meta event list`.
|
|
45
46
|
- Columns starting with `#` or containing `@` should be double-quoted in Trino SQL.
|
|
46
47
|
- Use `--v-prop` only when an exact virtual property DTO is already available.
|
|
@@ -49,3 +50,13 @@ Output is a successful gateway envelope with no business data.
|
|
|
49
50
|
## Recommended Chain
|
|
50
51
|
- `analysis-meta property list` -> `analysis-meta virtual-property create`
|
|
51
52
|
- `analysis-meta property list` -> `analysis-meta event list` -> `analysis-meta virtual-property create` when using `relation_by_setting`
|
|
53
|
+
|
|
54
|
+
Both virtual **user** and **event** properties can reference a tag in SQL, for example `ta_tag."vip_level"`. Resolve the tag's resource key with `analysis-meta catalog list`. For a user property, choose a tag based on a user entity.
|
|
55
|
+
|
|
56
|
+
For an event property, pass each version override once:
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
--tag-date-policies '[{"tag_name":"vip_level","cluster_date_policy":"AUTO"},{"tag_name":"tier","cluster_date_policy":"SPECIFIED","specified_cluster_date":"2026-10-09"}]'
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
LATEST is the default. Only history-capable tags accept AUTO or SPECIFIED. Only SPECIFIED takes a date. For a local fixed date, choose from `analysis user-tag get --include-history-dates true`. For a cross-source tag, use the requested date.
|
|
@@ -28,3 +28,13 @@ Output is a successful gateway envelope with no business data.
|
|
|
28
28
|
| `--tag-date-policies` | No | Tag date policies JSON array. |
|
|
29
29
|
| `--replace-remark` | No | Replacement remark. |
|
|
30
30
|
| `--replace-suggestion` | No | Replacement suggestion. |
|
|
31
|
+
|
|
32
|
+
Both virtual **user** and **event** properties can reference a tag in SQL, for example `ta_tag."vip_level"`. Resolve the tag's resource key with `analysis-meta catalog list`. For a user property, choose a tag based on a user entity.
|
|
33
|
+
|
|
34
|
+
For an event property, pass each version override once:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
--tag-date-policies '[{"tag_name":"vip_level","cluster_date_policy":"AUTO"},{"tag_name":"tier","cluster_date_policy":"SPECIFIED","specified_cluster_date":"2026-10-09"}]'
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
LATEST is the default. Only history-capable tags accept AUTO or SPECIFIED. Only SPECIFIED takes a date. For a local fixed date, choose from `analysis user-tag get --include-history-dates true`. For a cross-source tag, use the requested date. Read `analysis-meta property get` for the saved SQL and policies. Send changes for the tags you want to update. Set a referenced tag to LATEST explicitly to reset it. Other referenced tags retain their policy; removing a tag from the SQL removes its policy.
|
package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-project-semantic-wiki.mjs
CHANGED
|
@@ -324,7 +324,12 @@ function validateSemanticPlan() {
|
|
|
324
324
|
if (!asArray(card.questions).map(clean).filter(Boolean).length || !clean(card.intent)) fail(`Recall card ${cardId} requires questions and intent.`);
|
|
325
325
|
assertAgentAuthoredRecallCard(card, domainId);
|
|
326
326
|
const preferred = asArray(card.preferred_asset_refs);
|
|
327
|
-
|
|
327
|
+
const routing = asObject(card.routing);
|
|
328
|
+
if (routing.contract_version !== undefined && routing.contract_version !== 1) fail(`Recall card ${cardId} has an unsupported routing contract version.`);
|
|
329
|
+
const branches = asArray(routing.branches);
|
|
330
|
+
const hasOnlyDecisions = routing.contract_version === 1 && branches.length > 0 &&
|
|
331
|
+
branches.every(branch => isDecisionOnly(branch.outcome));
|
|
332
|
+
if (!preferred.length && !hasOnlyDecisions) fail(`Recall card ${cardId} requires at least one preferred asset.`);
|
|
328
333
|
for (const ref of [...preferred, ...asArray(card.fallback_asset_refs)]) {
|
|
329
334
|
validateAssetRef(ref, cardId);
|
|
330
335
|
const type = clean(ref.resource_type);
|
|
@@ -335,26 +340,33 @@ function validateSemanticPlan() {
|
|
|
335
340
|
if (!inDomain) fail(`Recall card ${cardId} references ${type}:${key} outside domain ${domainId}.`);
|
|
336
341
|
if (preferred.includes(ref)) addMulti(preferredByAsset, `${type}:${key}`, cardId);
|
|
337
342
|
}
|
|
338
|
-
const routing = asObject(card.routing);
|
|
339
343
|
if (card.routing != null) {
|
|
340
344
|
for (const field of ['applicable_when', 'answer_grain', 'stop_when', 'fallback_when_unavailable', 'evidence_boundary']) {
|
|
341
345
|
if (!clean(routing[field])) fail(`Recall card ${cardId} routing requires ${field}.`);
|
|
342
346
|
}
|
|
343
347
|
if (!asArray(routing.branches).length) fail(`Recall card ${cardId} routing requires branches.`);
|
|
344
|
-
for (const branch of
|
|
345
|
-
if (
|
|
348
|
+
for (const branch of branches) {
|
|
349
|
+
if (branch.outcome !== undefined && routing.contract_version !== 1) fail(`Recall card ${cardId} branch outcome requires routing contract_version 1.`);
|
|
350
|
+
if (routing.contract_version === 1) validateAnswerBranch(branch, cardId);
|
|
351
|
+
const decisionOnly = routing.contract_version === 1 && isDecisionOnly(branch.outcome);
|
|
352
|
+
if (!clean(branch.when) || (!decisionOnly && !asArray(branch.asset_refs).length)) {
|
|
346
353
|
fail(`Recall card ${cardId} routing branch requires when and asset_refs.`);
|
|
347
354
|
}
|
|
355
|
+
const allowedRefs = [...preferred, ...asArray(card.fallback_asset_refs)];
|
|
356
|
+
if (decisionOnly) allowedRefs.push(...asArray(card.excluded_asset_refs));
|
|
348
357
|
for (const ref of asArray(branch.asset_refs)) {
|
|
349
358
|
validateAssetRef(ref, cardId);
|
|
350
|
-
if (!
|
|
359
|
+
if (!allowedRefs.some((allowed) =>
|
|
351
360
|
clean(allowed.resource_type) === clean(ref.resource_type) && clean(allowed.resource_key) === clean(ref.resource_key))) {
|
|
352
|
-
fail(`Recall card ${cardId} routing branch references an asset outside
|
|
361
|
+
fail(`Recall card ${cardId} routing branch references an asset outside its allowed card references.`);
|
|
353
362
|
}
|
|
354
363
|
}
|
|
355
364
|
const combination = asObject(branch.combination);
|
|
356
365
|
if (branch.combination != null) {
|
|
357
366
|
if (!['compatible', 'incompatible', 'unknown'].includes(clean(combination.compatibility))) fail(`Recall card ${cardId} has invalid combination compatibility.`);
|
|
367
|
+
if (routing.contract_version === 1 && !decisionOnly && combination.compatibility !== 'compatible') {
|
|
368
|
+
fail(`Recall card ${cardId} executable branch cannot rely on an unverified combination.`);
|
|
369
|
+
}
|
|
358
370
|
if (!clean(combination.reason)) fail(`Recall card ${cardId} combination requires an evidence-based reason.`);
|
|
359
371
|
if (combination.compatibility === 'compatible'
|
|
360
372
|
&& (!asArray(combination.join_keys).length || !clean(combination.time_alignment))) {
|
|
@@ -614,6 +626,24 @@ function normalizePlanAssetRef(value, label) {
|
|
|
614
626
|
return { resource_type: type, resource_key: key };
|
|
615
627
|
}
|
|
616
628
|
|
|
629
|
+
function isDecisionOnly(outcome) {
|
|
630
|
+
return outcome === 'clarify' || outcome === 'unsupported';
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
function validateAnswerBranch(branch, cardId) {
|
|
634
|
+
const hasText = value => typeof value === 'string' && value.trim().length > 0;
|
|
635
|
+
const invalid = message => fail(`Recall card ${cardId} routing branch ${message}.`);
|
|
636
|
+
if (!['direct', 'transform', 'clarify', 'unsupported'].includes(branch.outcome)) invalid('requires a valid outcome');
|
|
637
|
+
if (!hasText(branch.when) || !hasText(branch.reason) || !hasText(branch.action)) invalid('requires when, reason and action');
|
|
638
|
+
if (!Array.isArray(branch.asset_refs)) invalid('requires an asset_refs array');
|
|
639
|
+
if (branch.answer_grain !== undefined && !hasText(branch.answer_grain)) invalid('has invalid answer_grain');
|
|
640
|
+
if (branch.source_grain !== undefined && !hasText(branch.source_grain)) invalid('has invalid source_grain');
|
|
641
|
+
if (branch.checks !== undefined && (!Array.isArray(branch.checks) || !branch.checks.every(hasText))) invalid('has invalid checks');
|
|
642
|
+
if (isDecisionOnly(branch.outcome)) return;
|
|
643
|
+
if (!hasText(branch.source_grain)) invalid('requires source_grain');
|
|
644
|
+
if (!branch.checks?.length) invalid('requires evidence-based checks');
|
|
645
|
+
}
|
|
646
|
+
|
|
617
647
|
function assertAgentAuthoredRecallCard(card, domainId) {
|
|
618
648
|
const cardId = clean(card.card_id);
|
|
619
649
|
const values = [card.intent, card.live_execution_reason, ...asArray(card.questions)].map(clean);
|
|
@@ -772,14 +802,24 @@ ${asArray(values).map((ref) => {
|
|
|
772
802
|
return `- [${escapeLink(recallAssetLabel(ref))}](${linkPath}):${clean(ref.reason)}`;
|
|
773
803
|
}).join('\n') || '- 无'}`;
|
|
774
804
|
const routing = asObject(card.routing);
|
|
805
|
+
const versioned = routing.contract_version === 1;
|
|
775
806
|
const branches = asArray(routing.branches).map((branch) => {
|
|
776
807
|
const item = asObject(branch);
|
|
777
808
|
const targets = asArray(item.asset_refs).map(ref => `[${escapeLink(recallAssetLabel(ref))}](${assetPath(clean(ref.resource_type), clean(ref.resource_key))})`).join('、') || '回到业务域核对资产';
|
|
778
809
|
const combination = asObject(item.combination);
|
|
779
810
|
const combinationNote = asArray(item.asset_refs).filter(ref => ref.resource_type !== 'dashboard').length > 1
|
|
780
811
|
? ` Combination: ${clean(combination.compatibility) || 'unknown'}; ${clean(combination.reason) || 'Verify common population, stable identity, grain and time before combining.'}${asArray(combination.join_keys).length ? ` Keys: ${asArray(combination.join_keys).join(', ')}.` : ''}${clean(combination.time_alignment) ? ` Time: ${clean(combination.time_alignment)}.` : ''}${asArray(combination.missing_coverage).length ? ` Gaps: ${asArray(combination.missing_coverage).join('; ')}.` : ''}` : '';
|
|
812
|
+
if (versioned) {
|
|
813
|
+
const lines = [`- **${item.when}** (${item.outcome}) — ${item.reason}`];
|
|
814
|
+
if (item.source_grain) lines.push(` - Source grain: ${item.source_grain}`);
|
|
815
|
+
lines.push(` - Answer grain: ${item.answer_grain || routing.answer_grain}`, ` - Action: ${item.action}`);
|
|
816
|
+
for (const check of asArray(item.checks)) lines.push(` - Check: ${check}`);
|
|
817
|
+
if (item.asset_refs.length) lines.push(` - Evidence: ${targets}${combinationNote}`);
|
|
818
|
+
return lines.join('\n');
|
|
819
|
+
}
|
|
781
820
|
return `- 当${clean(item.when)}:使用 ${targets}。${clean(item.reason)}${combinationNote}`;
|
|
782
821
|
});
|
|
822
|
+
const openingRoutes = [...branches, `- If prerequisites fail: ${routing.fallback_when_unavailable}`].join('\n');
|
|
783
823
|
return `---
|
|
784
824
|
type: project-semantic-recall-card
|
|
785
825
|
card_id: ${yaml(card.card_id)}
|
|
@@ -794,10 +834,10 @@ requires_live_execution: ${Boolean(card.requires_live_execution)}
|
|
|
794
834
|
|
|
795
835
|
- 适用问题:${title}
|
|
796
836
|
- 意图:${clean(card.intent) || '未说明'}
|
|
797
|
-
|
|
837
|
+
${versioned ? openingRoutes : `- 首选资产:${asArray(card.preferred_asset_refs).map(recallAssetLabel).join('、') || '无'}
|
|
798
838
|
- 备选资产:${asArray(card.fallback_asset_refs).map(recallAssetLabel).join('、') || '无'}
|
|
799
839
|
- 排除资产:${asArray(card.excluded_asset_refs).map(recallAssetLabel).join('、') || '无'}
|
|
800
|
-
- 实时执行:${Boolean(card.requires_live_execution) ? `需要,${clean(card.live_execution_reason) || '当前数值、客户名单、趋势或明细需要实时执行。'}` : '不强制,但当前数值仍需按具体资产能力实时确认。'}
|
|
840
|
+
- 实时执行:${Boolean(card.requires_live_execution) ? `需要,${clean(card.live_execution_reason) || '当前数值、客户名单、趋势或明细需要实时执行。'}` : '不强制,但当前数值仍需按具体资产能力实时确认。'}`}
|
|
801
841
|
|
|
802
842
|
## 用户问法
|
|
803
843
|
|
|
@@ -812,7 +852,7 @@ ${clean(card.intent)}
|
|
|
812
852
|
- 适用条件:${clean(routing.applicable_when) || clean(card.intent)}
|
|
813
853
|
- 答案对象与粒度:${clean(routing.answer_grain) || '先按用户问法确认对象、统计粒度与时间范围。'}
|
|
814
854
|
- 必要参数:${asArray(routing.required_parameters).map(clean).filter(Boolean).join('、') || '按首选资产的输入定义核对。'}
|
|
815
|
-
${branches.join('\n') || `- 问法和资产定义匹配时使用首选资产;不匹配时先回到业务域确认对象与口径,再考虑备选资产。`}
|
|
855
|
+
${versioned ? '' : branches.join('\n') || `- 问法和资产定义匹配时使用首选资产;不匹配时先回到业务域确认对象与口径,再考虑备选资产。`}
|
|
816
856
|
- 停止条件:${clean(routing.stop_when) || '取得对象、粒度、范围、时间和权威状态均匹配的最小证据后停止扩搜。'}
|
|
817
857
|
- 无匹配或不可用时:${clean(routing.fallback_when_unavailable) || '回到业务域按对象、粒度、过滤和时间筛选域内资产;仍不匹配则说明缺口。'}
|
|
818
858
|
- 执行边界:${clean(routing.evidence_boundary) || '排除资产不能作为当前答案;当前数值、客户名单、趋势或明细必须实时执行。'}
|
|
@@ -828,7 +868,7 @@ ${renderRecallEvidence(card)}
|
|
|
828
868
|
## 实时执行边界
|
|
829
869
|
|
|
830
870
|
- 是否需要执行实时数据:${Boolean(card.requires_live_execution)}
|
|
831
|
-
- 原因:${clean(card.live_execution_reason) || '未说明'}
|
|
871
|
+
- 原因:${clean(card.live_execution_reason) || '未说明'}${versioned ? '\n- Execute only a supported branch. Other evidence links explain the clarification or limitation.' : ''}
|
|
832
872
|
${renderTargetedKnowledge('recall_card', clean(card.card_id), '../personal-semantics/')}
|
|
833
873
|
`;
|
|
834
874
|
}
|
|
@@ -859,7 +899,8 @@ function renderRecallEvidence(card) {
|
|
|
859
899
|
const facts = report ? reportContract(report) : null;
|
|
860
900
|
const parameters = summary ? asArray(summary.input_parameters).map(item => `${clean(item.name)}: ${clean(item.meaning)}`) : [];
|
|
861
901
|
const measures = summary ? [] : asArray(report?.metric_occurrences).map(item =>
|
|
862
|
-
[clean(item.display_name || item.event_title || item.event_name), clean(item.aggregation_name || item.aggregation_code)
|
|
902
|
+
[clean(item.display_name || item.event_title || item.event_name), clean(item.aggregation_name || item.aggregation_code),
|
|
903
|
+
item.event_name && `event=${item.event_name}`, item.entity_grain != null && `entity=${JSON.stringify(item.entity_grain)}`].filter(Boolean).join(': '));
|
|
863
904
|
const savedScope = !summary && facts && Object.keys(facts.time).length ? ` Saved time scope: ${JSON.stringify(facts.time)}.` : '';
|
|
864
905
|
const reportSource = summary ? readText(path.join(buildIr, 'reports', fileName('report', clean(ref.resource_key)))) : '';
|
|
865
906
|
const outputs = summary ? asArray(summary.output_fields).map(item => {
|
|
@@ -874,7 +915,7 @@ function renderRecallEvidence(card) {
|
|
|
874
915
|
return `${name}${unverified ? ' (identity unknown)' : ''}`;
|
|
875
916
|
}) : [];
|
|
876
917
|
const reminders = summary ? [
|
|
877
|
-
...asArray(summary.calculation_rules).
|
|
918
|
+
...asArray(summary.calculation_rules).map(item => clean(item.meaning)),
|
|
878
919
|
...['time_semantics', 'coverage_gaps'].flatMap(key => asArray(summary[key]).map(item => clean(item.meaning))),
|
|
879
920
|
] : [];
|
|
880
921
|
lines.push(`- [${escapeLink(recallAssetLabel(ref))}](${assetPath(ref.resource_type, clean(ref.resource_key))}): ${clean(summary?.business_purpose) || clean(ref.reason)} Grain: ${clean(summary?.statistical_grain) || (facts ? JSON.stringify(facts.groups) : 'verify the asset definition')}.${parameters.length ? ` Parameters: ${parameters.join('; ')}.` : ''}${outputs.length ? ` Outputs: ${outputs.join(', ')}.` : ''}${measures.length ? ` Measures (verify result column identities): ${measures.join('; ')}.` : ''}${savedScope}${reminders.length ? ` Reminders: ${reminders.join('; ')}.` : ''}`);
|
|
@@ -1545,7 +1586,8 @@ function semanticPlanFragmentRefsForSource(identity, rel) {
|
|
|
1545
1586
|
if (sourceKind === 'recall-card' && assetKey) {
|
|
1546
1587
|
refs.add(`recall-card:${assetKey}`);
|
|
1547
1588
|
const card = planModel.cards.find(card => clean(card.card_id) === assetKey);
|
|
1548
|
-
|
|
1589
|
+
const branchRefs = asArray(card?.routing?.branches).flatMap(branch => asArray(branch.asset_refs));
|
|
1590
|
+
for (const ref of [...asArray(card?.preferred_asset_refs), ...asArray(card?.fallback_asset_refs), ...branchRefs]) {
|
|
1549
1591
|
if (ref.resource_type === 'report' && planModel.sqlByReportId.has(clean(ref.resource_key))) {
|
|
1550
1592
|
refs.add(`report:${clean(ref.resource_key)}:sql_semantics`);
|
|
1551
1593
|
}
|
|
@@ -9,11 +9,11 @@ const requestScoped = new Set(['+import-status']);
|
|
|
9
9
|
const directory = new Set(['+source-ls', '+source-read', '+source-put', '+source-rm']);
|
|
10
10
|
const value = (args, key) => args[args.indexOf(key) + 1];
|
|
11
11
|
|
|
12
|
-
export function invokeCompanyKbCli(flags, { spawn = spawnSync, localCli = path.resolve(import.meta.dirname, '../../../../bin/ae-cli.js') } = {}) {
|
|
12
|
+
export function invokeCompanyKbCli(flags, { spawn = spawnSync, localCli = path.resolve(import.meta.dirname, '../../../../bin/ae-cli.js'), timeoutMs } = {}) {
|
|
13
13
|
// Packaged/project scripts use their matching CLI; standalone installed Skills retain PATH lookup.
|
|
14
14
|
const bundled = fs.existsSync(localCli);
|
|
15
15
|
const child = spawn(bundled ? process.execPath : 'ae-cli', bundled ? [localCli, ...flags] : flags,
|
|
16
|
-
{ encoding: 'utf8', stdio: ['inherit', 'pipe', 'pipe'] });
|
|
16
|
+
{ encoding: 'utf8', stdio: ['inherit', 'pipe', 'pipe'], ...(timeoutMs === undefined ? {} : { timeout: timeoutMs }) });
|
|
17
17
|
if (child.stderr) process.stderr.write(child.stderr);
|
|
18
18
|
if (child.error) throw child.error;
|
|
19
19
|
if (child.status === 0) return JSON.parse(child.stdout);
|
|
@@ -7,11 +7,11 @@ These rules guide Schema generation for project semantic knowledge bases built f
|
|
|
7
7
|
- CLI-managed asset facts live under `sources/assets/**`. Adopted personal semantics exported by the asset package live under `sources/personal-semantics/**` and are also CLI-managed generated source. Human project background, business rules, meetings, decisions, corrections, and references live outside those generated directories; asset refresh must not delete or override those human inputs.
|
|
8
8
|
- Organize generated Wiki pages by scope and business use, not by mirroring every source file. The primary navigation has five ordered entries: project overview, project-wide shared knowledge, business domains, event and asset catalog, and governance with provenance. Within each domain, explain the business question, judgment path, relevant events, metrics, assets, and boundaries. Keep asset-type pages as secondary evidence and lookup indexes.
|
|
9
9
|
- Begin the root page with question-intent routing. Route business-state and current-value questions through the matching domain and recall card; route named assets and field/definition/dependency questions through the asset catalog and governance; route shared product background through project-wide knowledge. If no card matches, enter the relevant domain and filter assets by business object, answer grain, filters and time. If no suitable evidence remains, state the gap. Stop searching once the smallest authoritative evidence set matches object, grain, scope and time.
|
|
10
|
-
-
|
|
10
|
+
- Open each recall card with its triggering intent, parameters, source and answer grains, and evidenced branch: answer directly, transform, clarify or explain a gap. Link the relevant assets, distinguish the actual measure from its label, and preserve conversion steps, checks, excluded alternatives, stop conditions and fallback.
|
|
11
11
|
- Public event groups are a project event lookup taxonomy. A group such as a product module is not automatically a business domain or an event definition. Only include events present in the exported asset scope, preserve their event-name identity, and link to the canonical event page. Never infer business meaning, certification, or domain membership from a group label alone. Personal event catalogs must not enter a shared project Wiki.
|
|
12
12
|
- The project overview must start with the project-level business model: business positioning, audience roles, business objects, object relationships, decision chains, asset roles in those chains, and non-goals. Asset counts, snapshot hashes, source package metadata and build logs belong after that model. Do not reduce the overview to a directory, asset inventory, or build summary.
|
|
13
13
|
- Do not infer business meaning from titles alone. Preserve unknowns, conflicts, source scope, certification state, and provenance when evidence is incomplete.
|
|
14
|
-
-
|
|
14
|
+
- Keep scoped adopted methods tied to their verified events, fields, assets and adoption records. Preserve counting entities, deduplication keys and units; mark unverified equivalences and identities unknown.
|
|
15
15
|
- If the governed package contains neither certified entry assets nor adopted personal semantics, compile the uploaded empty skeleton as an explicit unknown-state Wiki with the normal five navigation layers. Do not invent business domains, decisions, metrics, or asset definitions. When later evidence replaces the skeleton, remove obsolete empty-state claims from the published Wiki.
|
|
16
16
|
- Corrections and decisions override other material only when they state target, content, date, status, and applicable scope.
|
|
17
17
|
|
package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-schema.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 项目语义知识库编译准则
|
|
2
2
|
|
|
3
|
-
预置版本:1.
|
|
3
|
+
预置版本:1.3。导航分类版本:2.1。
|
|
4
4
|
|
|
5
5
|
## 总体要求
|
|
6
6
|
|
|
@@ -59,6 +59,12 @@
|
|
|
59
59
|
|
|
60
60
|
保留每张卡片的触发问题、适用范围、对象与回答粒度、必需参数、直接指向资产的条件分支、排除或不可互换的资产、停止条件,以及资产不可用、证据冲突或无匹配时的回退方式。不得将条件分支替换为统一的“首选资产、失败后备用资产”列表。缺失的路由或参数必须明确保留为缺口,不得编造。找到与对象、粒度、范围和时间匹配的最小权威证据集合后,停止扩展检索。当前数值、实体列表、趋势和明细结果必须通过已获授权的实时报表或查询执行获取。
|
|
61
61
|
|
|
62
|
+
分析召回卡按问法分支,把会改变答案的条件放在卡片开头,紧邻对应的证据链接。从来源定义分别说明显示名与实际计量对象、聚合方式、去重键、单位和统计范围;名称与计算不一致时并列保留,含义有歧义时给出需澄清的选择。其他体裁只保留与其用途有关的约束。
|
|
63
|
+
|
|
64
|
+
每个分支写清来源一行代表什么、答案一项代表什么,以及可直接回答、转换后回答、需澄清或证据不足中的适用结果。转换分支根据已核验的定义写明映射键、重叠或缺失覆盖、指标能否合并、时间对齐与操作顺序。只选择会影响本分支的条件;不能从同名字段推断等价或可加。将源卡已给出的操作和答前检查保留在该分支内,完整计算证据保留在资产详情。旧卡缺少说明时保留为待核对,不推定存在可执行转换。
|
|
65
|
+
|
|
66
|
+
把影响结论的限制写成可核验的动作:根据实际参数查覆盖窗口和状态时点,按原始单位、分母与精度区分真实零、取整零、缺行和被过滤行;调整条件后要求按相同口径重算比较双方。观察、原因解释和预测分别标明证据要求。证据不足时交付可支持的部分与具体缺口,代理值须明确含义及局限。只记录稳定方法及其来源,实际值和核验结果留到查询时取得。
|
|
67
|
+
|
|
62
68
|
## 页面元数据与来源追溯
|
|
63
69
|
|
|
64
70
|
每个 `wiki/**/*.md` 页面均以 YAML 元数据头开始,包含 `title`、`type`、`depth`、`related` 和 `source`;使用 ZIP 或 URL 证据时还须包含 `sourceId`。`type` 取值为 `overview`、`concept`、`guide`、`reference`、`synthesis` 或 `faq`;`depth` 取值为 `overview`、`detail` 或 `howto`;`summary` 为可选字段。使用真实的原始文件相对路径和真实父源文件身份,不得因存在来源字段就编造路径。正文中的来源引用使用纯文本路径,不使用指向原始文件的 Markdown 链接。Wiki 正文不得暴露凭据、宿主机路径或内部构建与调试标记。
|