@thinkingai/ae-cli 6.0.30 → 6.0.31
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 +5 -7
- package/README.zh.md +5 -7
- package/dist/{auth-7TQRGLBC.js → auth-7H3HAAJ3.js} +10 -10
- package/dist/{capability-KVA55RMK.js → capability-SEH3JWLN.js} +49 -10
- package/dist/{capability-LKHLZQPD.js → capability-SQ2IWKP3.js} +49 -10
- package/dist/{chunk-GWZ5MYWE.js → chunk-6LEYLOV3.js} +25 -4
- package/dist/{chunk-THBBNYXI.js → chunk-DYOS6YY7.js} +100 -62
- package/dist/{chunk-CWZUGF2J.js → chunk-HL2AJQ4Q.js} +15 -0
- package/dist/{chunk-OJR23CIK.js → chunk-I4A62X3N.js} +100 -61
- package/dist/chunk-N2QORU5D.js +68 -0
- package/dist/{chunk-7QQ4233A.js → chunk-PKRD2IEM.js} +25 -4
- package/dist/chunk-TKQJQXWT.js +68 -0
- package/dist/{chunk-ZAOL36CG.js → chunk-TNW2CI4W.js} +46 -30
- package/dist/{config-ZVPARN4R.js → config-7UZWDE74.js} +25 -25
- package/dist/index.js +143 -46
- package/dist/{metadata-6CCFV4K5.js → metadata-W6JFFMBA.js} +6 -43
- package/dist/{metadata-PDOIWH5O.js → metadata-X62TKIVK.js} +6 -43
- package/dist/{raw-OHSUK42D.js → raw-CN542NGT.js} +8 -6
- package/dist/{sync-ULT5SECP.js → sync-ERNHDPB5.js} +1 -1
- package/dist/{te-agent-FAIBM3SA.js → te-agent-FCCWUDTJ.js} +1 -1
- package/dist/te-analysis-NJGNWZFC.js +4530 -0
- package/dist/te-analysis-YGV5V5EX.js +4530 -0
- package/dist/{te-common-SDB3O2QG.js → te-common-5NJLF3XG.js} +1 -1
- package/dist/{te-common-CFGQXTFV.js → te-common-7VTJZPII.js} +1 -1
- package/dist/{te-community-6A7LKYUH.js → te-community-PEZ2VEF7.js} +1 -1
- package/dist/{te-community-GMWFGILT.js → te-community-TSKJ652U.js} +1 -1
- package/dist/{te-dataops-Z53CTG2U.js → te-dataops-F36T656A.js} +32 -12
- package/dist/{te-dataops-6LIPYNGH.js → te-dataops-ZNJBQ6VT.js} +33 -12
- package/dist/{te-engage-M7JQSJDP.js → te-engage-BUWVSSSK.js} +398 -11
- package/dist/{te-engage-545HJL6J.js → te-engage-EPE3QKDE.js} +398 -11
- package/dist/{te-meta-FADFLTDM.js → te-meta-MAAUHFQO.js} +9 -9
- package/dist/{te-meta-PKT27OTN.js → te-meta-VKWNAWO4.js} +9 -9
- package/dist/{te-team-RG75PR5D.js → te-team-OKCOX7OE.js} +5 -5
- package/package.json +15 -7
- package/skills/ae-agent/SKILL.md +6 -8
- package/skills/ae-agent/references/accept-skill-share.md +2 -2
- package/skills/ae-agent/references/add-attachment.md +3 -3
- package/skills/ae-agent/references/add-mcp.md +2 -3
- package/skills/ae-agent/references/add-model.md +3 -5
- package/skills/ae-agent/references/add-skill.md +2 -3
- package/skills/ae-agent/references/approve-skill.md +2 -2
- package/skills/ae-agent/references/auto-provision-mcp-credentials.md +3 -3
- package/skills/ae-agent/references/cancel-skill-submission.md +2 -2
- package/skills/ae-agent/references/copy-skill.md +3 -3
- package/skills/ae-agent/references/create-agent.md +3 -4
- package/skills/ae-agent/references/create-automation.md +5 -9
- package/skills/ae-agent/references/del-agent.md +3 -2
- package/skills/ae-agent/references/del-attachment.md +3 -2
- package/skills/ae-agent/references/del-mcp.md +3 -2
- package/skills/ae-agent/references/del-model.md +3 -2
- package/skills/ae-agent/references/del-skill-asset.md +3 -3
- package/skills/ae-agent/references/del-skill-reference.md +3 -3
- package/skills/ae-agent/references/del-skill-script.md +3 -3
- package/skills/ae-agent/references/del-skill.md +3 -2
- package/skills/ae-agent/references/edit-skill.md +4 -4
- package/skills/ae-agent/references/mcp-auth-disconnect.md +2 -2
- package/skills/ae-agent/references/mcp-auth-start.md +3 -3
- package/skills/ae-agent/references/reject-skill-share.md +2 -2
- package/skills/ae-agent/references/reject-skill.md +2 -2
- package/skills/ae-agent/references/rescan-skills.md +2 -2
- package/skills/ae-agent/references/set-mcp-credential.md +3 -3
- package/skills/ae-agent/references/set-mcp-meta.md +2 -2
- package/skills/ae-agent/references/set-skill-meta.md +2 -2
- package/skills/ae-agent/references/share-skill.md +3 -3
- package/skills/ae-agent/references/submit-skill.md +3 -3
- package/skills/ae-agent/references/toggle-mcp.md +3 -3
- package/skills/ae-agent/references/toggle-model.md +3 -3
- package/skills/ae-agent/references/toggle-skill.md +3 -3
- package/skills/ae-agent/references/update-agent.md +2 -2
- package/skills/ae-agent/references/update-automation.md +6 -8
- package/skills/ae-agent/references/update-mcp.md +4 -4
- package/skills/ae-agent/references/update-model.md +2 -3
- package/skills/ae-agent/references/upload-skill-asset.md +3 -3
- package/skills/ae-agent/references/upload-skill-reference.md +3 -3
- package/skills/ae-agent/references/upload-skill-script.md +3 -3
- package/skills/ae-agent/references/upload-skill.md +6 -7
- package/skills/ae-analysis/SKILL.md +105 -512
- package/skills/ae-analysis/references/adhoc_export.md +71 -0
- package/skills/ae-analysis/references/adhoc_run.md +58 -0
- package/skills/ae-analysis/references/ai_models.md +459 -0
- package/skills/ae-analysis/references/analysis_data_retrieval.md +101 -0
- package/skills/ae-analysis/references/analysis_gateway_assets.md +72 -12
- package/skills/ae-analysis/references/analysis_interpretation.md +38 -0
- package/skills/ae-analysis/references/artifact_download.md +13 -7
- package/skills/ae-analysis/references/asset_abnormal_get.md +5 -5
- package/skills/ae-analysis/references/asset_abnormal_list.md +5 -5
- package/skills/ae-analysis/references/asset_authentication_list.md +5 -5
- package/skills/ae-analysis/references/asset_authentication_update.md +6 -6
- package/skills/ae-analysis/references/asset_batch_dashboard_schedule_freeze.md +26 -0
- package/skills/ae-analysis/references/asset_batch_delete.md +26 -0
- package/skills/ae-analysis/references/asset_batch_disable_auto_backup.md +26 -0
- package/skills/ae-analysis/references/asset_batch_disable_auto_update.md +26 -0
- package/skills/ae-analysis/references/asset_batch_handover.md +26 -0
- package/skills/ae-analysis/references/asset_batch_info_export.md +25 -0
- package/skills/ae-analysis/references/asset_batch_sql_export.md +25 -0
- package/skills/ae-analysis/references/asset_dependency_list.md +30 -0
- package/skills/ae-analysis/references/asset_export.md +30 -0
- package/skills/ae-analysis/references/asset_impact_list.md +30 -0
- package/skills/ae-analysis/references/asset_lineage_get.md +25 -0
- package/skills/ae-analysis/references/asset_list.md +30 -0
- package/skills/ae-analysis/references/asset_query_history_list.md +30 -0
- package/skills/ae-analysis/references/asset_recent_list.md +4 -4
- package/skills/ae-analysis/references/asset_search.md +4 -4
- package/skills/ae-analysis/references/asset_url_get.md +28 -0
- package/skills/ae-analysis/references/audience_models.md +42 -0
- package/skills/ae-analysis/references/batch_create_metadata.md +5 -1
- package/skills/ae-analysis/references/batch_edit_metadata.md +4 -1
- package/skills/ae-analysis/references/bi_panel_copy.md +1 -1
- package/skills/ae-analysis/references/bi_panel_create.md +1 -1
- package/skills/ae-analysis/references/bi_panel_delete.md +2 -0
- package/skills/ae-analysis/references/bi_panel_list.md +4 -2
- package/skills/ae-analysis/references/bi_panel_page_data_export.md +8 -4
- package/skills/ae-analysis/references/bi_panel_page_data_run.md +7 -3
- package/skills/ae-analysis/references/bi_panel_share.md +1 -1
- package/skills/ae-analysis/references/bi_panel_update.md +1 -1
- package/skills/ae-analysis/references/bi_panel_version_publish.md +1 -1
- package/skills/ae-analysis/references/cancel_query.md +4 -4
- package/skills/ae-analysis/references/command_index.md +209 -0
- package/skills/ae-analysis/references/create_alert.md +1 -1
- package/skills/ae-analysis/references/create_entity.md +1 -1
- package/skills/ae-analysis/references/create_metric.md +11 -15
- package/skills/ae-analysis/references/create_project_mark_time.md +2 -1
- package/skills/ae-analysis/references/create_virtual_event.md +10 -14
- package/skills/ae-analysis/references/create_virtual_property.md +1 -1
- package/skills/ae-analysis/references/dashboard_copy.md +1 -1
- package/skills/ae-analysis/references/dashboard_create.md +1 -1
- package/skills/ae-analysis/references/dashboard_daily_report_send.md +1 -1
- package/skills/ae-analysis/references/dashboard_daily_report_update.md +1 -1
- package/skills/ae-analysis/references/dashboard_definition_import.md +1 -1
- package/skills/ae-analysis/references/dashboard_delete.md +2 -0
- package/skills/ae-analysis/references/dashboard_freeze.md +1 -1
- package/skills/ae-analysis/references/dashboard_handover.md +1 -1
- package/skills/ae-analysis/references/dashboard_list.md +4 -2
- package/skills/ae-analysis/references/dashboard_report_add.md +15 -0
- package/skills/ae-analysis/references/dashboard_report_data_export.md +15 -7
- package/skills/ae-analysis/references/dashboard_report_data_run.md +15 -7
- package/skills/ae-analysis/references/dashboard_share.md +11 -2
- package/skills/ae-analysis/references/dashboard_update.md +12 -3
- package/skills/ae-analysis/references/datatable_columns_get.md +2 -2
- package/skills/ae-analysis/references/datatable_influence_list.md +2 -2
- package/skills/ae-analysis/references/datatable_version_get.md +2 -2
- package/skills/ae-analysis/references/datatable_version_list.md +2 -2
- package/skills/ae-analysis/references/delete_alert.md +8 -3
- package/skills/ae-analysis/references/delete_metric.md +8 -3
- package/skills/ae-analysis/references/delete_project_mark_times.md +5 -3
- package/skills/ae-analysis/references/delete_track_items.md +4 -3
- package/skills/ae-analysis/references/drilldown_user_events_export.md +20 -0
- package/skills/ae-analysis/references/drilldown_user_events_run.md +34 -0
- package/skills/ae-analysis/references/drilldown_users_export.md +17 -0
- package/skills/ae-analysis/references/drilldown_users_run.md +61 -0
- package/skills/ae-analysis/references/entity_detail_export.md +31 -0
- package/skills/ae-analysis/references/entity_detail_run.md +50 -0
- package/skills/ae-analysis/references/entity_id_import_options.md +20 -0
- package/skills/ae-analysis/references/event_changelog_list.md +2 -2
- package/skills/ae-analysis/references/event_create.md +4 -4
- package/skills/ae-analysis/references/event_delete.md +5 -4
- package/skills/ae-analysis/references/event_detail_export.md +31 -0
- package/skills/ae-analysis/references/event_detail_run.md +58 -0
- package/skills/ae-analysis/references/event_get.md +2 -2
- package/skills/ae-analysis/references/event_hide_update.md +3 -3
- package/skills/ae-analysis/references/event_influence_list.md +2 -2
- package/skills/ae-analysis/references/event_list.md +2 -2
- package/skills/ae-analysis/references/{super_metadata_export.md → event_property_bundle_export.md} +7 -7
- package/skills/ae-analysis/references/event_property_bundle_import.md +25 -0
- package/skills/ae-analysis/references/event_relation_update.md +4 -4
- package/skills/ae-analysis/references/event_update.md +2 -2
- package/skills/ae-analysis/references/exchange_config_update.md +2 -2
- package/skills/ae-analysis/references/exchange_rate_refresh.md +2 -2
- package/skills/ae-analysis/references/exchange_rule_list.md +2 -2
- package/skills/ae-analysis/references/exchange_rule_update.md +4 -4
- package/skills/ae-analysis/references/exchange_rule_validate.md +4 -4
- package/skills/ae-analysis/references/favorite_add.md +1 -1
- package/skills/ae-analysis/references/favorite_remove.md +1 -1
- package/skills/ae-analysis/references/folder_create.md +2 -3
- package/skills/ae-analysis/references/folder_share.md +2 -3
- package/skills/ae-analysis/references/generate_track_program.md +2 -1
- package/skills/ae-analysis/references/generate_track_sdk_sample.md +2 -1
- package/skills/ae-analysis/references/get_alert.md +4 -0
- package/skills/ae-analysis/references/get_alert_definition_schema.md +1 -0
- package/skills/ae-analysis/references/get_metric.md +4 -4
- package/skills/ae-analysis/references/get_project_config.md +1 -0
- package/skills/ae-analysis/references/get_resource_url.md +1 -0
- package/skills/ae-analysis/references/get_track_program.md +3 -0
- package/skills/ae-analysis/references/history_tag_batch_refresh.md +19 -0
- package/skills/ae-analysis/references/history_tag_clear.md +13 -0
- package/skills/ae-analysis/references/history_tag_data_drilldown_export.md +15 -0
- package/skills/ae-analysis/references/history_tag_data_drilldown_run.md +13 -0
- package/skills/ae-analysis/references/history_tag_data_export.md +15 -0
- package/skills/ae-analysis/references/history_tag_data_run.md +15 -0
- package/skills/ae-analysis/references/history_tag_list.md +11 -0
- package/skills/ae-analysis/references/history_tag_refresh.md +11 -0
- package/skills/ae-analysis/references/input_file_inspect.md +9 -0
- package/skills/ae-analysis/references/input_file_purpose_list.md +9 -0
- package/skills/ae-analysis/references/input_file_upload.md +11 -0
- package/skills/ae-analysis/references/list_alerts.md +3 -2
- package/skills/ae-analysis/references/list_entities.md +3 -2
- package/skills/ae-analysis/references/list_events.md +5 -5
- package/skills/ae-analysis/references/list_metrics.md +5 -5
- package/skills/ae-analysis/references/list_project_mark_times.md +2 -1
- package/skills/ae-analysis/references/list_project_users.md +1 -0
- package/skills/ae-analysis/references/list_properties.md +5 -5
- package/skills/ae-analysis/references/load_filters.md +3 -0
- package/skills/ae-analysis/references/metric_create.md +11 -6
- package/skills/ae-analysis/references/metric_delete.md +5 -4
- package/skills/ae-analysis/references/metric_get.md +2 -2
- package/skills/ae-analysis/references/metric_list.md +2 -2
- package/skills/ae-analysis/references/metric_update.md +12 -6
- package/skills/ae-analysis/references/operation_record_export.md +25 -0
- package/skills/ae-analysis/references/operation_record_list.md +31 -0
- package/skills/ae-analysis/references/project_space_create.md +2 -3
- package/skills/ae-analysis/references/project_space_list.md +3 -1
- package/skills/ae-analysis/references/project_space_share.md +2 -3
- package/skills/ae-analysis/references/property_changelog_list.md +2 -2
- package/skills/ae-analysis/references/property_create.md +4 -4
- package/skills/ae-analysis/references/property_delete.md +5 -4
- package/skills/ae-analysis/references/property_get.md +2 -2
- package/skills/ae-analysis/references/property_hide_update.md +3 -3
- package/skills/ae-analysis/references/property_influence_list.md +2 -2
- package/skills/ae-analysis/references/property_list.md +2 -2
- package/skills/ae-analysis/references/property_related_events.md +2 -2
- package/skills/ae-analysis/references/property_relation_update.md +4 -4
- package/skills/ae-analysis/references/property_update.md +2 -2
- package/skills/ae-analysis/references/public_link_create.md +1 -1
- package/skills/ae-analysis/references/public_link_delete.md +2 -0
- package/skills/ae-analysis/references/public_link_list.md +3 -1
- package/skills/ae-analysis/references/public_link_offline.md +1 -1
- package/skills/ae-analysis/references/public_link_update.md +1 -1
- package/skills/ae-analysis/references/query_cancel.md +1 -1
- package/skills/ae-analysis/references/query_create_result_cluster.md +47 -0
- package/skills/ae-analysis/references/report_abnormal_get.md +15 -0
- package/skills/ae-analysis/references/report_change_log_get.md +15 -0
- package/skills/ae-analysis/references/report_change_log_list.md +15 -0
- package/skills/ae-analysis/references/report_create.md +29 -0
- package/skills/ae-analysis/references/report_data_export.md +37 -0
- package/skills/ae-analysis/references/report_data_run.md +45 -0
- package/skills/ae-analysis/references/report_delete.md +17 -0
- package/skills/ae-analysis/references/report_get.md +21 -0
- package/skills/ae-analysis/references/report_list.md +17 -0
- package/skills/ae-analysis/references/report_list_export.md +15 -0
- package/skills/ae-analysis/references/report_update.md +22 -0
- package/skills/ae-analysis/references/report_version_rollback.md +15 -0
- package/skills/ae-analysis/references/rule_create.md +27 -0
- package/skills/ae-analysis/references/rule_delete.md +26 -0
- package/skills/ae-analysis/references/rule_list.md +24 -0
- package/skills/ae-analysis/references/rule_schema.md +24 -0
- package/skills/ae-analysis/references/rule_update.md +28 -0
- package/skills/ae-analysis/references/run_inspect.md +10 -4
- package/skills/ae-analysis/references/save_track_items.md +4 -1
- package/skills/ae-analysis/references/sql_table_columns.md +20 -0
- package/skills/ae-analysis/references/sql_table_list.md +33 -0
- package/skills/ae-analysis/references/update_alert.md +1 -1
- package/skills/ae-analysis/references/update_metric.md +11 -14
- package/skills/ae-analysis/references/update_project_mark_time.md +4 -3
- package/skills/ae-analysis/references/user_cluster_create.md +15 -0
- package/skills/ae-analysis/references/user_cluster_create_id.md +15 -0
- package/skills/ae-analysis/references/user_cluster_delete.md +13 -0
- package/skills/ae-analysis/references/user_cluster_get.md +11 -0
- package/skills/ae-analysis/references/user_cluster_list.md +15 -0
- package/skills/ae-analysis/references/user_cluster_member_export.md +15 -0
- package/skills/ae-analysis/references/user_cluster_member_list.md +19 -0
- package/skills/ae-analysis/references/user_cluster_models.md +87 -0
- package/skills/ae-analysis/references/user_cluster_refresh.md +11 -0
- package/skills/ae-analysis/references/user_cluster_update.md +13 -0
- package/skills/ae-analysis/references/user_cluster_update_id.md +15 -0
- package/skills/ae-analysis/references/user_tag_create.md +15 -0
- package/skills/ae-analysis/references/user_tag_create_id.md +15 -0
- package/skills/ae-analysis/references/user_tag_delete.md +13 -0
- package/skills/ae-analysis/references/user_tag_get.md +11 -0
- package/skills/ae-analysis/references/user_tag_list.md +17 -0
- package/skills/ae-analysis/references/user_tag_member_export.md +15 -0
- package/skills/ae-analysis/references/user_tag_member_list.md +19 -0
- package/skills/ae-analysis/references/user_tag_models.md +54 -0
- package/skills/ae-analysis/references/user_tag_refresh.md +11 -0
- package/skills/ae-analysis/references/user_tag_update.md +13 -0
- package/skills/ae-analysis/references/user_tag_update_id.md +15 -0
- package/skills/ae-analysis/references/virtual_event_create.md +4 -4
- package/skills/ae-analysis/references/virtual_event_delete.md +5 -4
- package/skills/ae-analysis/references/virtual_event_get.md +2 -2
- package/skills/ae-analysis/references/virtual_property_create.md +13 -6
- package/skills/ae-analysis/references/virtual_property_sql_rule_delete.md +5 -4
- package/skills/ae-analysis/references/virtual_property_sql_rule_update.md +13 -6
- package/skills/ae-analysis-global/SKILL.md +6 -8
- package/skills/ae-analysis-global/references/list_query_clusters.md +7 -6
- package/skills/ae-capability/SKILL.md +68 -15
- package/skills/ae-community/SKILL.md +2 -2
- package/skills/ae-dataops/SKILL.md +1 -1
- package/skills/ae-engage/SKILL.md +38 -10
- package/skills/ae-engage/references/build-task-save-guide.md +11 -9
- package/skills/ae-engage/references/channel_touch_limits_list.md +29 -0
- package/skills/ae-engage/references/group-list.md +13 -0
- package/skills/ae-engage/references/operation-log-query.md +11 -0
- package/skills/ae-engage/references/ops-delete.md +14 -0
- package/skills/ae-engage/references/push-record-query.md +26 -0
- package/skills/ae-engage/references/save-flow.md +5 -4
- package/skills/ae-engage/references/save-task.md +24 -20
- package/skills/ae-engage/references/segment-list-query.md +18 -0
- package/skills/ae-engage/references/task-operation-log-query.md +23 -0
- package/skills/ae-engage/references/version-list.md +18 -0
- package/skills/ae-generate-tracking-code/SKILL.md +1 -1
- package/skills/ae-generate-tracking-code/references/snippet-delivery.md +2 -2
- package/skills/ae-generate-tracking-plan/SKILL.md +17 -12
- package/skills/ae-generate-tracking-plan/references/te-api.md +2 -1
- package/skills/ae-kb/SKILL.md +1 -1
- package/skills/ae-metadata/SKILL.md +9 -8
- package/skills/ae-metadata/references/metadata_data_table_csv_delete.md +1 -0
- package/skills/ae-metadata/references/metadata_data_table_csv_write.md +6 -6
- package/skills/ae-metadata/references/metadata_data_table_property_bindings_update.md +2 -2
- package/skills/ae-metadata/references/metadata_data_table_sql_delete.md +1 -0
- package/skills/ae-metadata/references/metadata_data_table_sql_write.md +21 -7
- package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +3 -3
- package/skills/ae-metadata/references/metadata_property_dimension_table_create_and_bind_csv.md +4 -4
- package/skills/ae-team/SKILL.md +9 -9
- package/skills/ae-team/references/create.md +2 -2
- package/skills/ae-team/references/delete.md +3 -3
- package/skills/ae-team/references/run-cancel.md +3 -3
- package/skills/ae-team/references/run-chat.md +4 -4
- package/skills/ae-team/references/run-reply.md +3 -3
- package/skills/ae-team/references/run-start.md +4 -5
- package/skills/ae-team/references/run-watch.md +1 -1
- package/skills/ae-team/references/update.md +2 -2
- package/dist/chunk-P2JRP6HJ.js +0 -42
- package/dist/chunk-S5XN6KEX.js +0 -42
- package/dist/te-analysis-DDXGM7WM.js +0 -3188
- package/dist/te-analysis-HCDNYI7E.js +0 -3188
- package/dist/te-audience-ECFS4GF4.js +0 -600
- package/dist/te-audience-WO377T2J.js +0 -600
- package/skills/ae-analysis/references/build_attribution_analysis_qp.md +0 -62
- package/skills/ae-analysis/references/build_cluster_definition.md +0 -62
- package/skills/ae-analysis/references/build_distribution_analysis_qp.md +0 -67
- package/skills/ae-analysis/references/build_entity_details_sql.md +0 -58
- package/skills/ae-analysis/references/build_event_analysis_qp.md +0 -134
- package/skills/ae-analysis/references/build_event_details_sql.md +0 -61
- package/skills/ae-analysis/references/build_funnel_analysis_qp.md +0 -145
- package/skills/ae-analysis/references/build_heat_map_analysis_qp.md +0 -54
- package/skills/ae-analysis/references/build_interval_analysis_qp.md +0 -60
- package/skills/ae-analysis/references/build_path_analysis_qp.md +0 -53
- package/skills/ae-analysis/references/build_prop_analysis_qp.md +0 -124
- package/skills/ae-analysis/references/build_rank_list_analysis_qp.md +0 -63
- package/skills/ae-analysis/references/build_retention_analysis_qp.md +0 -143
- package/skills/ae-analysis/references/build_tag_definition.md +0 -65
- package/skills/ae-analysis/references/copy_dashboard.md +0 -33
- package/skills/ae-analysis/references/create_cluster.md +0 -69
- package/skills/ae-analysis/references/create_dashboard.md +0 -49
- package/skills/ae-analysis/references/create_id_cluster.md +0 -40
- package/skills/ae-analysis/references/create_id_tag.md +0 -39
- package/skills/ae-analysis/references/create_or_update_dashboard_note.md +0 -39
- package/skills/ae-analysis/references/create_public_access_link.md +0 -43
- package/skills/ae-analysis/references/create_report.md +0 -60
- package/skills/ae-analysis/references/create_result_cluster.md +0 -73
- package/skills/ae-analysis/references/create_space.md +0 -34
- package/skills/ae-analysis/references/create_tag.md +0 -61
- package/skills/ae-analysis/references/delete_cluster.md +0 -27
- package/skills/ae-analysis/references/delete_dashboard.md +0 -30
- package/skills/ae-analysis/references/delete_report.md +0 -27
- package/skills/ae-analysis/references/delete_tag.md +0 -27
- package/skills/ae-analysis/references/drilldown_user_events.md +0 -74
- package/skills/ae-analysis/references/drilldown_users.md +0 -80
- package/skills/ae-analysis/references/freeze_dashboards.md +0 -29
- package/skills/ae-analysis/references/get_analysis_query_schema.md +0 -71
- package/skills/ae-analysis/references/get_bi_panel_detail.md +0 -35
- package/skills/ae-analysis/references/get_cluster_definition_schema.md +0 -53
- package/skills/ae-analysis/references/get_clusters_by_name.md +0 -69
- package/skills/ae-analysis/references/get_filter_schema.md +0 -33
- package/skills/ae-analysis/references/get_groupby_schema.md +0 -33
- package/skills/ae-analysis/references/get_report_definition.md +0 -37
- package/skills/ae-analysis/references/get_table_columns.md +0 -37
- package/skills/ae-analysis/references/get_tag_definition_schema.md +0 -49
- package/skills/ae-analysis/references/get_tags_by_name.md +0 -69
- package/skills/ae-analysis/references/list_bi_panels.md +0 -35
- package/skills/ae-analysis/references/list_cluster_members.md +0 -45
- package/skills/ae-analysis/references/list_clusters.md +0 -46
- package/skills/ae-analysis/references/list_dashboards.md +0 -43
- package/skills/ae-analysis/references/list_public_access_links.md +0 -41
- package/skills/ae-analysis/references/list_reports.md +0 -43
- package/skills/ae-analysis/references/list_spaces.md +0 -27
- package/skills/ae-analysis/references/list_tag_members.md +0 -46
- package/skills/ae-analysis/references/list_tags.md +0 -44
- package/skills/ae-analysis/references/move_dashboard.md +0 -33
- package/skills/ae-analysis/references/query_adhoc.md +0 -141
- package/skills/ae-analysis/references/query_bi_panel_data.md +0 -58
- package/skills/ae-analysis/references/query_dashboard_detail.md +0 -35
- package/skills/ae-analysis/references/query_dashboard_report_data.md +0 -63
- package/skills/ae-analysis/references/query_entity_details.md +0 -63
- package/skills/ae-analysis/references/query_event_details.md +0 -66
- package/skills/ae-analysis/references/query_report_data.md +0 -99
- package/skills/ae-analysis/references/refresh_cluster.md +0 -31
- package/skills/ae-analysis/references/refresh_tag.md +0 -31
- package/skills/ae-analysis/references/super_metadata_import.md +0 -24
- package/skills/ae-analysis/references/update_cluster.md +0 -61
- package/skills/ae-analysis/references/update_dashboard.md +0 -45
- package/skills/ae-analysis/references/update_id_cluster.md +0 -36
- package/skills/ae-analysis/references/update_id_tag.md +0 -37
- package/skills/ae-analysis/references/update_public_access_link.md +0 -41
- package/skills/ae-analysis/references/update_report.md +0 -35
- package/skills/ae-analysis/references/update_tag.md +0 -61
- package/skills/ae-analysis-intent/SKILL.md +0 -132
- package/skills/ae-metadata/references/metadata_input_file_upload.md +0 -29
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveGatewayDomain
|
|
3
|
+
} from "./chunk-HL2AJQ4Q.js";
|
|
4
|
+
import {
|
|
5
|
+
dryRunCapability,
|
|
6
|
+
executeCapabilityWithEnvelope,
|
|
7
|
+
validateCapability
|
|
8
|
+
} from "./chunk-I4A62X3N.js";
|
|
9
|
+
import {
|
|
10
|
+
withOutputMetadata
|
|
11
|
+
} from "./chunk-TNW2CI4W.js";
|
|
12
|
+
|
|
13
|
+
// src/core/capability-command.ts
|
|
14
|
+
import { randomBytes } from "crypto";
|
|
15
|
+
function createCapabilityCommand(config) {
|
|
16
|
+
return {
|
|
17
|
+
service: config.cliService,
|
|
18
|
+
resource: config.resource,
|
|
19
|
+
command: config.command,
|
|
20
|
+
capabilityId: config.capabilityId,
|
|
21
|
+
description: config.description,
|
|
22
|
+
flags: config.flags,
|
|
23
|
+
risk: config.risk,
|
|
24
|
+
validate: config.validate,
|
|
25
|
+
validateInput: async (ctx) => {
|
|
26
|
+
const gatewayDomain = resolveGatewayDomain(config.cliService, config.gatewayDomain);
|
|
27
|
+
const requestHost = config.requestHost ?? ctx.host();
|
|
28
|
+
const input = config.buildInput(ctx);
|
|
29
|
+
return validateCapability(requestHost, gatewayDomain, config.capabilityId, input);
|
|
30
|
+
},
|
|
31
|
+
dryRun: async (ctx) => {
|
|
32
|
+
const gatewayDomain = resolveGatewayDomain(config.cliService, config.gatewayDomain);
|
|
33
|
+
const requestHost = config.requestHost ?? ctx.host();
|
|
34
|
+
const input = config.buildInput(ctx);
|
|
35
|
+
return dryRunCapability(requestHost, gatewayDomain, config.capabilityId, input);
|
|
36
|
+
},
|
|
37
|
+
execute: async (ctx) => {
|
|
38
|
+
const gatewayDomain = resolveGatewayDomain(config.cliService, config.gatewayDomain);
|
|
39
|
+
const requestHost = config.requestHost ?? ctx.host();
|
|
40
|
+
const input = withLifecycleRequestId(config, config.buildInput(ctx));
|
|
41
|
+
announceDispatch(config.capabilityId, input);
|
|
42
|
+
const result = await executeCapabilityWithEnvelope(requestHost, gatewayDomain, config.capabilityId, input);
|
|
43
|
+
const data = config.postProcess ? config.postProcess(result.data, input) : result.data;
|
|
44
|
+
return withOutputMetadata(data, result.meta);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function withLifecycleRequestId(config, input) {
|
|
49
|
+
if (!config.flags.some((flag) => flag.name === "request-id")) {
|
|
50
|
+
return input;
|
|
51
|
+
}
|
|
52
|
+
const supplied = input.request_id;
|
|
53
|
+
const requestId = typeof supplied === "string" && supplied.length > 0 ? supplied : `cli_${randomBytes(16).toString("hex")}`;
|
|
54
|
+
return { ...input, request_id: requestId };
|
|
55
|
+
}
|
|
56
|
+
function announceDispatch(capabilityId, input) {
|
|
57
|
+
if (typeof input.request_id !== "string") {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
process.stderr.write(
|
|
61
|
+
`[ae-cli] dispatching capability=${capabilityId} request_id=${input.request_id}
|
|
62
|
+
`
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export {
|
|
67
|
+
createCapabilityCommand
|
|
68
|
+
};
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// src/framework/output.ts
|
|
6
6
|
import Table from "cli-table3";
|
|
7
|
+
import { JqError, json as jqJson } from "jq-wasm";
|
|
7
8
|
var KNOWN_ARRAY_FIELDS = [
|
|
8
9
|
"items",
|
|
9
10
|
"events",
|
|
@@ -23,6 +24,18 @@ var KNOWN_ARRAY_FIELDS = [
|
|
|
23
24
|
"columns",
|
|
24
25
|
"properties"
|
|
25
26
|
];
|
|
27
|
+
var OUTPUT_METADATA = /* @__PURE__ */ Symbol("ae-cli-output-metadata");
|
|
28
|
+
function withOutputMetadata(data, meta) {
|
|
29
|
+
if (!meta || Object.keys(meta).length === 0) return data;
|
|
30
|
+
return {
|
|
31
|
+
[OUTPUT_METADATA]: true,
|
|
32
|
+
data,
|
|
33
|
+
meta
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function isOutputWithMetadata(value) {
|
|
37
|
+
return Boolean(value?.[OUTPUT_METADATA]);
|
|
38
|
+
}
|
|
26
39
|
function findArrayField(data) {
|
|
27
40
|
if (Array.isArray(data)) return data;
|
|
28
41
|
if (typeof data !== "object" || data === null) return null;
|
|
@@ -58,56 +71,59 @@ function formatTable(data) {
|
|
|
58
71
|
}
|
|
59
72
|
return table.toString();
|
|
60
73
|
}
|
|
61
|
-
function applyJq(data, expr) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
let
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (indexMatch) {
|
|
74
|
-
result = result?.[indexMatch[1]]?.[parseInt(indexMatch[2])];
|
|
75
|
-
continue;
|
|
76
|
-
}
|
|
77
|
-
if (part) {
|
|
78
|
-
result = result?.[part];
|
|
79
|
-
}
|
|
74
|
+
async function applyJq(data, expr) {
|
|
75
|
+
const trimmed = expr.trim();
|
|
76
|
+
if (!trimmed) return data;
|
|
77
|
+
let results;
|
|
78
|
+
try {
|
|
79
|
+
results = await jqJson(data, trimmed);
|
|
80
|
+
} catch (err) {
|
|
81
|
+
const message = err instanceof JqError ? err.message : err?.message || String(err);
|
|
82
|
+
const error = new Error(`Invalid --jq expression: ${message}`);
|
|
83
|
+
error.type = "validation";
|
|
84
|
+
error.hint = "Use standard jq syntax, e.g. .status or {status,pendingQuestion}";
|
|
85
|
+
throw error;
|
|
80
86
|
}
|
|
81
|
-
return
|
|
87
|
+
if (results.length === 0) return null;
|
|
88
|
+
if (results.length === 1) return results[0];
|
|
89
|
+
return results;
|
|
82
90
|
}
|
|
83
|
-
function formatOutput(data, format, jqExpr) {
|
|
84
|
-
|
|
91
|
+
async function formatOutput(data, format, jqExpr) {
|
|
92
|
+
const outputData = isOutputWithMetadata(data) ? data.data : data;
|
|
93
|
+
const meta = isOutputWithMetadata(data) ? data.meta : void 0;
|
|
94
|
+
let processed = outputData;
|
|
85
95
|
if (jqExpr) {
|
|
86
|
-
processed = applyJq(
|
|
96
|
+
processed = await applyJq(outputData, jqExpr);
|
|
87
97
|
}
|
|
88
98
|
if (format === "table") {
|
|
89
99
|
return formatTable(processed);
|
|
90
100
|
}
|
|
91
|
-
const envelope = {
|
|
101
|
+
const envelope = {
|
|
102
|
+
ok: true,
|
|
103
|
+
data: processed,
|
|
104
|
+
...meta ? { meta } : {}
|
|
105
|
+
};
|
|
92
106
|
return JSON.stringify(envelope, null, 2);
|
|
93
107
|
}
|
|
94
|
-
function formatError(type, message, hint, code) {
|
|
108
|
+
function formatError(type, message, hint, code, meta) {
|
|
95
109
|
const envelope = {
|
|
96
110
|
ok: false,
|
|
97
|
-
error: { type, message, hint, code }
|
|
111
|
+
error: { type, message, hint, code },
|
|
112
|
+
...meta && Object.keys(meta).length > 0 ? { meta } : {}
|
|
98
113
|
};
|
|
99
114
|
return JSON.stringify(envelope, null, 2);
|
|
100
115
|
}
|
|
101
|
-
function printError(type, message, hint, code) {
|
|
102
|
-
const formatted = formatError(type, message, hint, code);
|
|
116
|
+
function printError(type, message, hint, code, meta) {
|
|
117
|
+
const formatted = formatError(type, message, hint, code, meta);
|
|
103
118
|
process.stderr.write(formatted + "\n");
|
|
104
119
|
logger.error(`[${type}] ${message}${hint ? " | " + hint : ""}`);
|
|
105
120
|
}
|
|
106
|
-
function printOutput(data, format, jqExpr) {
|
|
107
|
-
process.stdout.write(formatOutput(data, format, jqExpr) + "\n");
|
|
121
|
+
async function printOutput(data, format, jqExpr) {
|
|
122
|
+
process.stdout.write(await formatOutput(data, format, jqExpr) + "\n");
|
|
108
123
|
}
|
|
109
124
|
|
|
110
125
|
export {
|
|
126
|
+
withOutputMetadata,
|
|
111
127
|
printError,
|
|
112
128
|
printOutput
|
|
113
129
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
printError,
|
|
3
3
|
printOutput
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TNW2CI4W.js";
|
|
5
5
|
import {
|
|
6
6
|
GLOBAL_QUERY_CONFIG_KEY,
|
|
7
7
|
getAnalysisMappingPathForClusterMode,
|
|
@@ -22,40 +22,40 @@ function registerConfig(program) {
|
|
|
22
22
|
printError("config", "Missing subcommand.", "Run: ae-cli config --help");
|
|
23
23
|
process.exit(1);
|
|
24
24
|
});
|
|
25
|
-
configCmd.command("list").description("List configured AE environments").action(() => {
|
|
26
|
-
printConfigList(program);
|
|
25
|
+
configCmd.command("list").description("List configured AE environments").action(async () => {
|
|
26
|
+
await printConfigList(program);
|
|
27
27
|
});
|
|
28
|
-
configCmd.command("current").description("Show the active AE environment").action(() => {
|
|
29
|
-
printCurrentConfig(program);
|
|
28
|
+
configCmd.command("current").description("Show the active AE environment").action(async () => {
|
|
29
|
+
await printCurrentConfig(program);
|
|
30
30
|
});
|
|
31
|
-
configCmd.command("use <env>").description("Switch active AE environment by exact URL or unique label").action((env) => {
|
|
32
|
-
useConfigEnv(program, env);
|
|
31
|
+
configCmd.command("use <env>").description("Switch active AE environment by exact URL or unique label").action(async (env) => {
|
|
32
|
+
await useConfigEnv(program, env);
|
|
33
33
|
});
|
|
34
|
-
configCmd.command("set-host <url>").description("Set the active AE host non-interactively (adds it if not already configured)").option("--label <label>", "Display label for this host (defaults to the host URL)").action((url, opts) => {
|
|
34
|
+
configCmd.command("set-host <url>").description("Set the active AE host non-interactively (adds it if not already configured)").option("--label <label>", "Display label for this host (defaults to the host URL)").action(async (url, opts) => {
|
|
35
35
|
const normalized = normalizeUrl(url);
|
|
36
36
|
const label = opts.label || normalized;
|
|
37
37
|
addHost(normalized, label);
|
|
38
38
|
setActiveHost(normalized);
|
|
39
|
-
printOutput({ activeHost: normalized, label }, program.opts().format || "json");
|
|
39
|
+
await printOutput({ activeHost: normalized, label }, program.opts().format || "json");
|
|
40
40
|
});
|
|
41
|
-
const clusterMode = configCmd.command("cluster-mode").description("Manage local multi-cluster analysis MCP mode").action(() => {
|
|
42
|
-
printClusterModeStatus(program);
|
|
41
|
+
const clusterMode = configCmd.command("cluster-mode").description("Manage local multi-cluster analysis MCP mode").action(async () => {
|
|
42
|
+
await printClusterModeStatus(program);
|
|
43
43
|
});
|
|
44
|
-
clusterMode.command("status").description("Show local multi-cluster analysis MCP mode").action(() => {
|
|
45
|
-
printClusterModeStatus(program);
|
|
44
|
+
clusterMode.command("status").description("Show local multi-cluster analysis MCP mode").action(async () => {
|
|
45
|
+
await printClusterModeStatus(program);
|
|
46
46
|
});
|
|
47
|
-
clusterMode.command("enable").description("Enable local multi-cluster analysis MCP mode").action(() => {
|
|
47
|
+
clusterMode.command("enable").description("Enable local multi-cluster analysis MCP mode").action(async () => {
|
|
48
48
|
setGlobalQueryModeEnabled(true);
|
|
49
|
-
printClusterModeStatus(program);
|
|
49
|
+
await printClusterModeStatus(program);
|
|
50
50
|
});
|
|
51
|
-
clusterMode.command("disable").description("Disable local multi-cluster analysis MCP mode").action(() => {
|
|
51
|
+
clusterMode.command("disable").description("Disable local multi-cluster analysis MCP mode").action(async () => {
|
|
52
52
|
setGlobalQueryModeEnabled(false);
|
|
53
|
-
printClusterModeStatus(program);
|
|
53
|
+
await printClusterModeStatus(program);
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
function printClusterModeStatus(program) {
|
|
56
|
+
async function printClusterModeStatus(program) {
|
|
57
57
|
const enabled = isGlobalQueryModeEnabled();
|
|
58
|
-
printOutput({
|
|
58
|
+
await printOutput({
|
|
59
59
|
[GLOBAL_QUERY_CONFIG_KEY]: enabled,
|
|
60
60
|
path: getClusterInfoFilePath(),
|
|
61
61
|
analysisMappingPath: getAnalysisMappingPathForClusterMode(enabled)
|
|
@@ -70,20 +70,20 @@ function readHostViews() {
|
|
|
70
70
|
}));
|
|
71
71
|
return { activeHost: config.activeHost, hosts };
|
|
72
72
|
}
|
|
73
|
-
function printConfigList(program) {
|
|
73
|
+
async function printConfigList(program) {
|
|
74
74
|
const { activeHost, hosts } = readHostViews();
|
|
75
|
-
printOutput({ activeHost, hosts }, program.opts().format || "json", program.opts().jq);
|
|
75
|
+
await printOutput({ activeHost, hosts }, program.opts().format || "json", program.opts().jq);
|
|
76
76
|
}
|
|
77
|
-
function printCurrentConfig(program) {
|
|
77
|
+
async function printCurrentConfig(program) {
|
|
78
78
|
const { activeHost, hosts } = readHostViews();
|
|
79
79
|
const current = hosts.find((h) => h.url === activeHost);
|
|
80
80
|
if (!current) {
|
|
81
81
|
failConfig("No active AE environment configured.", "Run: ae-cli config use <env> or ae-cli config list");
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
|
-
printOutput({ activeHost: current.url, label: current.label }, program.opts().format || "json", program.opts().jq);
|
|
84
|
+
await printOutput({ activeHost: current.url, label: current.label }, program.opts().format || "json", program.opts().jq);
|
|
85
85
|
}
|
|
86
|
-
function useConfigEnv(program, env) {
|
|
86
|
+
async function useConfigEnv(program, env) {
|
|
87
87
|
const target = resolveHost(env);
|
|
88
88
|
if (target.status === "not-found") {
|
|
89
89
|
failConfig(
|
|
@@ -100,7 +100,7 @@ function useConfigEnv(program, env) {
|
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
102
|
setActiveHost(target.host.url);
|
|
103
|
-
printOutput({ activeHost: target.host.url, label: target.host.label }, program.opts().format || "json", program.opts().jq);
|
|
103
|
+
await printOutput({ activeHost: target.host.url, label: target.host.label }, program.opts().format || "json", program.opts().jq);
|
|
104
104
|
}
|
|
105
105
|
function resolveHost(env) {
|
|
106
106
|
const raw = env.trim();
|
package/dist/index.js
CHANGED
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
TeAgentApiError,
|
|
6
6
|
TeAgentCredentialsError
|
|
7
7
|
} from "./chunk-R77JT7XD.js";
|
|
8
|
-
import {
|
|
9
|
-
printError,
|
|
10
|
-
printOutput
|
|
11
|
-
} from "./chunk-ZAOL36CG.js";
|
|
12
8
|
import {
|
|
13
9
|
CapabilityGatewayError,
|
|
14
10
|
executeCapability,
|
|
15
11
|
uploadInputFileBytes
|
|
16
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-I4A62X3N.js";
|
|
13
|
+
import {
|
|
14
|
+
printError,
|
|
15
|
+
printOutput
|
|
16
|
+
} from "./chunk-TNW2CI4W.js";
|
|
17
17
|
import {
|
|
18
18
|
PermissionError
|
|
19
19
|
} from "./chunk-NOO24N7W.js";
|
|
@@ -57,24 +57,59 @@ async function runCommand(cmd, opts, globalOpts) {
|
|
|
57
57
|
}
|
|
58
58
|
const LIMIT_FLAG_PATTERNS = [/limit/i, /page_size/i, /pagesize/i, /row_limit/i, /block_limit/i, /top[-_]?k/i];
|
|
59
59
|
for (const flag of cmd.flags) {
|
|
60
|
+
if (flag.type !== "number") continue;
|
|
61
|
+
const val = opts[camelCase(flag.name)];
|
|
62
|
+
if (val === void 0 || val === null || val === "") continue;
|
|
63
|
+
const num = Number(val);
|
|
64
|
+
if (!Number.isFinite(num)) {
|
|
65
|
+
printError("validation", `--${flag.name} must be a number (got: ${val})`);
|
|
66
|
+
process.exit(1);
|
|
67
|
+
}
|
|
60
68
|
const isLimitFlag = LIMIT_FLAG_PATTERNS.some((p) => p.test(flag.name));
|
|
61
|
-
if (isLimitFlag
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
if (isLimitFlag) {
|
|
70
|
+
const min = flag.min ?? 1;
|
|
71
|
+
const max = flag.max ?? 1e4;
|
|
72
|
+
if (!Number.isInteger(num) || num < min || num > max) {
|
|
73
|
+
printError("validation", `--${flag.name} must be an integer between ${min} and ${max} (got: ${val})`);
|
|
74
|
+
process.exit(1);
|
|
75
|
+
}
|
|
76
|
+
} else if (flag.min !== void 0 || flag.max !== void 0) {
|
|
77
|
+
const min = flag.min ?? Number.NEGATIVE_INFINITY;
|
|
78
|
+
const max = flag.max ?? Number.POSITIVE_INFINITY;
|
|
79
|
+
if (num < min || num > max) {
|
|
80
|
+
const lower = flag.min === void 0 ? "-Infinity" : String(min);
|
|
81
|
+
const upper = flag.max === void 0 ? "Infinity" : String(max);
|
|
82
|
+
printError("validation", `--${flag.name} must be a number between ${lower} and ${upper} (got: ${val})`);
|
|
83
|
+
process.exit(1);
|
|
69
84
|
}
|
|
70
85
|
}
|
|
71
86
|
}
|
|
87
|
+
if (globalOpts.validate && globalOpts.dryRun) {
|
|
88
|
+
printError(
|
|
89
|
+
"validation",
|
|
90
|
+
"Cannot combine --validate and --dry-run.",
|
|
91
|
+
"Use --validate to fix parameters; use --dry-run as the pre-execution confirmation."
|
|
92
|
+
);
|
|
93
|
+
process.exit(1);
|
|
94
|
+
}
|
|
95
|
+
if (globalOpts.validate) {
|
|
96
|
+
if (cmd.validateInput) {
|
|
97
|
+
const validateResult = await cmd.validateInput(ctx);
|
|
98
|
+
await printOutput(validateResult, globalOpts.format, globalOpts.jq);
|
|
99
|
+
} else {
|
|
100
|
+
await printOutput(
|
|
101
|
+
{ message: "No --validate implementation for this command (capability gateway commands only)" },
|
|
102
|
+
globalOpts.format
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
72
107
|
if (globalOpts.dryRun) {
|
|
73
108
|
if (cmd.dryRun) {
|
|
74
|
-
const dryResult = cmd.dryRun(ctx);
|
|
75
|
-
printOutput(dryResult, globalOpts.format, globalOpts.jq);
|
|
109
|
+
const dryResult = await cmd.dryRun(ctx);
|
|
110
|
+
await printOutput(dryResult, globalOpts.format, globalOpts.jq);
|
|
76
111
|
} else {
|
|
77
|
-
printOutput({ message: "No dry-run implementation for this command" }, globalOpts.format);
|
|
112
|
+
await printOutput({ message: "No dry-run implementation for this command" }, globalOpts.format);
|
|
78
113
|
}
|
|
79
114
|
return;
|
|
80
115
|
}
|
|
@@ -86,8 +121,12 @@ async function runCommand(cmd, opts, globalOpts) {
|
|
|
86
121
|
}
|
|
87
122
|
}
|
|
88
123
|
const result = await cmd.execute(ctx);
|
|
89
|
-
ctx.out(result);
|
|
124
|
+
await ctx.out(result);
|
|
90
125
|
} catch (err) {
|
|
126
|
+
if (err?.type === "validation" && typeof err?.hint === "string" && String(err.message || "").includes("--jq")) {
|
|
127
|
+
printError("validation", err.message, err.hint);
|
|
128
|
+
process.exit(1);
|
|
129
|
+
}
|
|
91
130
|
const message = err.message || String(err);
|
|
92
131
|
logger.error(`Command failed: ${message}`);
|
|
93
132
|
if (err instanceof TeAgentCredentialsError) {
|
|
@@ -95,7 +134,7 @@ async function runCommand(cmd, opts, globalOpts) {
|
|
|
95
134
|
} else if (err instanceof PermissionError) {
|
|
96
135
|
printError("permission", message);
|
|
97
136
|
} else if (err instanceof CapabilityGatewayError) {
|
|
98
|
-
printError("api", message, err.hint, err.code);
|
|
137
|
+
printError("api", message, err.hint ?? capabilityGatewayHint(err), err.code, err.meta);
|
|
99
138
|
} else if (err instanceof SecureStoreAuthError) {
|
|
100
139
|
printError("auth", message, "Run: ae-cli auth login");
|
|
101
140
|
} else if (err instanceof TeAgentApiError) {
|
|
@@ -114,6 +153,15 @@ async function runCommand(cmd, opts, globalOpts) {
|
|
|
114
153
|
process.exit(1);
|
|
115
154
|
}
|
|
116
155
|
}
|
|
156
|
+
function capabilityGatewayHint(err) {
|
|
157
|
+
if (err.code === "CAPABILITY_NOT_FOUND") {
|
|
158
|
+
return "The current host does not expose this capability. Do not retry with different parameters; use a supported command path or ask the platform/backend owner to enable the capability.";
|
|
159
|
+
}
|
|
160
|
+
if (err.httpStatus === 404 && !err.code) {
|
|
161
|
+
return "The current host returned 404 for this capability route. Do not keep retrying the same command; verify the backend route/capability deployment.";
|
|
162
|
+
}
|
|
163
|
+
return void 0;
|
|
164
|
+
}
|
|
117
165
|
function looksLikeAuthFailure(message) {
|
|
118
166
|
const m = message.toLowerCase();
|
|
119
167
|
if (m.includes("403") || m.includes("forbidden") || m.includes("permission")) return false;
|
|
@@ -184,8 +232,8 @@ function createRuntimeContext(cmd, opts, globalOpts) {
|
|
|
184
232
|
service() {
|
|
185
233
|
return cmd.service;
|
|
186
234
|
},
|
|
187
|
-
out(data) {
|
|
188
|
-
printOutput(data, globalOpts.format, globalOpts.jq);
|
|
235
|
+
async out(data) {
|
|
236
|
+
await printOutput(data, globalOpts.format, globalOpts.jq);
|
|
189
237
|
}
|
|
190
238
|
};
|
|
191
239
|
return ctx;
|
|
@@ -215,15 +263,19 @@ function registerCommands(program2, commands) {
|
|
|
215
263
|
let serviceCmd = program2.commands.find((c) => c.name() === service);
|
|
216
264
|
if (!serviceCmd) {
|
|
217
265
|
serviceCmd = program2.command(service).description(`${service} domain commands`);
|
|
266
|
+
serviceCmd.allowExcessArguments(false);
|
|
218
267
|
}
|
|
219
268
|
for (const cmd of cmds) {
|
|
220
269
|
let parent = serviceCmd;
|
|
221
270
|
if (cmd.resource) {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
271
|
+
for (const resource of cmd.resource.split(/\s+/).filter(Boolean)) {
|
|
272
|
+
let resourceCmd = parent.commands.find((c) => c.name() === resource);
|
|
273
|
+
if (!resourceCmd) {
|
|
274
|
+
resourceCmd = parent.command(resource).description(`${resource} commands`);
|
|
275
|
+
resourceCmd.allowExcessArguments(false);
|
|
276
|
+
}
|
|
277
|
+
parent = resourceCmd;
|
|
225
278
|
}
|
|
226
|
-
parent = resourceCmd;
|
|
227
279
|
}
|
|
228
280
|
const sub = parent.command(cmd.command).description(cmd.description);
|
|
229
281
|
for (const flag of cmd.flags) {
|
|
@@ -237,9 +289,13 @@ function registerCommands(program2, commands) {
|
|
|
237
289
|
}
|
|
238
290
|
}
|
|
239
291
|
sub.option("--host <url>", "Override active AE host URL for this command");
|
|
292
|
+
sub.option("--format <format>", "Output format: json | table. Default: json.");
|
|
293
|
+
sub.option("--jq <expr>", "jq 1.8 filter over command payload, applied before output envelope wrapping.");
|
|
240
294
|
sub.action(async (opts) => {
|
|
241
295
|
const globalOpts = extractGlobalOptions(program2);
|
|
242
296
|
if (opts.host) globalOpts.host = opts.host;
|
|
297
|
+
if (opts.format) globalOpts.format = opts.format;
|
|
298
|
+
if (opts.jq) globalOpts.jq = opts.jq;
|
|
243
299
|
await runCommand(cmd, opts, globalOpts);
|
|
244
300
|
});
|
|
245
301
|
}
|
|
@@ -273,6 +329,7 @@ function extractGlobalOptions(program2) {
|
|
|
273
329
|
mcpUrl: opts.mcpUrl,
|
|
274
330
|
format: opts.format || "json",
|
|
275
331
|
jq: opts.jq,
|
|
332
|
+
validate: opts.validate || false,
|
|
276
333
|
dryRun: opts.dryRun || false,
|
|
277
334
|
yes: opts.yes || false
|
|
278
335
|
};
|
|
@@ -1219,7 +1276,8 @@ var TrackingClient = class {
|
|
|
1219
1276
|
}
|
|
1220
1277
|
const data = await executeCapability(this.host, TRACK_CAPABILITY_DOMAIN, TRACK_PROGRAM_EXCEL_SAVE, {
|
|
1221
1278
|
project_id: args.projectId,
|
|
1222
|
-
input_file_id: inputFileId
|
|
1279
|
+
input_file_id: inputFileId,
|
|
1280
|
+
...args.lang ? { lang: args.lang } : {}
|
|
1223
1281
|
});
|
|
1224
1282
|
const env = normalizeUploadResponse(data);
|
|
1225
1283
|
if (env.return_code !== 0 && env.return_code !== void 0 && !env.data?.eventErrorMap && !env.data?.userErrorMap) {
|
|
@@ -2067,7 +2125,8 @@ function registerPlan(cmd, rootProgram) {
|
|
|
2067
2125
|
lastRes = await client.uploadProgramExcel({
|
|
2068
2126
|
projectId: opts.project,
|
|
2069
2127
|
file,
|
|
2070
|
-
filename: path3.basename(opts.xlsx)
|
|
2128
|
+
filename: path3.basename(opts.xlsx),
|
|
2129
|
+
lang: locale
|
|
2071
2130
|
});
|
|
2072
2131
|
console.log(JSON.stringify(lastRes, null, 2));
|
|
2073
2132
|
if (lastRes.return_code === -1001 && !tokenRefreshed) {
|
|
@@ -3000,41 +3059,44 @@ var require2 = createRequire(import.meta.url);
|
|
|
3000
3059
|
var pkg = require2("../package.json");
|
|
3001
3060
|
var { version } = pkg;
|
|
3002
3061
|
var program = new CommanderCommand();
|
|
3003
|
-
program.name("ae-cli").version(version).description("CLI tool for ThinkingAI (AE) analytics platform").option("--host <url>", "Override active AE host URL (e.g., https://ta.thinkingdata.cn)").option("--mcp-url <url>", "Override MCP server URL (e.g., http://localhost/mcp/http/example)").option("--format <format>", "Output format: json | table", "json").option("--jq <expr>", "jq
|
|
3062
|
+
program.name("ae-cli").version(version).description("CLI tool for ThinkingAI (AE) analytics platform").option("--host <url>", "Override active AE host URL (e.g., https://ta.thinkingdata.cn)").option("--mcp-url <url>", "Override MCP server URL (e.g., http://localhost/mcp/http/example)").option("--format <format>", "Output format: json | table", "json").option("--jq <expr>", "jq 1.8 filter over command payload (via jq-wasm), applied before output envelope").option(
|
|
3063
|
+
"--validate",
|
|
3064
|
+
"Optional: validate/normalize capability input only (gateway /validate). Use alone while fixing complex params/qp; do not stack with --dry-run",
|
|
3065
|
+
false
|
|
3066
|
+
).option(
|
|
3067
|
+
"--dry-run",
|
|
3068
|
+
"Optional: pre-execution preview without business logic (gateway /dry-run; other transports preview). Use alone to confirm a run; do not stack with --validate",
|
|
3069
|
+
false
|
|
3070
|
+
).option("--yes", "Skip confirmation for high-risk write operations", false).option("--no-update-check", "Skip checking for newer ae-cli versions", false);
|
|
3004
3071
|
async function loadCommands() {
|
|
3005
3072
|
const commands = [];
|
|
3006
3073
|
try {
|
|
3007
|
-
const teAnalysis = await import("./te-analysis-
|
|
3074
|
+
const teAnalysis = await import("./te-analysis-NJGNWZFC.js");
|
|
3008
3075
|
commands.push(...teAnalysis.default);
|
|
3009
3076
|
} catch {
|
|
3010
3077
|
}
|
|
3011
3078
|
try {
|
|
3012
|
-
const
|
|
3013
|
-
commands.push(...teAudience.default);
|
|
3014
|
-
} catch {
|
|
3015
|
-
}
|
|
3016
|
-
try {
|
|
3017
|
-
const teMeta = await import("./te-meta-PKT27OTN.js");
|
|
3079
|
+
const teMeta = await import("./te-meta-MAAUHFQO.js");
|
|
3018
3080
|
commands.push(...teMeta.default);
|
|
3019
3081
|
} catch {
|
|
3020
3082
|
}
|
|
3021
3083
|
try {
|
|
3022
|
-
const teCommon = await import("./te-common-
|
|
3084
|
+
const teCommon = await import("./te-common-7VTJZPII.js");
|
|
3023
3085
|
commands.push(...teCommon.default);
|
|
3024
3086
|
} catch {
|
|
3025
3087
|
}
|
|
3026
3088
|
try {
|
|
3027
|
-
const engage = await import("./te-engage-
|
|
3089
|
+
const engage = await import("./te-engage-BUWVSSSK.js");
|
|
3028
3090
|
commands.push(...engage.default);
|
|
3029
3091
|
} catch {
|
|
3030
3092
|
}
|
|
3031
3093
|
try {
|
|
3032
|
-
const community = await import("./te-community-
|
|
3094
|
+
const community = await import("./te-community-TSKJ652U.js");
|
|
3033
3095
|
commands.push(...community.default);
|
|
3034
3096
|
} catch {
|
|
3035
3097
|
}
|
|
3036
3098
|
try {
|
|
3037
|
-
const dataops = await import("./te-dataops-
|
|
3099
|
+
const dataops = await import("./te-dataops-F36T656A.js");
|
|
3038
3100
|
commands.push(...dataops.default);
|
|
3039
3101
|
} catch {
|
|
3040
3102
|
}
|
|
@@ -3044,17 +3106,17 @@ async function loadCommands() {
|
|
|
3044
3106
|
} catch {
|
|
3045
3107
|
}
|
|
3046
3108
|
try {
|
|
3047
|
-
const teTeam = await import("./te-team-
|
|
3109
|
+
const teTeam = await import("./te-team-OKCOX7OE.js");
|
|
3048
3110
|
commands.push(...teTeam.default);
|
|
3049
3111
|
} catch {
|
|
3050
3112
|
}
|
|
3051
3113
|
try {
|
|
3052
|
-
const teAgent = await import("./te-agent-
|
|
3114
|
+
const teAgent = await import("./te-agent-FCCWUDTJ.js");
|
|
3053
3115
|
commands.push(...teAgent.default);
|
|
3054
3116
|
} catch {
|
|
3055
3117
|
}
|
|
3056
3118
|
try {
|
|
3057
|
-
const metadata = await import("./metadata-
|
|
3119
|
+
const metadata = await import("./metadata-W6JFFMBA.js");
|
|
3058
3120
|
commands.push(...metadata.default);
|
|
3059
3121
|
} catch {
|
|
3060
3122
|
}
|
|
@@ -3062,35 +3124,35 @@ async function loadCommands() {
|
|
|
3062
3124
|
}
|
|
3063
3125
|
async function registerAuthCommands() {
|
|
3064
3126
|
try {
|
|
3065
|
-
const { registerAuth } = await import("./auth-
|
|
3127
|
+
const { registerAuth } = await import("./auth-7H3HAAJ3.js");
|
|
3066
3128
|
registerAuth(program);
|
|
3067
3129
|
} catch {
|
|
3068
3130
|
}
|
|
3069
3131
|
}
|
|
3070
3132
|
async function registerConfigCommands() {
|
|
3071
3133
|
try {
|
|
3072
|
-
const { registerConfig } = await import("./config-
|
|
3134
|
+
const { registerConfig } = await import("./config-7UZWDE74.js");
|
|
3073
3135
|
registerConfig(program);
|
|
3074
3136
|
} catch {
|
|
3075
3137
|
}
|
|
3076
3138
|
}
|
|
3077
3139
|
async function registerApiCommand() {
|
|
3078
3140
|
try {
|
|
3079
|
-
const { registerApi } = await import("./raw-
|
|
3141
|
+
const { registerApi } = await import("./raw-CN542NGT.js");
|
|
3080
3142
|
registerApi(program);
|
|
3081
3143
|
} catch {
|
|
3082
3144
|
}
|
|
3083
3145
|
}
|
|
3084
3146
|
async function registerCapabilityCommands() {
|
|
3085
3147
|
try {
|
|
3086
|
-
const { registerCapability } = await import("./capability-
|
|
3148
|
+
const { registerCapability } = await import("./capability-SEH3JWLN.js");
|
|
3087
3149
|
registerCapability(program);
|
|
3088
3150
|
} catch {
|
|
3089
3151
|
}
|
|
3090
3152
|
}
|
|
3091
3153
|
async function registerSyncCommand() {
|
|
3092
3154
|
try {
|
|
3093
|
-
const { registerSync } = await import("./sync-
|
|
3155
|
+
const { registerSync } = await import("./sync-ERNHDPB5.js");
|
|
3094
3156
|
registerSync(program);
|
|
3095
3157
|
} catch {
|
|
3096
3158
|
}
|
|
@@ -3113,6 +3175,41 @@ async function main() {
|
|
|
3113
3175
|
await registerSyncCommand();
|
|
3114
3176
|
await registerModelCommand();
|
|
3115
3177
|
registerTracking(program);
|
|
3178
|
+
rejectUnknownHelpCommandPath(program, process.argv.slice(2));
|
|
3116
3179
|
program.parse();
|
|
3117
3180
|
}
|
|
3118
3181
|
main();
|
|
3182
|
+
function rejectUnknownHelpCommandPath(root, args) {
|
|
3183
|
+
if (!args.includes("--help") && !args.includes("-h")) {
|
|
3184
|
+
return;
|
|
3185
|
+
}
|
|
3186
|
+
let current = root;
|
|
3187
|
+
for (let i = 0; i < args.length; i += 1) {
|
|
3188
|
+
const token = args[i];
|
|
3189
|
+
if (token === "--" || token === "--help" || token === "-h") {
|
|
3190
|
+
return;
|
|
3191
|
+
}
|
|
3192
|
+
if (token.startsWith("-")) {
|
|
3193
|
+
if (optionConsumesValue(token)) {
|
|
3194
|
+
i += 1;
|
|
3195
|
+
}
|
|
3196
|
+
continue;
|
|
3197
|
+
}
|
|
3198
|
+
const child = current.commands.find((cmd) => cmd.name() === token || cmd.aliases().includes(token));
|
|
3199
|
+
if (child) {
|
|
3200
|
+
current = child;
|
|
3201
|
+
continue;
|
|
3202
|
+
}
|
|
3203
|
+
if (current.commands.length > 0) {
|
|
3204
|
+
process.stderr.write(`error: unknown command '${token}'
|
|
3205
|
+
`);
|
|
3206
|
+
process.exit(1);
|
|
3207
|
+
}
|
|
3208
|
+
}
|
|
3209
|
+
}
|
|
3210
|
+
function optionConsumesValue(token) {
|
|
3211
|
+
if (token.includes("=")) {
|
|
3212
|
+
return false;
|
|
3213
|
+
}
|
|
3214
|
+
return token === "--host" || token === "--mcp-url" || token === "--format" || token === "--jq";
|
|
3215
|
+
}
|