@thinkingai/ae-cli 6.1.30 → 6.1.32
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 +11 -5
- package/README.zh.md +11 -5
- package/bin/ai-monitor.js +2 -0
- package/dist/ai-monitor-MKMHSSNI.js +32 -0
- package/dist/ai-monitor.js +135 -0
- package/dist/{auth-ADZHUIJR.js → auth-CZHHPZOQ.js} +10 -9
- package/dist/{automation-FD2QZUP6.js → automation-FLCPFMN4.js} +4 -4
- package/dist/{capability-QXFRJYZD.js → capability-64KVJFIA.js} +27 -31
- package/dist/{chunk-YULUBP3R.js → chunk-3ULDJJTZ.js} +1 -1
- package/dist/{chunk-HRUOV6EQ.js → chunk-4XKTRCRK.js} +15 -15
- package/dist/{chunk-JSBLCLFE.js → chunk-5M5LBRR3.js} +1 -1
- package/dist/chunk-6M7ZEDT2.js +182 -0
- package/dist/{chunk-KPQY44JQ.js → chunk-AWW2T2WL.js} +3 -0
- package/dist/chunk-BNBCMCYN.js +563 -0
- package/dist/chunk-CF6JTT2U.js +64 -0
- package/dist/{chunk-CG773QXN.js → chunk-DWBYNGSR.js} +564 -314
- package/dist/{chunk-VDICGXCY.js → chunk-F2VFZUGG.js} +2 -2
- package/dist/{chunk-TFORY6WY.js → chunk-FCAA7I2D.js} +2 -2
- package/dist/{chunk-SOSFRU3O.js → chunk-HTZ2MLYA.js} +47 -21
- package/dist/{chunk-AWVZTN2B.js → chunk-HVMCPKOZ.js} +1 -1
- package/dist/chunk-IDDWEZ7F.js +1285 -0
- package/dist/{chunk-E25OSZLJ.js → chunk-KTJXD27G.js} +2 -2
- package/dist/{chunk-AVXDJAFC.js → chunk-NLEXY2TM.js} +47 -12
- package/dist/{chunk-YVG6QD3V.js → chunk-P7QDCWJ6.js} +98 -7
- package/dist/{chunk-EUFP4M2A.js → chunk-T7WF4HYW.js} +84 -32
- package/dist/{chunk-Y3AM6LIO.js → chunk-TMQGS4TO.js} +15 -10
- package/dist/{compat-check-HERBTQZN.js → compat-check-ZJNCMNQV.js} +2 -2
- package/dist/{config-E3KANXMK.js → config-FSH2NMNZ.js} +25 -12
- package/dist/{context-CDB5H5PD.js → context-YAQG6YQC.js} +2 -2
- package/dist/{evaluation-LR4YDYWL.js → evaluation-2JSF4V47.js} +13 -158
- package/dist/index.js +81 -583
- package/dist/{memory-SNFR5M23.js → memory-VEZZVAAP.js} +4 -4
- package/dist/{metadata-EXQYDZTH.js → metadata-3IWHX3V4.js} +7 -7
- package/dist/{model-KEVCEXWD.js → model-T7H7Q6BG.js} +2 -2
- package/dist/{personal-semantic-preference-ETY3KU2O.js → personal-semantic-preference-YITU23SA.js} +6 -6
- package/dist/{project-semantic-UHRMVOJF.js → project-semantic-MHEXJF3C.js} +15 -13
- package/dist/{sync-XKEBXESC.js → sync-AQHVCSPI.js} +4 -4
- package/dist/{te-agent-S6UQR4IE.js → te-agent-RXI7WOH4.js} +5 -5
- package/dist/{te-analysis-WOFFCIBC.js → te-analysis-CZY74HVF.js} +380 -191
- package/dist/{te-community-R7B6QYOO.js → te-community-DKCYUBCM.js} +6 -6
- package/dist/{te-dataops-KPILYVHA.js → te-dataops-QEH6VE56.js} +3 -3
- package/dist/{te-engage-IAUM6ONX.js → te-engage-WK7WKDKF.js} +6 -6
- package/dist/{te-experiment-TMLRA7B3.js → te-experiment-LH3RPIOE.js} +274 -29
- package/dist/{te-kb-GKWPSLSY.js → te-kb-UPORIOVN.js} +16 -7
- package/dist/{te-system-CYWSK3UN.js → te-system-AL4B4XZL.js} +2 -2
- package/dist/{te-team-ISN52YNG.js → te-team-LLVTO2G4.js} +5 -5
- package/dist/{things-DDQ52Z3Q.js → things-XLMLBYQR.js} +5 -5
- package/dist/{update-CTLNTX35.js → update-7J5UQHSK.js} +3 -3
- package/dist/{workspace-2CKQX2XL.js → workspace-FF2HXJGR.js} +4 -4
- package/package.json +9 -7
- 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/path.md +5 -6
- 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-experiment/SKILL.md +38 -11
- package/skills/ae-experiment/references/experiment_approval.md +171 -0
- package/skills/ae-experiment/references/manage_experiment.md +11 -2
- package/skills/ae-experiment/references/save_experiment.md +28 -8
- package/skills/ae-experiment/references/save_submit_experiment.md +18 -3
- package/skills/ae-experiment/references/save_submit_external_experiment.md +57 -3
- package/skills/ae-generate-tracking-plan/SKILL.md +5 -0
- package/skills/ae-kb/SKILL.md +5 -3
- package/skills/ae-kb/references/analysis-workflow.md +11 -2
- 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/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
|
|
@@ -126,6 +126,7 @@ The table covers every current root command individually. Use `ae-cli --help` fo
|
|
|
126
126
|
| Analysis and projects | `metadata` | Capability-backed data-table, property, and dimension-table binding operations |
|
|
127
127
|
| Analysis and projects | `personal-semantic-preference` | Project-scoped lightweight semantic preferences for the current user |
|
|
128
128
|
| Analysis and projects | `project-semantic` | Governed project semantics, knowledge-base asset packages, candidate validation, review, and publishing |
|
|
129
|
+
| 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)) |
|
|
129
130
|
| Data and tracking | `tracking` | Tracking plans, SDK samples, checks, ingestion diagnostics, code generation, and bundled wiki |
|
|
130
131
|
| Data and tracking | `data-integration` | Inspect, plan, convert, upload, hand off, and reuse local CSV/JSON/Excel data |
|
|
131
132
|
| Community insights | `community` | Community posts, comments, topics, sentiment, livestream, and report workflows |
|
|
@@ -163,6 +164,8 @@ The table covers every current root command individually. Use `ae-cli --help` fo
|
|
|
163
164
|
|
|
164
165
|
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.
|
|
165
166
|
|
|
167
|
+
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).
|
|
168
|
+
|
|
166
169
|
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).
|
|
167
170
|
|
|
168
171
|
### Scheduled Feature experiments
|
|
@@ -173,9 +176,10 @@ For a configured Feature experiment, save its start time and optional fixed dead
|
|
|
173
176
|
ae-cli experiment experiment save --project-id 1 --req '{"expId":"exp_123"}' --start-time '2026-11-01T16:00:00+08:00' --fixed-end-time '2026-11-08T16:00:00+08:00'
|
|
174
177
|
ae-cli experiment experiment ready-check --project-id 1 --exp-id exp_123
|
|
175
178
|
ae-cli experiment experiment manage --project-id 1 --exp-id exp_123 --target-status pending
|
|
179
|
+
ae-cli experiment experiment get --project-id 1 --exp-id exp_123
|
|
176
180
|
```
|
|
177
181
|
|
|
178
|
-
Saving
|
|
182
|
+
This submission path works on older and approval-enabled servers. Saving a draft does not start it; where approval is supported, an eligible approver must approve it first. Approval can start a due experiment immediately, while scheduled starts are checked every half hour. Verify runtime status with `experiment experiment get`. Before using dedicated approval commands, check support as described in [server compatibility](skills/ae-experiment/references/experiment_approval.md#server-compatibility); submit only once. See [Feature timing](skills/ae-experiment/references/save_experiment.md#feature-timing) for scheduling.
|
|
179
183
|
|
|
180
184
|
## Capability Gateway
|
|
181
185
|
|
|
@@ -280,6 +284,7 @@ Commands return a stable envelope:
|
|
|
280
284
|
- `--format json` is the default and is recommended for Agents.
|
|
281
285
|
- `--format table` is available for supported human-facing list commands.
|
|
282
286
|
- `--jq <expr>` applies jq 1.8 filtering to the business payload before the output envelope is printed.
|
|
287
|
+
- 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.
|
|
283
288
|
- `--validate` normalizes Capability Gateway input without business execution.
|
|
284
289
|
- `--dry-run` previews an operation without executing its business logic.
|
|
285
290
|
- `--yes` skips interactive confirmation for explicitly marked high-risk writes.
|
|
@@ -306,6 +311,7 @@ ae-cli kb +rm-source --name engineering-handbook --scope company --display-name
|
|
|
306
311
|
ae-cli kb +schema --name engineering-handbook --scope company --model <model-ref>
|
|
307
312
|
ae-cli kb +compile --name engineering-handbook --scope company --model <model-ref>
|
|
308
313
|
ae-cli kb +status --name engineering-handbook --scope company
|
|
314
|
+
ae-cli kb +status --name engineering-handbook --scope company --run-id <compile-run-id>
|
|
309
315
|
ae-cli kb +ask -q "How is the sandbox configured?"
|
|
310
316
|
# Submit only, poll later:
|
|
311
317
|
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
|
## 命令地图
|
|
@@ -130,6 +130,7 @@ ae-cli capability list --domain analysis --jq '.data.capabilities[] | .id'
|
|
|
130
130
|
| 分析与项目 | `metadata` | 基于 Capability Gateway 的数据表、属性及维度表绑定 |
|
|
131
131
|
| 分析与项目 | `personal-semantic-preference` | 当前用户按项目维护轻量个人语义偏好 |
|
|
132
132
|
| 分析与项目 | `project-semantic` | 项目语义治理、知识库资产包、候选校验、审核和发布 |
|
|
133
|
+
| 可观测性 | `ai-monitor` | 查询 Trace、会话、Bad Trace、指标、成本、安全与已有诊断报告,导出校验后的 ZIP([指南](skills/ae-ai-monitor/SKILL.md)) |
|
|
133
134
|
| 数据与埋点 | `tracking` | 埋点方案、SDK 示例、检查、采集诊断、代码生成和内置 Wiki |
|
|
134
135
|
| 数据与埋点 | `data-integration` | 检查、规划、转换、上传、交接和复用本地 CSV/JSON/Excel 数据 |
|
|
135
136
|
| 社区洞察 | `community` | 社区帖子、评论、话题、情感、直播和报告工作流 |
|
|
@@ -167,6 +168,8 @@ ae-cli capability list --domain analysis --jq '.data.capabilities[] | .id'
|
|
|
167
168
|
|
|
168
169
|
使用 `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` 查看关联命令执行明细的查询方式。
|
|
169
170
|
|
|
171
|
+
需保存并审核 Bad Case 时,使用 `ae-cli analysis bad-case --help`。Agent 按语义对同批及所有历史状态去重;CLI 可直接审核,也可显式提交页面。每批汇报发现、重复、新增数量,补充说明选填。认证后将案例加入已绑定的 AE 评测集,取消认证后移除。详见[Bad Case 工作流](skills/ae-analysis/references/bad_case_review.md)。
|
|
172
|
+
|
|
170
173
|
评测命令在普通终端和沙箱中均跟随当前 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)。
|
|
171
174
|
|
|
172
175
|
### Feature 实验定时开启
|
|
@@ -177,9 +180,10 @@ ae-cli capability list --domain analysis --jq '.data.capabilities[] | .id'
|
|
|
177
180
|
ae-cli experiment experiment save --project-id 1 --req '{"expId":"exp_123"}' --start-time '2026-11-01T16:00:00+08:00' --fixed-end-time '2026-11-08T16:00:00+08:00'
|
|
178
181
|
ae-cli experiment experiment ready-check --project-id 1 --exp-id exp_123
|
|
179
182
|
ae-cli experiment experiment manage --project-id 1 --exp-id exp_123 --target-status pending
|
|
183
|
+
ae-cli experiment experiment get --project-id 1 --exp-id exp_123
|
|
180
184
|
```
|
|
181
185
|
|
|
182
|
-
|
|
186
|
+
此提交流程兼容旧服务端和支持审批的服务端。保存草稿不会开启实验;支持审批时,须先由有效审批人通过,批准可能立即开启已到开始时间的实验,预约实验由服务端每半小时检查。使用 `experiment experiment get` 确认运行状态;使用专用审批命令前,按 [服务端兼容性指引](skills/ae-experiment/references/experiment_approval.md#server-compatibility) 确认能力支持,同一次提交只执行一次。时间配置见 [Feature 时间配置](skills/ae-experiment/references/save_experiment.md#feature-timing)。
|
|
183
187
|
|
|
184
188
|
## Capability Gateway
|
|
185
189
|
|
|
@@ -284,6 +288,7 @@ CLI 直接请求对应业务接口,由服务端校验产品 License 和用户/
|
|
|
284
288
|
- 默认使用 `--format json`,推荐 Agent 使用。
|
|
285
289
|
- 支持的人工列表命令可使用 `--format table`。
|
|
286
290
|
- `--jq <expr>` 使用 jq 1.8 筛选业务结果,再输出统一信封。
|
|
291
|
+
- CLI 内置 jq 的输入是业务结果,不是外层 `{ok,data,meta}` 信封。CLI 内使用 `.capabilities[] | .id`;只有对最终保存的 JSON 执行外部 jq 时才使用 `.data.capabilities[]`。
|
|
287
292
|
- `--validate` 仅规范化 Capability Gateway 参数,不执行业务逻辑。
|
|
288
293
|
- `--dry-run` 预览操作,不执行业务逻辑。
|
|
289
294
|
- `--yes` 跳过明确标记为高风险写操作的交互确认。
|
|
@@ -310,6 +315,7 @@ ae-cli kb +rm-source --name engineering-handbook --scope company --display-name
|
|
|
310
315
|
ae-cli kb +schema --name engineering-handbook --scope company --model <model-ref>
|
|
311
316
|
ae-cli kb +compile --name engineering-handbook --scope company --model <model-ref>
|
|
312
317
|
ae-cli kb +status --name engineering-handbook --scope company
|
|
318
|
+
ae-cli kb +status --name engineering-handbook --scope company --run-id <compile-run-id>
|
|
313
319
|
ae-cli kb +ask -q "如何配置沙盒?"
|
|
314
320
|
# 仅提交,后续轮询:
|
|
315
321
|
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-IDDWEZ7F.js";
|
|
13
|
+
import "./chunk-TMQGS4TO.js";
|
|
14
|
+
import "./chunk-AWW2T2WL.js";
|
|
15
|
+
import "./chunk-3ULDJJTZ.js";
|
|
16
|
+
import "./chunk-4XKTRCRK.js";
|
|
17
|
+
import "./chunk-Y74WTIKJ.js";
|
|
18
|
+
import "./chunk-DWBYNGSR.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-BNBCMCYN.js";
|
|
7
|
+
import "./chunk-CF6JTT2U.js";
|
|
8
|
+
import "./chunk-5M5LBRR3.js";
|
|
9
|
+
import {
|
|
10
|
+
ai_monitor_default
|
|
11
|
+
} from "./chunk-IDDWEZ7F.js";
|
|
12
|
+
import "./chunk-P7QDCWJ6.js";
|
|
13
|
+
import "./chunk-TMQGS4TO.js";
|
|
14
|
+
import "./chunk-AWW2T2WL.js";
|
|
15
|
+
import "./chunk-3ULDJJTZ.js";
|
|
16
|
+
import "./chunk-4XKTRCRK.js";
|
|
17
|
+
import "./chunk-Y74WTIKJ.js";
|
|
18
|
+
import "./chunk-DWBYNGSR.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-NLEXY2TM.js";
|
|
6
7
|
import {
|
|
7
8
|
MultiselectCancelled,
|
|
8
9
|
promptSingleSelect
|
|
@@ -17,11 +18,11 @@ import {
|
|
|
17
18
|
import {
|
|
18
19
|
printError,
|
|
19
20
|
printOutput
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-3ULDJJTZ.js";
|
|
21
22
|
import {
|
|
22
23
|
getLocalCliPackageInfo,
|
|
23
24
|
runHostCompatCheck
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-DWBYNGSR.js";
|
|
25
26
|
import {
|
|
26
27
|
CliTokenValidationUnavailableError,
|
|
27
28
|
CredentialStoreUnreadableError,
|
|
@@ -37,7 +38,7 @@ 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,
|
|
@@ -528,7 +529,7 @@ async function switchActiveAccount(program, opts) {
|
|
|
528
529
|
host,
|
|
529
530
|
active: true,
|
|
530
531
|
account: accountOutput(selected.account),
|
|
531
|
-
...environment ? { environment } : {}
|
|
532
|
+
...environment ? { environment: environmentRefreshOutput(program, environment) } : {}
|
|
532
533
|
}, program.opts().format || "json");
|
|
533
534
|
} catch (error) {
|
|
534
535
|
if (error instanceof CredentialStoreUnreadableError) throw error;
|
|
@@ -649,7 +650,7 @@ function registerAuth(program) {
|
|
|
649
650
|
activateHostAfterLogin(host, explicitHost);
|
|
650
651
|
const environment2 = await refreshEnvironmentAfterLogin(host);
|
|
651
652
|
emit("Login successful! CLI token saved securely.");
|
|
652
|
-
await printOutput({ ...loginSummary(host, saved2), ...environment2 ? { environment: environment2 } : {} }, format);
|
|
653
|
+
await printOutput({ ...loginSummary(host, saved2), ...environment2 ? { environment: environmentRefreshOutput(program, environment2) } : {} }, format);
|
|
653
654
|
return;
|
|
654
655
|
}
|
|
655
656
|
const session = await authorizeLoginDevice(host);
|
|
@@ -675,7 +676,7 @@ function registerAuth(program) {
|
|
|
675
676
|
activateHostAfterLogin(host, explicitHost);
|
|
676
677
|
const environment = await refreshEnvironmentAfterLogin(host);
|
|
677
678
|
emit("Login successful! CLI token saved securely.");
|
|
678
|
-
await printOutput({ ...loginSummary(host, saved), ...environment ? { environment } : {} }, format);
|
|
679
|
+
await printOutput({ ...loginSummary(host, saved), ...environment ? { environment: environmentRefreshOutput(program, environment) } : {} }, format);
|
|
679
680
|
} catch (error) {
|
|
680
681
|
if (error instanceof CredentialStoreUnreadableError) throw error;
|
|
681
682
|
if (error instanceof DeviceFlowUnsupportedError) {
|
|
@@ -721,7 +722,7 @@ function registerAuth(program) {
|
|
|
721
722
|
const environment = await refreshEnvironmentAfterLogin(host);
|
|
722
723
|
process.stderr.write(`[ae-cli] CLI token verified and saved securely for ${host}
|
|
723
724
|
`);
|
|
724
|
-
await printOutput({ ...manualTokenSummary(host, saved), ...environment ? { environment } : {} }, program.opts().format || "json");
|
|
725
|
+
await printOutput({ ...manualTokenSummary(host, saved), ...environment ? { environment: environmentRefreshOutput(program, environment) } : {} }, program.opts().format || "json");
|
|
725
726
|
} catch (error) {
|
|
726
727
|
if (error instanceof CredentialStoreUnreadableError) throw error;
|
|
727
728
|
if (error instanceof PermissionError) {
|
|
@@ -847,7 +848,7 @@ function registerAuth(program) {
|
|
|
847
848
|
host,
|
|
848
849
|
remaining_accounts: listCredentials(host).length,
|
|
849
850
|
...result.active?.account ? { active_account: accountOutput(result.active.account) } : {},
|
|
850
|
-
...environment ? { environment } : {}
|
|
851
|
+
...environment ? { environment: environmentRefreshOutput(program, environment) } : {}
|
|
851
852
|
}, program.opts().format || "json");
|
|
852
853
|
});
|
|
853
854
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
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-
|
|
17
|
+
import "./chunk-HTZ2MLYA.js";
|
|
18
18
|
import "./chunk-4PSTYEG5.js";
|
|
19
19
|
import "./chunk-Z3Q2AEIN.js";
|
|
20
20
|
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
normalizeRiskLevel,
|
|
4
|
-
requiresConfirmation
|
|
5
|
-
} from "./chunk-AMBFK2K3.js";
|
|
6
2
|
import {
|
|
7
3
|
resolveHost
|
|
8
4
|
} from "./chunk-2F64AZYH.js";
|
|
5
|
+
import {
|
|
6
|
+
confirmHighRiskWrite,
|
|
7
|
+
normalizeRiskLevel,
|
|
8
|
+
requiresConfirmation
|
|
9
|
+
} from "./chunk-CF6JTT2U.js";
|
|
9
10
|
import {
|
|
10
11
|
findGatewayDomain,
|
|
11
12
|
listCapabilityDiscoveryPrefixes,
|
|
12
13
|
listRegisteredCapabilityDomains,
|
|
13
14
|
resolveGatewayDomain
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AWW2T2WL.js";
|
|
15
16
|
import {
|
|
16
17
|
printError,
|
|
17
18
|
printOutput,
|
|
18
19
|
withOutputMetadata
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-3ULDJJTZ.js";
|
|
20
21
|
import {
|
|
21
22
|
CapabilityGatewayError,
|
|
22
23
|
dryRunCapabilityWithEnvelope,
|
|
@@ -25,18 +26,18 @@ import {
|
|
|
25
26
|
inspectCapabilityWithEnvelope,
|
|
26
27
|
listCapabilitiesWithEnvelope,
|
|
27
28
|
validateCapabilityWithEnvelope
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-4XKTRCRK.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-DWBYNGSR.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
43
|
} from "./chunk-4PSTYEG5.js";
|
|
@@ -46,9 +47,6 @@ import {
|
|
|
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) {
|
|
@@ -239,7 +237,7 @@ function registerCapability(program) {
|
|
|
239
237
|
).option("--project-id <project-id>", "Filter by project membership, permissions, and enabled features").action(async (query, opts) => {
|
|
240
238
|
await executeAndPrint(program, async (host) => {
|
|
241
239
|
const business = businessForCapability(opts.domain);
|
|
242
|
-
const businesses = business ? await readBusinessConfigForExecution(host) : readCurrentBusinessConfig(host);
|
|
240
|
+
const businesses = business ? await readBusinessConfigForExecution(host, !program.opts().host) : readCurrentBusinessConfig(host);
|
|
243
241
|
const gatewayDomain = resolveCapabilityListDomain(opts.domain, businesses);
|
|
244
242
|
const projectId = parseOptionalProjectId(opts.projectId);
|
|
245
243
|
if (business && businesses[business] === false) {
|
|
@@ -264,7 +262,7 @@ function registerCapability(program) {
|
|
|
264
262
|
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) => {
|
|
265
263
|
await executeAndPrint(program, async (host) => {
|
|
266
264
|
assertCapabilityIsNotRetired(capabilityId);
|
|
267
|
-
await assertCapabilityBusinessEnabled(capabilityId, host);
|
|
265
|
+
await assertCapabilityBusinessEnabled(capabilityId, host, program.opts().host);
|
|
268
266
|
const gatewayDomain = resolveCapabilityGatewayDomain(capabilityId, opts.domain);
|
|
269
267
|
return gatewayOutput(await inspectCapabilityWithEnvelope(host, gatewayDomain, capabilityId, parseOptionalProjectId(opts.projectId)), host);
|
|
270
268
|
});
|
|
@@ -277,7 +275,7 @@ function registerCapability(program) {
|
|
|
277
275
|
).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) => {
|
|
278
276
|
await executeAndPrint(program, async (host) => {
|
|
279
277
|
assertCapabilityIsNotRetired(capabilityId);
|
|
280
|
-
await assertCapabilityBusinessEnabled(capabilityId, host);
|
|
278
|
+
await assertCapabilityBusinessEnabled(capabilityId, host, program.opts().host);
|
|
281
279
|
const gatewayDomain = resolveCapabilityGatewayDomain(capabilityId, opts.domain);
|
|
282
280
|
return gatewayOutput(await validateCapabilityWithEnvelope(host, gatewayDomain, capabilityId, parseCapabilityInput(opts.input)), host);
|
|
283
281
|
});
|
|
@@ -301,7 +299,7 @@ Examples:
|
|
|
301
299
|
).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) => {
|
|
302
300
|
await executeAndPrint(program, async (host) => {
|
|
303
301
|
assertCapabilityIsNotRetired(capabilityId);
|
|
304
|
-
await assertCapabilityBusinessEnabled(capabilityId, host);
|
|
302
|
+
await assertCapabilityBusinessEnabled(capabilityId, host, program.opts().host);
|
|
305
303
|
const gatewayDomain = resolveCapabilityGatewayDomain(capabilityId, opts.domain);
|
|
306
304
|
return gatewayOutput(await dryRunCapabilityWithEnvelope(host, gatewayDomain, capabilityId, parseCapabilityInput(opts.input)), host);
|
|
307
305
|
});
|
|
@@ -315,7 +313,7 @@ Examples:
|
|
|
315
313
|
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) => {
|
|
316
314
|
await executeAndPrint(program, async (host, globalOpts) => {
|
|
317
315
|
assertCapabilityIsNotRetired(capabilityId);
|
|
318
|
-
await assertCapabilityBusinessEnabled(capabilityId, host);
|
|
316
|
+
await assertCapabilityBusinessEnabled(capabilityId, host, program.opts().host);
|
|
319
317
|
const gatewayDomain = resolveCapabilityGatewayDomain(capabilityId, opts.domain);
|
|
320
318
|
const input = parseCapabilityInput(opts.input);
|
|
321
319
|
if (globalOpts.validate && globalOpts.dryRun) {
|
|
@@ -334,7 +332,7 @@ Examples:
|
|
|
334
332
|
const metadata = await inspectCapability(host, gatewayDomain, capabilityId);
|
|
335
333
|
const risk = normalizeRiskLevel(typeof metadata?.risk === "string" ? metadata.risk : void 0);
|
|
336
334
|
if (requiresConfirmation(risk)) {
|
|
337
|
-
const confirmed = await
|
|
335
|
+
const confirmed = await confirmHighRiskWrite(`This capability is marked ${risk} (${capabilityId}). Continue?`);
|
|
338
336
|
if (!confirmed) {
|
|
339
337
|
process.stderr.write("Aborted.\n");
|
|
340
338
|
return void 0;
|
|
@@ -351,8 +349,8 @@ Examples:
|
|
|
351
349
|
ae-cli capability run analysis.dashboard.list --input input.json`
|
|
352
350
|
);
|
|
353
351
|
}
|
|
354
|
-
async function assertCapabilityBusinessEnabled(capabilityId, host) {
|
|
355
|
-
await assertBusinessEnabled(businessForCapability(capabilityId), host);
|
|
352
|
+
async function assertCapabilityBusinessEnabled(capabilityId, host, hostOverride) {
|
|
353
|
+
await assertBusinessEnabled(businessForCapability(capabilityId), host, !hostOverride);
|
|
356
354
|
}
|
|
357
355
|
function gatewayOutput(envelope, host) {
|
|
358
356
|
return withOutputMetadata(withPageUrl(envelope.data, host), envelope.meta);
|
|
@@ -406,7 +404,14 @@ function printCapabilityError(error, host) {
|
|
|
406
404
|
return;
|
|
407
405
|
}
|
|
408
406
|
if (error instanceof PermissionError) {
|
|
409
|
-
printError(
|
|
407
|
+
printError(
|
|
408
|
+
"permission",
|
|
409
|
+
error.message,
|
|
410
|
+
error.hint,
|
|
411
|
+
error.code,
|
|
412
|
+
withPageUrl(error.meta, host),
|
|
413
|
+
{ details: error.details }
|
|
414
|
+
);
|
|
410
415
|
return;
|
|
411
416
|
}
|
|
412
417
|
if (error instanceof CapabilityGatewayError) {
|
|
@@ -416,15 +421,6 @@ function printCapabilityError(error, host) {
|
|
|
416
421
|
const message = error instanceof Error ? error.message : String(error);
|
|
417
422
|
printError("api", message);
|
|
418
423
|
}
|
|
419
|
-
async function confirm(message) {
|
|
420
|
-
const rl = readline.createInterface({ input: process.stdin, output: process.stderr });
|
|
421
|
-
return new Promise((resolve) => {
|
|
422
|
-
rl.question(`${message} [y/N] `, (answer) => {
|
|
423
|
-
rl.close();
|
|
424
|
-
resolve(answer.toLowerCase() === "y" || answer.toLowerCase() === "yes");
|
|
425
|
-
});
|
|
426
|
-
});
|
|
427
|
-
}
|
|
428
424
|
export {
|
|
429
425
|
registerCapability
|
|
430
426
|
};
|