@thinkingai/ae-cli 6.0.57 → 6.0.60
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 +10 -5
- package/README.zh.md +10 -5
- package/bin/ai-monitor.js +2 -0
- package/dist/ai-monitor-FCXSLHAP.js +32 -0
- package/dist/ai-monitor.js +135 -0
- package/dist/{auth-YEIJLBFY.js → auth-ATK2SLEV.js} +12 -11
- package/dist/{automation-NAR5DDGL.js → automation-FLCPFMN4.js} +5 -5
- package/dist/{capability-P7DD4Q73.js → capability-6KTSOI7L.js} +32 -36
- package/dist/{chunk-JCWM2TYP.js → chunk-2ETRY2CU.js} +16 -16
- package/dist/{chunk-IN7KKL6K.js → chunk-2F64AZYH.js} +1 -1
- package/dist/{chunk-JNVVJ273.js → chunk-4PSTYEG5.js} +5 -10
- package/dist/{chunk-QEMQKVHW.js → chunk-5E7MTTFN.js} +3 -3
- package/dist/{chunk-RJHGDWSC.js → chunk-5M5LBRR3.js} +2 -2
- package/dist/chunk-6M7ZEDT2.js +182 -0
- package/dist/{chunk-KPQY44JQ.js → chunk-AWW2T2WL.js} +3 -0
- package/dist/chunk-AXTO4FTM.js +1285 -0
- package/dist/{chunk-TKVVACEJ.js → chunk-BEYLCUZX.js} +17 -12
- package/dist/chunk-CF6JTT2U.js +64 -0
- package/dist/{chunk-N6XBLRB7.js → chunk-F2VFZUGG.js} +2 -2
- package/dist/{chunk-ZGIYG473.js → chunk-HSZAIPUX.js} +48 -13
- package/dist/{chunk-H3K5UGYC.js → chunk-HTZ2MLYA.js} +48 -22
- package/dist/{chunk-QZUVLFNR.js → chunk-HVMCPKOZ.js} +1 -1
- package/dist/{chunk-7JAVT5TK.js → chunk-KTJXD27G.js} +2 -2
- package/dist/{chunk-TULINOLS.js → chunk-LOR4IA26.js} +565 -315
- package/dist/{chunk-YVG6QD3V.js → chunk-P7QDCWJ6.js} +98 -7
- package/dist/{chunk-7ABK2PEJ.js → chunk-SDKW6LYE.js} +88 -36
- package/dist/{chunk-752BSLZC.js → chunk-VJUXKVRE.js} +1 -1
- package/dist/chunk-VRMGHQKE.js +556 -0
- package/dist/{compat-check-PMEGUPZU.js → compat-check-XD2U7PZ2.js} +3 -3
- package/dist/{config-VWVPR4WW.js → config-U3GDWU6E.js} +26 -13
- package/dist/{context-F6FCGTF3.js → context-YAQG6YQC.js} +3 -3
- package/dist/{data-integration-6UAZO4GG.js → data-integration-QE37EQ3A.js} +1 -1
- package/dist/{evaluation-4LO2O4AF.js → evaluation-2JSF4V47.js} +13 -158
- package/dist/index.js +87 -582
- package/dist/{memory-HHPX3NF2.js → memory-WEB27VI6.js} +8 -8
- package/dist/{metadata-HEQQEEG3.js → metadata-7FYE4234.js} +8 -8
- package/dist/{model-7UHGWYVR.js → model-T7H7Q6BG.js} +3 -3
- package/dist/{personal-semantic-preference-V4L6ZWR2.js → personal-semantic-preference-O6VXM74A.js} +7 -7
- package/dist/{project-semantic-NKHKJX6M.js → project-semantic-2GGFJWW6.js} +16 -14
- package/dist/{sync-ZJMXCRIN.js → sync-ULBB7WO5.js} +5 -5
- package/dist/{te-agent-WBKIFEQD.js → te-agent-6RMF7LUV.js} +6 -6
- package/dist/{te-analysis-ADX7RKO4.js → te-analysis-HSYC7GNV.js} +383 -194
- package/dist/{te-community-PREDRXG3.js → te-community-FLKZGQKB.js} +10 -10
- package/dist/{te-dataops-ITWJHO2U.js → te-dataops-OQQGTCUA.js} +5 -5
- package/dist/{te-engage-VE2NUH5V.js → te-engage-RIEBHL5T.js} +10 -10
- package/dist/{te-kb-WSMOW7WS.js → te-kb-4HG2FMHJ.js} +19 -10
- package/dist/{te-system-YM657FKO.js → te-system-AL4B4XZL.js} +3 -3
- package/dist/{te-team-T2WRLOOD.js → te-team-5O4UVUWE.js} +6 -6
- package/dist/{things-6QOMFXOG.js → things-TSJ64GBT.js} +6 -6
- package/dist/{update-I4MOUYOX.js → update-Q5LURAWV.js} +4 -4
- package/dist/{workspace-LYDAP647.js → workspace-FF2HXJGR.js} +5 -5
- package/package.json +8 -6
- 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 +10 -4
- 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_gateway_assets.md +2 -0
- 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 +38 -29
- 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_run_update.md +3 -1
- 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 +3 -1
- 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_list.md +2 -1
- 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 +9 -5
- 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 +9 -5
- package/skills/ae-kb/references/analysis-workflow.md +11 -2
- package/skills/ae-kb/references/query-workflow.md +9 -6
- package/skills/ae-kb/references/versions.md +1 -1
- package/skills/ae-kb-discovery/SKILL.md +15 -6
- 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/README.md
CHANGED
|
@@ -50,9 +50,9 @@ ae-cli auth status
|
|
|
50
50
|
|
|
51
51
|
Use the AE URL supplied by your AgenticEngine administrator. If no Host is configured, `ae-cli` guides existing customers to obtain that URL first. Only users without an AgenticEngine environment are directed to [request a trial](https://thinkingai.cn/request-demo).
|
|
52
52
|
|
|
53
|
-
Business-based command filtering and Skill selection apply only to local CLI use by external Agents; built-in TE Agent sandboxes keep the complete command and Skill sets. After successful login, the CLI filters `--help` and capability discovery by the active environment’s enabled businesses and synchronizes managed global Skills. Analysis remains available by default.
|
|
53
|
+
Business-based command filtering and Skill selection apply only to local CLI use by external Agents; built-in TE Agent sandboxes keep the complete command and Skill sets. After successful login, the CLI filters `--help` and capability discovery by the active environment’s enabled businesses and synchronizes managed global Skills. Analysis remains available by default. Subsequent normal commands automatically synchronize managed Skills when a configuration refresh detects business changes; run `ae-cli config refresh` to refresh and synchronize immediately. Switching the active environment refreshes its business state and synchronizes only affected Skills, reusing the current set when no changes are needed. Terminal output summarizes Skill synchronization status and installation/removal counts; use `--format json` for per-directory details. Switching accounts synchronizes again; a one-off `--host` query does not change global Skills.
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
When a business is explicitly disabled, the CLI uses the Skill business mapping to remove CLI-installed copies and their legacy client links, even if their contents were edited or their versions are older. Base and analysis Skills remain available. AI Monitor belongs to the Agent component and follows its availability. Older servers, missing states, and network failures do not trigger removal; unrecognized copies are preserved and reported. Start a new Agent session after synchronization; existing conversation context is retained.
|
|
56
56
|
|
|
57
57
|
## Environment-Bound Updates
|
|
58
58
|
|
|
@@ -67,7 +67,7 @@ Updates use the same global Skills installation and verification as `install`. O
|
|
|
67
67
|
|
|
68
68
|
Automatic synchronization runs during normal commands after login; host version checks are cached for up to one hour. `ae-cli update --host <AE_HOST>` checks immediately. After a downgrade, future updates run the older CLI's own updater, including its historical limitations. To use the new installer logic while following an older host, run `npx @thinkingai/ae-cli@latest update --host <AE_HOST>`; the target remains the host-required version.
|
|
69
69
|
|
|
70
|
-
`ae-cli update` installs the exact version required by the active host rather than npm `latest`. Skills are synchronized from the verified target package
|
|
70
|
+
`ae-cli update` installs the exact version required by the active host rather than npm `latest`. Skills are synchronized from the verified target package. Installation and updates preserve and report user-edited or unrecognized copies; explicitly disabled businesses still remove CLI-installed copies as described above.
|
|
71
71
|
|
|
72
72
|
Starting with the `6.0.37` and `6.1.9` release lines, ordinary business commands can automatically upgrade or downgrade the CLI to the host-required version, including switching from `6.0.x` to `6.1.x`. Automatic synchronization requires stable `major.minor.patch` versions at both ends; development and other nonstandard versions are skipped. After successful synchronization, the new CLI automatically executes the original command once and returns its result and exit code. Arguments, piped input, working directory, and confirmation behavior are preserved. If the new CLI cannot start, `AE_CLI_VERSION_SYNCED` asks you to re-run manually; an executed command is never retried automatically. Installation failures are reported without replacing the business command's JSON output.
|
|
73
73
|
|
|
@@ -108,7 +108,7 @@ ae-cli capability dry-run analysis.dashboard.list --input '{"project_id":1}'
|
|
|
108
108
|
ae-cli capability run analysis.dashboard.list --input '{"project_id":1}'
|
|
109
109
|
|
|
110
110
|
# Filter structured output
|
|
111
|
-
ae-cli capability list --domain analysis --jq '.
|
|
111
|
+
ae-cli capability list --domain analysis --jq '.capabilities[] | .id'
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
## Command Map
|
|
@@ -124,7 +124,8 @@ The table covers every current root command individually. Use `ae-cli --help` fo
|
|
|
124
124
|
| Analysis and projects | `project` | Project information, members, roles, permissions, entities, time zones, and handover settings |
|
|
125
125
|
| Analysis and projects | `metadata` | Capability-backed data-table, property, and dimension-table binding operations |
|
|
126
126
|
| Analysis and projects | `personal-semantic-preference` | Project-scoped lightweight semantic preferences for the current user |
|
|
127
|
-
| Analysis and projects | `project-semantic` |
|
|
127
|
+
| Analysis and projects | `project-semantic` | Asset-package export for building a project knowledge base |
|
|
128
|
+
| Observability | `ai-monitor` | Read traces, conversations, Bad Traces, metrics, cost, security and existing diagnosis reports; export verified ZIPs ([guide](skills/ae-ai-monitor/SKILL.md)) |
|
|
128
129
|
| Data and tracking | `tracking` | Tracking plans, SDK samples, checks, ingestion diagnostics, code generation, and bundled wiki |
|
|
129
130
|
| Data and tracking | `data-integration` | Inspect, plan, convert, upload, hand off, and reuse local CSV/JSON/Excel data |
|
|
130
131
|
| Community insights | `community` | Community posts, comments, topics, sentiment, livestream, and report workflows |
|
|
@@ -162,6 +163,8 @@ The table covers every current root command individually. Use `ae-cli --help` fo
|
|
|
162
163
|
|
|
163
164
|
Review collected analysis questions with `ae-cli analysis scenario list --project-id 1 --days 7`. The `ae-analysis` Skill can deduplicate questions and assess badcases with concise, evidence-based reasons. See the [scenario review guide](skills/ae-analysis/references/scenario_list.md). Answers can include elapsed time; use `ae-cli analysis scenario get --help` to query linked command execution details.
|
|
164
165
|
|
|
166
|
+
To save and review Bad Cases, use `ae-cli analysis bad-case --help`. The Agent semantically deduplicates each batch against all historical states. Review in CLI or explicitly submit to the page; each batch reports discovered, duplicate, and new counts. Notes are optional. Approval adds the case to the bound AE dataset; revoking approval removes it. See the [Bad Case workflow](skills/ae-analysis/references/bad_case_review.md).
|
|
167
|
+
|
|
165
168
|
Evaluation commands follow the current AE Host in personal terminals and sandboxes; use `--host` to select another host. Evaluation requests use the HTTP or HTTPS scheme configured for that AE Host, consistent with other AE commands. Legacy `--endpoint` and `AE_EVAL_BASE_URL` values may only match the current AE Host; other values fail before credentials are sent. Remove these settings and use `--host` to select a host. Outside a sandbox, export `AE_EVAL_ACCESS_TOKEN` with a platform session token; sandboxes can obtain a session automatically. See [endpoint and authentication rules](skills/ae-evaluation/SKILL.md#endpoint-and-authentication).
|
|
166
169
|
|
|
167
170
|
## Capability Gateway
|
|
@@ -262,6 +265,7 @@ Commands return a stable envelope:
|
|
|
262
265
|
- `--format json` is the default and is recommended for Agents.
|
|
263
266
|
- `--format table` is available for supported human-facing list commands.
|
|
264
267
|
- `--jq <expr>` applies jq 1.8 filtering to the business payload before the output envelope is printed.
|
|
268
|
+
- The jq input is the command payload, not the outer `{ok,data,meta}` envelope. Use `.capabilities[] | .id` inside the CLI; use `.data.capabilities[]` only with an external jq over saved final JSON.
|
|
265
269
|
- `--validate` normalizes Capability Gateway input without business execution.
|
|
266
270
|
- `--dry-run` previews an operation without executing its business logic.
|
|
267
271
|
- `--yes` skips interactive confirmation for explicitly marked high-risk writes.
|
|
@@ -288,6 +292,7 @@ ae-cli kb +rm-source --name engineering-handbook --scope company --display-name
|
|
|
288
292
|
ae-cli kb +schema --name engineering-handbook --scope company --model <model-ref>
|
|
289
293
|
ae-cli kb +compile --name engineering-handbook --scope company --model <model-ref>
|
|
290
294
|
ae-cli kb +status --name engineering-handbook --scope company
|
|
295
|
+
ae-cli kb +status --name engineering-handbook --scope company --run-id <compile-run-id>
|
|
291
296
|
ae-cli kb +ask -q "How is the sandbox configured?"
|
|
292
297
|
# Submit only, poll later:
|
|
293
298
|
ae-cli kb +ask -q "Another question" --no-wait
|
package/README.zh.md
CHANGED
|
@@ -54,9 +54,9 @@ ae-cli auth status
|
|
|
54
54
|
|
|
55
55
|
请使用 AgenticEngine 管理员提供的 AE 地址。未配置 Host 时,`ae-cli` 会先引导已有客户向管理员获取地址;只有确认尚无 AgenticEngine 环境的用户,才会看到[申请试用](https://thinkingai.cn/request-demo)入口。
|
|
56
56
|
|
|
57
|
-
按业务过滤命令和剪裁 Skills 仅适用于外部 Agent 使用的本机 CLI;TE Agent 内置沙箱始终保留完整命令与全部 Skills。登录成功后,CLI 按当前环境已开通的业务过滤 `--help` 和能力发现,并同步受管的全局 Skills
|
|
57
|
+
按业务过滤命令和剪裁 Skills 仅适用于外部 Agent 使用的本机 CLI;TE Agent 内置沙箱始终保留完整命令与全部 Skills。登录成功后,CLI 按当前环境已开通的业务过滤 `--help` 和能力发现,并同步受管的全局 Skills;分析能力默认保留。后续业务开通状态变化时,普通命令会在刷新配置后自动同步受管 Skills;也可执行 `ae-cli config refresh` 立即刷新并同步。切换活动环境会刷新业务状态,仅同步受影响的 Skills;无需变化时复用当前集合,终端仅汇总 Skill 同步状态及安装、移除数量;需要目录明细时使用 `--format json`。切换账号会重新同步;单次 `--host` 查询不改变全局 Skills。
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
业务明确关闭时,CLI 会按 Skill 业务映射移除由 CLI 安装的副本及对应客户端历史链接,即使内容已被用户修改或版本落后;基础和分析 Skills 始终保留;AI Monitor 属于 Agent 组件,随该组件的开通状态提供。旧服务端、缺失状态或网络失败不会触发删除,来源不明的副本也会保留并报告。同步后请新开 Agent 会话,已有会话的上下文不会被撤回。
|
|
60
60
|
|
|
61
61
|
## 环境版本同步
|
|
62
62
|
|
|
@@ -71,7 +71,7 @@ ae-cli update --dry-run
|
|
|
71
71
|
|
|
72
72
|
自动同步在登录后的普通命令中触发,集群版本检查最长缓存 1 小时;`ae-cli update --host <AE_HOST>` 可立即查询。降级后,后续更新由旧版 CLI 自身执行,也受旧版实现限制。需要用新安装逻辑匹配旧集群时,可运行 `npx @thinkingai/ae-cli@latest update --host <AE_HOST>`,目标仍是集群要求的版本。
|
|
73
73
|
|
|
74
|
-
`ae-cli update` 安装当前 Host 要求的精确版本,不依赖 npm `latest`。Skills
|
|
74
|
+
`ae-cli update` 安装当前 Host 要求的精确版本,不依赖 npm `latest`。Skills 从已验证的目标包同步。安装或更新时,用户修改或来源不明的副本会保留并报告;业务明确关闭时,仍按上述规则移除由 CLI 安装的副本。
|
|
75
75
|
|
|
76
76
|
从 `6.0.37` 和 `6.1.9` 维护线开始,普通业务命令可以自动升级或降级到环境要求的版本,包括从 `6.0.x` 切换到 `6.1.x`。自动同步要求本地和目标均为 `主版本.次版本.补丁号` 格式的正式版本,开发版等不规则版本会跳过。同步成功后,新版 CLI 会自动执行原命令一次,并返回该命令的结果和退出码;参数、管道输入、工作目录和确认行为保持不变。如果新版 CLI 无法启动,会返回 `AE_CLI_VERSION_SYNCED` 并提示手动重跑;已经执行的命令不会自动重试。安装失败会给出提示,但不会用安装输出污染业务命令的 JSON 结果。
|
|
77
77
|
|
|
@@ -112,7 +112,7 @@ ae-cli capability dry-run analysis.dashboard.list --input '{"project_id":1}'
|
|
|
112
112
|
ae-cli capability run analysis.dashboard.list --input '{"project_id":1}'
|
|
113
113
|
|
|
114
114
|
# 筛选结构化输出
|
|
115
|
-
ae-cli capability list --domain analysis --jq '.
|
|
115
|
+
ae-cli capability list --domain analysis --jq '.capabilities[] | .id'
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
## 命令地图
|
|
@@ -128,7 +128,8 @@ ae-cli capability list --domain analysis --jq '.data.capabilities[] | .id'
|
|
|
128
128
|
| 分析与项目 | `project` | 项目信息、成员、角色、权限、实体、时区和交接配置 |
|
|
129
129
|
| 分析与项目 | `metadata` | 基于 Capability Gateway 的数据表、属性及维度表绑定 |
|
|
130
130
|
| 分析与项目 | `personal-semantic-preference` | 当前用户按项目维护轻量个人语义偏好 |
|
|
131
|
-
| 分析与项目 | `project-semantic` |
|
|
131
|
+
| 分析与项目 | `project-semantic` | 导出构建项目知识库所需的资产包 |
|
|
132
|
+
| 可观测性 | `ai-monitor` | 查询 Trace、会话、Bad Trace、指标、成本、安全与已有诊断报告,导出校验后的 ZIP([指南](skills/ae-ai-monitor/SKILL.md)) |
|
|
132
133
|
| 数据与埋点 | `tracking` | 埋点方案、SDK 示例、检查、采集诊断、代码生成和内置 Wiki |
|
|
133
134
|
| 数据与埋点 | `data-integration` | 检查、规划、转换、上传、交接和复用本地 CSV/JSON/Excel 数据 |
|
|
134
135
|
| 社区洞察 | `community` | 社区帖子、评论、话题、情感、直播和报告工作流 |
|
|
@@ -166,6 +167,8 @@ ae-cli capability list --domain analysis --jq '.data.capabilities[] | .id'
|
|
|
166
167
|
|
|
167
168
|
使用 `ae-cli analysis scenario list --project-id 1 --days 7` 查询已采集的分析问题,由 `ae-analysis` Skill 指导 Agent 去重、判断 badcase 并简要说明原因和证据。详见[分析问题复盘指南](skills/ae-analysis/references/scenario_list.md)。 回答可附带耗时;使用 `ae-cli analysis scenario get --help` 查看关联命令执行明细的查询方式。
|
|
168
169
|
|
|
170
|
+
需保存并审核 Bad Case 时,使用 `ae-cli analysis bad-case --help`。Agent 按语义对同批及所有历史状态去重;CLI 可直接审核,也可显式提交页面。每批汇报发现、重复、新增数量,补充说明选填。认证后将案例加入已绑定的 AE 评测集,取消认证后移除。详见[Bad Case 工作流](skills/ae-analysis/references/bad_case_review.md)。
|
|
171
|
+
|
|
169
172
|
评测命令在普通终端和沙箱中均跟随当前 AE Host,可通过 `--host` 切换。评测请求沿用该 AE Host 配置的 HTTP 或 HTTPS 协议,与其他 AE 命令一致。旧 `--endpoint` 和 `AE_EVAL_BASE_URL` 只能与当前 AE Host 一致,其他值会在发送凭证前报错;请移除这些配置,统一使用 `--host` 切换。沙箱外需设置 `AE_EVAL_ACCESS_TOKEN` 平台 session token,沙箱内可自动获取会话。详见 [地址与鉴权规则](skills/ae-evaluation/SKILL.md#endpoint-and-authentication)。
|
|
170
173
|
|
|
171
174
|
## Capability Gateway
|
|
@@ -266,6 +269,7 @@ Token 文件是只读 JSON 对象:`{"url":"https://host-a.example.com","token"
|
|
|
266
269
|
- 默认使用 `--format json`,推荐 Agent 使用。
|
|
267
270
|
- 支持的人工列表命令可使用 `--format table`。
|
|
268
271
|
- `--jq <expr>` 使用 jq 1.8 筛选业务结果,再输出统一信封。
|
|
272
|
+
- CLI 内置 jq 的输入是业务结果,不是外层 `{ok,data,meta}` 信封。CLI 内使用 `.capabilities[] | .id`;只有对最终保存的 JSON 执行外部 jq 时才使用 `.data.capabilities[]`。
|
|
269
273
|
- `--validate` 仅规范化 Capability Gateway 参数,不执行业务逻辑。
|
|
270
274
|
- `--dry-run` 预览操作,不执行业务逻辑。
|
|
271
275
|
- `--yes` 跳过明确标记为高风险写操作的交互确认。
|
|
@@ -292,6 +296,7 @@ ae-cli kb +rm-source --name engineering-handbook --scope company --display-name
|
|
|
292
296
|
ae-cli kb +schema --name engineering-handbook --scope company --model <model-ref>
|
|
293
297
|
ae-cli kb +compile --name engineering-handbook --scope company --model <model-ref>
|
|
294
298
|
ae-cli kb +status --name engineering-handbook --scope company
|
|
299
|
+
ae-cli kb +status --name engineering-handbook --scope company --run-id <compile-run-id>
|
|
295
300
|
ae-cli kb +ask -q "如何配置沙盒?"
|
|
296
301
|
# 仅提交,后续轮询:
|
|
297
302
|
ae-cli kb +ask -q "另一个问题" --no-wait
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
ai_monitor_default,
|
|
4
|
+
conversationCount,
|
|
5
|
+
conversationGet,
|
|
6
|
+
conversationList,
|
|
7
|
+
platformList,
|
|
8
|
+
readCommands,
|
|
9
|
+
traceCount,
|
|
10
|
+
traceGet,
|
|
11
|
+
traceList
|
|
12
|
+
} from "./chunk-AXTO4FTM.js";
|
|
13
|
+
import "./chunk-BEYLCUZX.js";
|
|
14
|
+
import "./chunk-AWW2T2WL.js";
|
|
15
|
+
import "./chunk-VJUXKVRE.js";
|
|
16
|
+
import "./chunk-2ETRY2CU.js";
|
|
17
|
+
import "./chunk-Y74WTIKJ.js";
|
|
18
|
+
import "./chunk-LOR4IA26.js";
|
|
19
|
+
import "./chunk-HTZ2MLYA.js";
|
|
20
|
+
import "./chunk-4PSTYEG5.js";
|
|
21
|
+
import "./chunk-Z3Q2AEIN.js";
|
|
22
|
+
export {
|
|
23
|
+
conversationCount,
|
|
24
|
+
conversationGet,
|
|
25
|
+
conversationList,
|
|
26
|
+
ai_monitor_default as default,
|
|
27
|
+
platformList,
|
|
28
|
+
readCommands,
|
|
29
|
+
traceCount,
|
|
30
|
+
traceGet,
|
|
31
|
+
traceList
|
|
32
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
configureBusinessCommands,
|
|
4
|
+
parseProgram,
|
|
5
|
+
runCommand
|
|
6
|
+
} from "./chunk-VRMGHQKE.js";
|
|
7
|
+
import "./chunk-CF6JTT2U.js";
|
|
8
|
+
import "./chunk-5M5LBRR3.js";
|
|
9
|
+
import {
|
|
10
|
+
ai_monitor_default
|
|
11
|
+
} from "./chunk-AXTO4FTM.js";
|
|
12
|
+
import "./chunk-P7QDCWJ6.js";
|
|
13
|
+
import "./chunk-BEYLCUZX.js";
|
|
14
|
+
import "./chunk-AWW2T2WL.js";
|
|
15
|
+
import "./chunk-VJUXKVRE.js";
|
|
16
|
+
import "./chunk-2ETRY2CU.js";
|
|
17
|
+
import "./chunk-Y74WTIKJ.js";
|
|
18
|
+
import "./chunk-LOR4IA26.js";
|
|
19
|
+
import "./chunk-HTZ2MLYA.js";
|
|
20
|
+
import "./chunk-4PSTYEG5.js";
|
|
21
|
+
import {
|
|
22
|
+
readExternalCliToken,
|
|
23
|
+
setExternalCliTokenFile
|
|
24
|
+
} from "./chunk-Z3Q2AEIN.js";
|
|
25
|
+
|
|
26
|
+
// src/ai-monitor.ts
|
|
27
|
+
import { Command as CommanderCommand, Option } from "commander";
|
|
28
|
+
import { createRequire } from "module";
|
|
29
|
+
|
|
30
|
+
// src/commands/ai-monitor/register.ts
|
|
31
|
+
function registerStandaloneAiMonitorCommands(program2, commands) {
|
|
32
|
+
for (const command of commands) {
|
|
33
|
+
let parent = program2;
|
|
34
|
+
for (const resource of (command.resource || "").split(/\s+/).filter(Boolean)) {
|
|
35
|
+
let resourceCommand = parent.commands.find((candidate) => candidate.name() === resource);
|
|
36
|
+
if (!resourceCommand) {
|
|
37
|
+
resourceCommand = parent.command(resource).description(`${resource} commands`);
|
|
38
|
+
resourceCommand.allowExcessArguments(false);
|
|
39
|
+
}
|
|
40
|
+
parent = resourceCommand;
|
|
41
|
+
}
|
|
42
|
+
const actionCommand = parent.command(command.command, { hidden: command.hidden === true }).description(command.description);
|
|
43
|
+
for (const flag of command.flags) {
|
|
44
|
+
const declaration = flagDeclaration(flag);
|
|
45
|
+
if (flag.variadic) {
|
|
46
|
+
actionCommand.option(declaration, flag.desc, collectVariadic, []);
|
|
47
|
+
} else if (flag.type === "boolean") {
|
|
48
|
+
actionCommand.option(
|
|
49
|
+
declaration,
|
|
50
|
+
flag.desc,
|
|
51
|
+
(value) => parseBooleanValue(value)
|
|
52
|
+
);
|
|
53
|
+
} else if (flag.default !== void 0) {
|
|
54
|
+
actionCommand.option(declaration, flag.desc, String(flag.default));
|
|
55
|
+
} else {
|
|
56
|
+
actionCommand.option(declaration, flag.desc);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (command.usesAeHost !== false) {
|
|
60
|
+
actionCommand.option("--host <url>", "Override active AE host URL for this command");
|
|
61
|
+
}
|
|
62
|
+
actionCommand.option("--format <format>", "Output format: json | table. Default: json.");
|
|
63
|
+
actionCommand.option("--jq <expr>", "jq 1.8 filter over command payload, applied before output envelope wrapping.");
|
|
64
|
+
if (command.helpText) {
|
|
65
|
+
actionCommand.addHelpText("after", `
|
|
66
|
+
${command.helpText}
|
|
67
|
+
`);
|
|
68
|
+
}
|
|
69
|
+
actionCommand.action(async (options) => {
|
|
70
|
+
const globalOptions = standaloneGlobalOptions(program2, options);
|
|
71
|
+
await runCommand(command, options, globalOptions);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function flagDeclaration(flag) {
|
|
76
|
+
const long = `--${flag.name}`;
|
|
77
|
+
const short = flag.alias ? `-${flag.alias}, ` : "";
|
|
78
|
+
return flag.type === "boolean" ? `${short}${long} [value]` : `${short}${long} <value>`;
|
|
79
|
+
}
|
|
80
|
+
function collectVariadic(value, previous) {
|
|
81
|
+
return (previous ?? []).concat(value);
|
|
82
|
+
}
|
|
83
|
+
function parseBooleanValue(value) {
|
|
84
|
+
if (value === void 0) return true;
|
|
85
|
+
const normalized = value.toLowerCase();
|
|
86
|
+
if (["true", "1", "yes", "y", "on"].includes(normalized)) return true;
|
|
87
|
+
if (["false", "0", "no", "n", "off"].includes(normalized)) return false;
|
|
88
|
+
return value;
|
|
89
|
+
}
|
|
90
|
+
function standaloneGlobalOptions(program2, localOptions) {
|
|
91
|
+
const root = program2.opts();
|
|
92
|
+
return {
|
|
93
|
+
host: typeof localOptions.host === "string" ? localOptions.host : root.host,
|
|
94
|
+
mcpUrl: root.mcpUrl,
|
|
95
|
+
format: (typeof localOptions.format === "string" ? localOptions.format : root.format) || "json",
|
|
96
|
+
jq: typeof localOptions.jq === "string" ? localOptions.jq : root.jq,
|
|
97
|
+
validate: root.validate || false,
|
|
98
|
+
dryRun: root.dryRun || false,
|
|
99
|
+
yes: root.yes || false
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// src/ai-monitor.ts
|
|
104
|
+
var require2 = createRequire(import.meta.url);
|
|
105
|
+
var { version } = require2("../package.json");
|
|
106
|
+
var program = new CommanderCommand();
|
|
107
|
+
program.name("ai-monitor").version(version).description("AI Monitor read commands provided by @tant/ae-cli").option("--host <url>", "Override active AE host URL").option("--cli-token-file <path>", "Use a read-only JSON CLI token file containing url and token for this invocation").option("--format <format>", "Output format: json | table", "json").option("--jq <expr>", "jq 1.8 filter over command payload").option("--validate", "Validate and normalize capability input without executing it", false).option("--dry-run", "Validate authentication, permission, and data scope without executing the read capability", false).option("--yes", "Skip confirmation for high-risk write operations", false);
|
|
108
|
+
program.addOption(
|
|
109
|
+
new Option("--agent-context <base64url-json>", "Internal agent context payload for gateway telemetry").hideHelp()
|
|
110
|
+
);
|
|
111
|
+
program.hook("preAction", (_root, actionCommand) => {
|
|
112
|
+
const rootOptions = program.opts();
|
|
113
|
+
setExternalCliTokenFile(rootOptions.cliTokenFile);
|
|
114
|
+
readExternalCliToken(actionCommand.opts().host ?? rootOptions.host);
|
|
115
|
+
});
|
|
116
|
+
registerStandaloneAiMonitorCommands(program, ai_monitor_default);
|
|
117
|
+
var args = process.argv.slice(2);
|
|
118
|
+
setExternalCliTokenFile(globalOptionValue(args, "--cli-token-file"));
|
|
119
|
+
configureBusinessCommands(program, { commandPrefix: ["ai-monitor"], hostOverride: globalOptionValue(args, "--host") });
|
|
120
|
+
await parseProgram(program);
|
|
121
|
+
function globalOptionValue(args2, name) {
|
|
122
|
+
let value;
|
|
123
|
+
for (let index = 0; index < args2.length; index++) {
|
|
124
|
+
const token = args2[index];
|
|
125
|
+
if (token === "--") break;
|
|
126
|
+
const option = program.options.find((candidate) => candidate.long === token || candidate.short === token);
|
|
127
|
+
if (option?.required) {
|
|
128
|
+
const next = args2[index + 1];
|
|
129
|
+
if (next === void 0) break;
|
|
130
|
+
if (token === name) value = next;
|
|
131
|
+
index++;
|
|
132
|
+
} else if (token.startsWith(`${name}=`)) value = token.slice(name.length + 1);
|
|
133
|
+
}
|
|
134
|
+
return value;
|
|
135
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
+
environmentRefreshOutput,
|
|
3
4
|
invalidateBusinessSkillSynchronization,
|
|
4
5
|
refreshEnvironmentAfterLogin
|
|
5
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HSZAIPUX.js";
|
|
6
7
|
import {
|
|
7
8
|
MultiselectCancelled,
|
|
8
9
|
promptSingleSelect
|
|
@@ -13,15 +14,15 @@ import {
|
|
|
13
14
|
} from "./chunk-6ZIQV5GW.js";
|
|
14
15
|
import {
|
|
15
16
|
resolveHost
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-2F64AZYH.js";
|
|
17
18
|
import {
|
|
18
19
|
printError,
|
|
19
20
|
printOutput
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-VJUXKVRE.js";
|
|
21
22
|
import {
|
|
22
23
|
getLocalCliPackageInfo,
|
|
23
24
|
runHostCompatCheck
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-LOR4IA26.js";
|
|
25
26
|
import {
|
|
26
27
|
CliTokenValidationUnavailableError,
|
|
27
28
|
CredentialStoreUnreadableError,
|
|
@@ -37,12 +38,12 @@ import {
|
|
|
37
38
|
saveCredential,
|
|
38
39
|
updateCredentialMetadata,
|
|
39
40
|
validateCliTokenOnServer
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-HTZ2MLYA.js";
|
|
41
42
|
import {
|
|
42
43
|
getFallbackCliToken,
|
|
43
44
|
loadConfig,
|
|
44
45
|
saveConfig
|
|
45
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-4PSTYEG5.js";
|
|
46
47
|
import {
|
|
47
48
|
ExternalCliTokenError,
|
|
48
49
|
PermissionError,
|
|
@@ -443,7 +444,7 @@ async function switchActiveAccount(program, opts) {
|
|
|
443
444
|
host,
|
|
444
445
|
active: true,
|
|
445
446
|
account: accountOutput(selected.account),
|
|
446
|
-
...environment ? { environment } : {}
|
|
447
|
+
...environment ? { environment: environmentRefreshOutput(program, environment) } : {}
|
|
447
448
|
}, program.opts().format || "json");
|
|
448
449
|
} catch (error) {
|
|
449
450
|
if (error instanceof CredentialStoreUnreadableError) throw error;
|
|
@@ -566,7 +567,7 @@ function registerAuth(program) {
|
|
|
566
567
|
activateHostAfterLogin(host, explicitHost);
|
|
567
568
|
const environment2 = await refreshEnvironmentAfterLogin(host);
|
|
568
569
|
emit("Login successful! CLI token saved securely.");
|
|
569
|
-
await printOutput({ ...loginSummary(host, saved2), ...environment2 ? { environment: environment2 } : {} }, format);
|
|
570
|
+
await printOutput({ ...loginSummary(host, saved2), ...environment2 ? { environment: environmentRefreshOutput(program, environment2) } : {} }, format);
|
|
570
571
|
return;
|
|
571
572
|
}
|
|
572
573
|
if (opts.wait === false) {
|
|
@@ -587,7 +588,7 @@ function registerAuth(program) {
|
|
|
587
588
|
activateHostAfterLogin(host, explicitHost);
|
|
588
589
|
const environment = await refreshEnvironmentAfterLogin(host);
|
|
589
590
|
emit("Login successful! CLI token saved securely.");
|
|
590
|
-
await printOutput({ ...loginSummary(host, saved), ...environment ? { environment } : {} }, format);
|
|
591
|
+
await printOutput({ ...loginSummary(host, saved), ...environment ? { environment: environmentRefreshOutput(program, environment) } : {} }, format);
|
|
591
592
|
} catch (error) {
|
|
592
593
|
if (error instanceof CredentialStoreUnreadableError) throw error;
|
|
593
594
|
if (error instanceof DeviceFlowUnsupportedError) {
|
|
@@ -633,7 +634,7 @@ function registerAuth(program) {
|
|
|
633
634
|
const environment = await refreshEnvironmentAfterLogin(host);
|
|
634
635
|
process.stderr.write(`[ae-cli] CLI token verified and saved securely for ${host}
|
|
635
636
|
`);
|
|
636
|
-
await printOutput({ ...manualTokenSummary(host, saved), ...environment ? { environment } : {} }, program.opts().format || "json");
|
|
637
|
+
await printOutput({ ...manualTokenSummary(host, saved), ...environment ? { environment: environmentRefreshOutput(program, environment) } : {} }, program.opts().format || "json");
|
|
637
638
|
} catch (error) {
|
|
638
639
|
if (error instanceof CredentialStoreUnreadableError) throw error;
|
|
639
640
|
if (error instanceof PermissionError) {
|
|
@@ -759,7 +760,7 @@ function registerAuth(program) {
|
|
|
759
760
|
host,
|
|
760
761
|
remaining_accounts: listCredentials(host).length,
|
|
761
762
|
...result.active?.account ? { active_account: accountOutput(result.active.account) } : {},
|
|
762
|
-
...environment ? { environment } : {}
|
|
763
|
+
...environment ? { environment: environmentRefreshOutput(program, environment) } : {}
|
|
763
764
|
}, program.opts().format || "json");
|
|
764
765
|
});
|
|
765
766
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
resolveWorkspaceTarget
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KTJXD27G.js";
|
|
5
5
|
import {
|
|
6
6
|
currentAgentSpaceId
|
|
7
7
|
} from "./chunk-RK6GLDGI.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-F2VFZUGG.js";
|
|
9
9
|
import {
|
|
10
10
|
TeAgentApiError,
|
|
11
11
|
deleteFromMainApp,
|
|
12
12
|
getFromMainApp,
|
|
13
13
|
patchToMainApp,
|
|
14
14
|
postToMainApp
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5M5LBRR3.js";
|
|
16
16
|
import "./chunk-Y74WTIKJ.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-HTZ2MLYA.js";
|
|
18
|
+
import "./chunk-4PSTYEG5.js";
|
|
19
19
|
import "./chunk-Z3Q2AEIN.js";
|
|
20
20
|
|
|
21
21
|
// src/commands/automation/index.ts
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
+
resolveHost
|
|
4
|
+
} from "./chunk-2F64AZYH.js";
|
|
5
|
+
import {
|
|
6
|
+
confirmHighRiskWrite,
|
|
3
7
|
normalizeRiskLevel,
|
|
4
8
|
requiresConfirmation
|
|
5
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CF6JTT2U.js";
|
|
6
10
|
import {
|
|
7
11
|
findGatewayDomain,
|
|
8
12
|
listCapabilityDiscoveryPrefixes,
|
|
9
13
|
listRegisteredCapabilityDomains,
|
|
10
14
|
resolveGatewayDomain
|
|
11
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AWW2T2WL.js";
|
|
16
|
+
import {
|
|
17
|
+
printError,
|
|
18
|
+
printOutput,
|
|
19
|
+
withOutputMetadata
|
|
20
|
+
} from "./chunk-VJUXKVRE.js";
|
|
12
21
|
import {
|
|
13
22
|
CapabilityGatewayError,
|
|
14
23
|
dryRunCapabilityWithEnvelope,
|
|
@@ -17,38 +26,27 @@ import {
|
|
|
17
26
|
inspectCapabilityWithEnvelope,
|
|
18
27
|
listCapabilitiesWithEnvelope,
|
|
19
28
|
validateCapabilityWithEnvelope
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import {
|
|
22
|
-
resolveHost
|
|
23
|
-
} from "./chunk-IN7KKL6K.js";
|
|
24
|
-
import {
|
|
25
|
-
printError,
|
|
26
|
-
printOutput,
|
|
27
|
-
withOutputMetadata
|
|
28
|
-
} from "./chunk-752BSLZC.js";
|
|
29
|
+
} from "./chunk-2ETRY2CU.js";
|
|
29
30
|
import "./chunk-Y74WTIKJ.js";
|
|
30
31
|
import {
|
|
31
32
|
assertBusinessEnabled,
|
|
32
33
|
businessForCapability,
|
|
33
34
|
readBusinessConfigForExecution,
|
|
34
35
|
readCurrentBusinessConfig
|
|
35
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-LOR4IA26.js";
|
|
36
37
|
import {
|
|
37
38
|
CredentialStoreUnreadableError,
|
|
38
39
|
SecureStoreAuthError
|
|
39
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-HTZ2MLYA.js";
|
|
40
41
|
import {
|
|
41
42
|
parseJsonRequest
|
|
42
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-4PSTYEG5.js";
|
|
43
44
|
import {
|
|
44
45
|
CliValidationError,
|
|
45
46
|
ExternalCliTokenError,
|
|
46
47
|
PermissionError
|
|
47
48
|
} from "./chunk-Z3Q2AEIN.js";
|
|
48
49
|
|
|
49
|
-
// src/commands/capability/index.ts
|
|
50
|
-
import * as readline from "readline";
|
|
51
|
-
|
|
52
50
|
// src/commands/capability/helpers.ts
|
|
53
51
|
import { readFileSync } from "fs";
|
|
54
52
|
var CapabilityCommandValidationError = class extends Error {
|
|
@@ -212,7 +210,7 @@ function registerCapability(program) {
|
|
|
212
210
|
capability.command("list").description("List capability summaries in a domain").requiredOption("--domain <domain>", "Capability namespace, such as analysis or metadata").option("--project-id <project-id>", "Filter by project membership, permissions, and enabled features").action(async (opts) => {
|
|
213
211
|
await executeAndPrint(program, async (host) => {
|
|
214
212
|
const business = businessForCapability(opts.domain);
|
|
215
|
-
const businesses = business ? await readBusinessConfigForExecution(host) : readCurrentBusinessConfig(host);
|
|
213
|
+
const businesses = business ? await readBusinessConfigForExecution(host, !program.opts().host) : readCurrentBusinessConfig(host);
|
|
216
214
|
const gatewayDomain = resolveCapabilityListDomain(opts.domain, businesses);
|
|
217
215
|
const projectId = parseOptionalProjectId(opts.projectId);
|
|
218
216
|
if (business && businesses[business] === false) {
|
|
@@ -236,7 +234,7 @@ function registerCapability(program) {
|
|
|
236
234
|
capability.command("search").description("Search capability IDs and descriptions in a domain").argument("<query>", "Case-insensitive search terms").requiredOption("--domain <domain>", "Capability namespace, such as analysis or metadata").option("--project-id <project-id>", "Filter by project membership, permissions, and enabled features").action(async (query, opts) => {
|
|
237
235
|
await executeAndPrint(program, async (host) => {
|
|
238
236
|
const business = businessForCapability(opts.domain);
|
|
239
|
-
const businesses = business ? await readBusinessConfigForExecution(host) : readCurrentBusinessConfig(host);
|
|
237
|
+
const businesses = business ? await readBusinessConfigForExecution(host, !program.opts().host) : readCurrentBusinessConfig(host);
|
|
240
238
|
const gatewayDomain = resolveCapabilityListDomain(opts.domain, businesses);
|
|
241
239
|
const projectId = parseOptionalProjectId(opts.projectId);
|
|
242
240
|
if (business && businesses[business] === false) {
|
|
@@ -261,7 +259,7 @@ function registerCapability(program) {
|
|
|
261
259
|
capability.command("inspect").description("Inspect one capability schema, risk, auth, and output metadata").argument("<capability-id>", "Capability ID, such as analysis.report.list").option("--domain <domain>", "Override the capability namespace used for gateway routing").option("--project-id <project-id>", "Check availability in a project before returning metadata").action(async (capabilityId, opts) => {
|
|
262
260
|
await executeAndPrint(program, async (host) => {
|
|
263
261
|
assertCapabilityIsNotRetired(capabilityId);
|
|
264
|
-
await assertCapabilityBusinessEnabled(capabilityId, host);
|
|
262
|
+
await assertCapabilityBusinessEnabled(capabilityId, host, program.opts().host);
|
|
265
263
|
const gatewayDomain = resolveCapabilityGatewayDomain(capabilityId, opts.domain);
|
|
266
264
|
return gatewayOutput(await inspectCapabilityWithEnvelope(host, gatewayDomain, capabilityId, parseOptionalProjectId(opts.projectId)), host);
|
|
267
265
|
});
|
|
@@ -274,7 +272,7 @@ function registerCapability(program) {
|
|
|
274
272
|
).argument("<capability-id>", "Capability ID, such as metadata.data_table.sql_write").option("--domain <domain>", "Override the capability namespace used for gateway routing").option("--input <json-or-path>", "Input JSON object, file path, @<path>, or - for stdin").action(async (capabilityId, opts) => {
|
|
275
273
|
await executeAndPrint(program, async (host) => {
|
|
276
274
|
assertCapabilityIsNotRetired(capabilityId);
|
|
277
|
-
await assertCapabilityBusinessEnabled(capabilityId, host);
|
|
275
|
+
await assertCapabilityBusinessEnabled(capabilityId, host, program.opts().host);
|
|
278
276
|
const gatewayDomain = resolveCapabilityGatewayDomain(capabilityId, opts.domain);
|
|
279
277
|
return gatewayOutput(await validateCapabilityWithEnvelope(host, gatewayDomain, capabilityId, parseCapabilityInput(opts.input)), host);
|
|
280
278
|
});
|
|
@@ -298,7 +296,7 @@ Examples:
|
|
|
298
296
|
).argument("<capability-id>", "Capability ID, such as analysis.query.export").option("--domain <domain>", "Override the capability namespace used for gateway routing").option("--input <json-or-path>", "Input JSON object, file path, @<path>, or - for stdin").action(async (capabilityId, opts) => {
|
|
299
297
|
await executeAndPrint(program, async (host) => {
|
|
300
298
|
assertCapabilityIsNotRetired(capabilityId);
|
|
301
|
-
await assertCapabilityBusinessEnabled(capabilityId, host);
|
|
299
|
+
await assertCapabilityBusinessEnabled(capabilityId, host, program.opts().host);
|
|
302
300
|
const gatewayDomain = resolveCapabilityGatewayDomain(capabilityId, opts.domain);
|
|
303
301
|
return gatewayOutput(await dryRunCapabilityWithEnvelope(host, gatewayDomain, capabilityId, parseCapabilityInput(opts.input)), host);
|
|
304
302
|
});
|
|
@@ -312,7 +310,7 @@ Examples:
|
|
|
312
310
|
capability.command("run").description("Execute one capability by ID").argument("<capability-id>", "Capability ID, such as analysis.report.list").option("--domain <domain>", "Override the capability namespace used for gateway routing").option("--input <json-or-path>", "Input JSON object, file path, @<path>, or - for stdin").action(async (capabilityId, opts) => {
|
|
313
311
|
await executeAndPrint(program, async (host, globalOpts) => {
|
|
314
312
|
assertCapabilityIsNotRetired(capabilityId);
|
|
315
|
-
await assertCapabilityBusinessEnabled(capabilityId, host);
|
|
313
|
+
await assertCapabilityBusinessEnabled(capabilityId, host, program.opts().host);
|
|
316
314
|
const gatewayDomain = resolveCapabilityGatewayDomain(capabilityId, opts.domain);
|
|
317
315
|
const input = parseCapabilityInput(opts.input);
|
|
318
316
|
if (globalOpts.validate && globalOpts.dryRun) {
|
|
@@ -331,7 +329,7 @@ Examples:
|
|
|
331
329
|
const metadata = await inspectCapability(host, gatewayDomain, capabilityId);
|
|
332
330
|
const risk = normalizeRiskLevel(typeof metadata?.risk === "string" ? metadata.risk : void 0);
|
|
333
331
|
if (requiresConfirmation(risk)) {
|
|
334
|
-
const confirmed = await
|
|
332
|
+
const confirmed = await confirmHighRiskWrite(`This capability is marked ${risk} (${capabilityId}). Continue?`);
|
|
335
333
|
if (!confirmed) {
|
|
336
334
|
process.stderr.write("Aborted.\n");
|
|
337
335
|
return void 0;
|
|
@@ -348,8 +346,8 @@ Examples:
|
|
|
348
346
|
ae-cli capability run analysis.dashboard.list --input input.json`
|
|
349
347
|
);
|
|
350
348
|
}
|
|
351
|
-
async function assertCapabilityBusinessEnabled(capabilityId, host) {
|
|
352
|
-
await assertBusinessEnabled(businessForCapability(capabilityId), host);
|
|
349
|
+
async function assertCapabilityBusinessEnabled(capabilityId, host, hostOverride) {
|
|
350
|
+
await assertBusinessEnabled(businessForCapability(capabilityId), host, !hostOverride);
|
|
353
351
|
}
|
|
354
352
|
function gatewayOutput(envelope, host) {
|
|
355
353
|
return withOutputMetadata(withPageUrl(envelope.data, host), envelope.meta);
|
|
@@ -403,7 +401,14 @@ function printCapabilityError(error, host) {
|
|
|
403
401
|
return;
|
|
404
402
|
}
|
|
405
403
|
if (error instanceof PermissionError) {
|
|
406
|
-
printError(
|
|
404
|
+
printError(
|
|
405
|
+
"permission",
|
|
406
|
+
error.message,
|
|
407
|
+
error.hint,
|
|
408
|
+
error.code,
|
|
409
|
+
withPageUrl(error.meta, host),
|
|
410
|
+
{ details: error.details }
|
|
411
|
+
);
|
|
407
412
|
return;
|
|
408
413
|
}
|
|
409
414
|
if (error instanceof CapabilityGatewayError) {
|
|
@@ -413,15 +418,6 @@ function printCapabilityError(error, host) {
|
|
|
413
418
|
const message = error instanceof Error ? error.message : String(error);
|
|
414
419
|
printError("api", message);
|
|
415
420
|
}
|
|
416
|
-
async function confirm(message) {
|
|
417
|
-
const rl = readline.createInterface({ input: process.stdin, output: process.stderr });
|
|
418
|
-
return new Promise((resolve) => {
|
|
419
|
-
rl.question(`${message} [y/N] `, (answer) => {
|
|
420
|
-
rl.close();
|
|
421
|
-
resolve(answer.toLowerCase() === "y" || answer.toLowerCase() === "yes");
|
|
422
|
-
});
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
421
|
export {
|
|
426
422
|
registerCapability
|
|
427
423
|
};
|