@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
|
@@ -1,3188 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createCapabilityCommand
|
|
3
|
-
} from "./chunk-P2JRP6HJ.js";
|
|
4
|
-
import {
|
|
5
|
-
registerCapabilityGatewayRoute
|
|
6
|
-
} from "./chunk-CWZUGF2J.js";
|
|
7
|
-
import {
|
|
8
|
-
buildCapabilityGatewayUrl,
|
|
9
|
-
callCapabilityApi,
|
|
10
|
-
downloadCapabilityArtifact
|
|
11
|
-
} from "./chunk-THBBNYXI.js";
|
|
12
|
-
import {
|
|
13
|
-
callMcpTool,
|
|
14
|
-
parseMcpResult,
|
|
15
|
-
resolveMcpUrl
|
|
16
|
-
} from "./chunk-GWZ5MYWE.js";
|
|
17
|
-
import {
|
|
18
|
-
isGlobalQueryModeEnabled
|
|
19
|
-
} from "./chunk-KGJQCYVC.js";
|
|
20
|
-
import "./chunk-NOO24N7W.js";
|
|
21
|
-
import "./chunk-2NDGFQHW.js";
|
|
22
|
-
import "./chunk-AJTH7LT3.js";
|
|
23
|
-
import "./chunk-YCLVYFK7.js";
|
|
24
|
-
|
|
25
|
-
// src/commands/te-analysis/shared.ts
|
|
26
|
-
function createMcpCommand(config) {
|
|
27
|
-
const toolName = config.command.slice(1);
|
|
28
|
-
const mcpService = config.mcpService || "analysis";
|
|
29
|
-
return {
|
|
30
|
-
service: "analysis",
|
|
31
|
-
command: config.command,
|
|
32
|
-
description: config.description,
|
|
33
|
-
flags: config.flags,
|
|
34
|
-
risk: config.risk,
|
|
35
|
-
validate: config.validate,
|
|
36
|
-
dryRun: (ctx) => ({
|
|
37
|
-
method: "tools/call",
|
|
38
|
-
url: resolveMcpUrl(ctx.mcpUrl(), ctx.host(), mcpService),
|
|
39
|
-
body: {
|
|
40
|
-
name: toolName,
|
|
41
|
-
arguments: config.buildArgs(ctx)
|
|
42
|
-
}
|
|
43
|
-
}),
|
|
44
|
-
execute: async (ctx) => {
|
|
45
|
-
const url = resolveMcpUrl(ctx.mcpUrl(), ctx.host(), mcpService);
|
|
46
|
-
const result = await callMcpTool(url, toolName, config.buildArgs(ctx), ctx.host());
|
|
47
|
-
return parseMcpResult(result);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
function optionalString(ctx, name) {
|
|
52
|
-
const value = ctx.str(name);
|
|
53
|
-
return value === "" ? void 0 : value;
|
|
54
|
-
}
|
|
55
|
-
function optionalNumber(ctx, name) {
|
|
56
|
-
const value = ctx.str(name);
|
|
57
|
-
return value === "" ? void 0 : Number(value);
|
|
58
|
-
}
|
|
59
|
-
function optionalBoolean(ctx, name) {
|
|
60
|
-
const value = ctx.str(name);
|
|
61
|
-
return value === "" ? void 0 : ctx.bool(name);
|
|
62
|
-
}
|
|
63
|
-
function optionalJson(ctx, name) {
|
|
64
|
-
const value = ctx.str(name);
|
|
65
|
-
return value === "" ? void 0 : ctx.json(name);
|
|
66
|
-
}
|
|
67
|
-
function optionalJsonString(ctx, name) {
|
|
68
|
-
const value = optionalJson(ctx, name);
|
|
69
|
-
return value === void 0 ? void 0 : JSON.stringify(value);
|
|
70
|
-
}
|
|
71
|
-
function requiredJsonString(ctx, name) {
|
|
72
|
-
return JSON.stringify(ctx.json(name));
|
|
73
|
-
}
|
|
74
|
-
function clusterQueryFlags(scopeDesc) {
|
|
75
|
-
if (!isGlobalQueryModeEnabled()) {
|
|
76
|
-
return [];
|
|
77
|
-
}
|
|
78
|
-
return [
|
|
79
|
-
{ name: "cluster_query_scope", type: "string", required: false, desc: scopeDesc },
|
|
80
|
-
{ name: "slave_cluster_id", type: "string", required: false, desc: "Slave cluster ID. Required when cluster_query_scope=SLAVE. Use +list_query_clusters first to choose this value." }
|
|
81
|
-
];
|
|
82
|
-
}
|
|
83
|
-
function optionalClusterQueryArgs(ctx) {
|
|
84
|
-
if (!isGlobalQueryModeEnabled()) {
|
|
85
|
-
return {};
|
|
86
|
-
}
|
|
87
|
-
return {
|
|
88
|
-
clusterQueryScope: optionalString(ctx, "cluster_query_scope"),
|
|
89
|
-
slaveClusterId: optionalString(ctx, "slave_cluster_id")
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
var DEFAULT_QUERY_LIMIT = 1e3;
|
|
93
|
-
var MAX_QUERY_LIMIT = 1e4;
|
|
94
|
-
function assertLimitWithinCap(value, flagName) {
|
|
95
|
-
if (value === void 0) return;
|
|
96
|
-
if (!Number.isInteger(value) || value < 1 || value > MAX_QUERY_LIMIT) {
|
|
97
|
-
throw new Error(`--${flagName} must be an integer between 1 and ${MAX_QUERY_LIMIT} (got: ${value}).`);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
function extractTrailingSqlLimit(sql) {
|
|
101
|
-
const m = sql.match(/\blimit\s+(\d+)(?:\s*,\s*(\d+))?(?:\s+offset\s+\d+)?\s*;?\s*$/i);
|
|
102
|
-
if (!m) return void 0;
|
|
103
|
-
return m[2] !== void 0 ? Number(m[2]) : Number(m[1]);
|
|
104
|
-
}
|
|
105
|
-
function findSqlInQp(qp) {
|
|
106
|
-
let found;
|
|
107
|
-
const visit = (v) => {
|
|
108
|
-
if (found !== void 0) return;
|
|
109
|
-
if (typeof v === "string") {
|
|
110
|
-
if (/\bselect\b/i.test(v) && /\bfrom\b/i.test(v)) found = v;
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
if (Array.isArray(v)) {
|
|
114
|
-
v.forEach(visit);
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
if (v && typeof v === "object") {
|
|
118
|
-
Object.values(v).forEach(visit);
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
visit(qp);
|
|
122
|
-
return found;
|
|
123
|
-
}
|
|
124
|
-
function assertSqlLimitConsistent(qp, providedLimit) {
|
|
125
|
-
if (providedLimit === void 0) return;
|
|
126
|
-
const sql = findSqlInQp(qp);
|
|
127
|
-
if (sql === void 0) return;
|
|
128
|
-
const sqlLimit = extractTrailingSqlLimit(sql);
|
|
129
|
-
if (sqlLimit === void 0) return;
|
|
130
|
-
if (sqlLimit !== providedLimit) {
|
|
131
|
-
throw new Error(
|
|
132
|
-
`Conflicting row limits: SQL "LIMIT ${sqlLimit}" != --limit ${providedLimit}. For model_type=sql, omit LIMIT from the SQL and use --limit, or keep the two equal.`
|
|
133
|
-
);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
function resolveSqlAwareLimit(providedLimit, modelType, qp) {
|
|
137
|
-
if (providedLimit !== void 0) return providedLimit;
|
|
138
|
-
if (modelType === "sql") {
|
|
139
|
-
const sql = findSqlInQp(qp);
|
|
140
|
-
if (sql !== void 0 && extractTrailingSqlLimit(sql) !== void 0) return void 0;
|
|
141
|
-
}
|
|
142
|
-
return DEFAULT_QUERY_LIMIT;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// src/commands/te-analysis/meta/get-alert-definition-schema.ts
|
|
146
|
-
var getAlertDefinitionSchema = createMcpCommand({
|
|
147
|
-
command: "+get_alert_definition_schema",
|
|
148
|
-
description: "Get the alert definition schema. Returns field definitions, enum descriptions, and examples for creating or updating alerts.",
|
|
149
|
-
flags: [],
|
|
150
|
-
risk: "read",
|
|
151
|
-
mcpService: "te_analysis_extend",
|
|
152
|
-
buildArgs: () => ({})
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
// src/commands/te-analysis/meta/list-alerts.ts
|
|
156
|
-
var listAlerts = createMcpCommand({
|
|
157
|
-
command: "+list_alerts",
|
|
158
|
-
description: "List all alerts in the project. Supports keyword filtering by alert name and returns a paginated alert list with total count.",
|
|
159
|
-
flags: [
|
|
160
|
-
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
161
|
-
{ name: "query", type: "string", required: false, alias: "q", desc: "Optional keyword filter. Performs fuzzy matching against alert names; if omitted, all alerts are returned." },
|
|
162
|
-
{ name: "limit", type: "number", required: false, alias: "l", desc: "Optional page size. Default: 20, maximum: 10000." },
|
|
163
|
-
{ name: "offset", type: "number", required: false, alias: "o", desc: "Optional page offset. Default: 0." }
|
|
164
|
-
],
|
|
165
|
-
risk: "read",
|
|
166
|
-
mcpService: "te_analysis_extend",
|
|
167
|
-
buildArgs: (ctx) => ({
|
|
168
|
-
projectId: ctx.num("project_id"),
|
|
169
|
-
query: optionalString(ctx, "query"),
|
|
170
|
-
limit: optionalNumber(ctx, "limit"),
|
|
171
|
-
offset: optionalNumber(ctx, "offset")
|
|
172
|
-
})
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
// src/commands/te-analysis/meta/get-alert.ts
|
|
176
|
-
var getAlert = createMcpCommand({
|
|
177
|
-
command: "+get_alert",
|
|
178
|
-
description: "Get detailed information about a specific alert by alertId.",
|
|
179
|
-
flags: [
|
|
180
|
-
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
181
|
-
{ name: "alert_id", type: "number", required: true, alias: "a", desc: "Alert ID" }
|
|
182
|
-
],
|
|
183
|
-
risk: "read",
|
|
184
|
-
mcpService: "te_analysis_extend",
|
|
185
|
-
buildArgs: (ctx) => ({
|
|
186
|
-
projectId: ctx.num("project_id"),
|
|
187
|
-
alertId: ctx.num("alert_id")
|
|
188
|
-
})
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
// src/commands/te-analysis/meta/create-alert.ts
|
|
192
|
-
var createAlert = createMcpCommand({
|
|
193
|
-
command: "+create_alert",
|
|
194
|
-
description: "Create a new alert. After creation, use list_alerts or get_alert to retrieve the created alert.",
|
|
195
|
-
flags: [
|
|
196
|
-
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
197
|
-
{ name: "definition", type: "json", required: true, desc: "Alert definition JSON. See +get_alert_definition_schema for the complete structure." }
|
|
198
|
-
],
|
|
199
|
-
risk: "write",
|
|
200
|
-
mcpService: "te_analysis_extend",
|
|
201
|
-
buildArgs: (ctx) => ({
|
|
202
|
-
projectId: ctx.num("project_id"),
|
|
203
|
-
definition: requiredJsonString(ctx, "definition")
|
|
204
|
-
})
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
// src/commands/te-analysis/meta/update-alert.ts
|
|
208
|
-
var updateAlert = createMcpCommand({
|
|
209
|
-
command: "+update_alert",
|
|
210
|
-
description: "Update an existing alert. All fields in the definition will replace existing values.",
|
|
211
|
-
flags: [
|
|
212
|
-
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
213
|
-
{ name: "alert_id", type: "number", required: true, alias: "a", desc: "Alert ID" },
|
|
214
|
-
{ name: "definition", type: "json", required: true, desc: "Alert definition JSON with updated fields. See +get_alert_definition_schema for the complete structure." }
|
|
215
|
-
],
|
|
216
|
-
risk: "write",
|
|
217
|
-
mcpService: "te_analysis_extend",
|
|
218
|
-
buildArgs: (ctx) => ({
|
|
219
|
-
projectId: ctx.num("project_id"),
|
|
220
|
-
alertId: ctx.num("alert_id"),
|
|
221
|
-
definition: requiredJsonString(ctx, "definition")
|
|
222
|
-
})
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
// src/commands/te-analysis/meta/delete-alert.ts
|
|
226
|
-
var deleteAlert = createMcpCommand({
|
|
227
|
-
command: "+delete_alert",
|
|
228
|
-
description: "Delete an alert by alertId",
|
|
229
|
-
flags: [
|
|
230
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
231
|
-
{ name: "alert_id", type: "number", required: true, desc: "Alert ID to delete" }
|
|
232
|
-
],
|
|
233
|
-
risk: "high-risk-write",
|
|
234
|
-
mcpService: "te_analysis_extend",
|
|
235
|
-
buildArgs: (ctx) => ({
|
|
236
|
-
projectId: ctx.num("project_id"),
|
|
237
|
-
alertId: ctx.num("alert_id")
|
|
238
|
-
})
|
|
239
|
-
});
|
|
240
|
-
|
|
241
|
-
// src/commands/te-analysis/capability-shared.ts
|
|
242
|
-
function createAnalysisCapabilityCommand(config) {
|
|
243
|
-
return createCapabilityCommand({
|
|
244
|
-
...config,
|
|
245
|
-
cliService: "analysis"
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
function createAnalysisMetaCapabilityCommand(config) {
|
|
249
|
-
return createCapabilityCommand({
|
|
250
|
-
...config,
|
|
251
|
-
cliService: "analysis-meta",
|
|
252
|
-
gatewayDomain: "analysis"
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
var projectIdFlag = {
|
|
256
|
-
name: "project-id",
|
|
257
|
-
type: "number",
|
|
258
|
-
required: true,
|
|
259
|
-
desc: "Numeric project ID.",
|
|
260
|
-
alias: "p"
|
|
261
|
-
};
|
|
262
|
-
var queryFlag = {
|
|
263
|
-
name: "query",
|
|
264
|
-
type: "string",
|
|
265
|
-
required: false,
|
|
266
|
-
desc: "Optional keyword filter.",
|
|
267
|
-
alias: "q"
|
|
268
|
-
};
|
|
269
|
-
var fieldsFlag = {
|
|
270
|
-
name: "fields",
|
|
271
|
-
type: "json",
|
|
272
|
-
required: false,
|
|
273
|
-
desc: "Optional result field projection JSON array.",
|
|
274
|
-
alias: "f"
|
|
275
|
-
};
|
|
276
|
-
var limitFlag = {
|
|
277
|
-
name: "limit",
|
|
278
|
-
type: "number",
|
|
279
|
-
required: false,
|
|
280
|
-
desc: "Optional inline result limit.",
|
|
281
|
-
alias: "l"
|
|
282
|
-
};
|
|
283
|
-
var offsetFlag = {
|
|
284
|
-
name: "offset",
|
|
285
|
-
type: "number",
|
|
286
|
-
required: false,
|
|
287
|
-
desc: "Optional zero-based result offset.",
|
|
288
|
-
alias: "o"
|
|
289
|
-
};
|
|
290
|
-
var payloadFlag = {
|
|
291
|
-
name: "payload",
|
|
292
|
-
type: "json",
|
|
293
|
-
required: false,
|
|
294
|
-
desc: "Optional snake_case object for complex capability payload fields."
|
|
295
|
-
};
|
|
296
|
-
function projectInput(ctx) {
|
|
297
|
-
return { project_id: ctx.num("project-id") };
|
|
298
|
-
}
|
|
299
|
-
function listInput(ctx) {
|
|
300
|
-
return compactInput({
|
|
301
|
-
...projectInput(ctx),
|
|
302
|
-
query: optionalString2(ctx, "query"),
|
|
303
|
-
fields: optionalJson2(ctx, "fields"),
|
|
304
|
-
limit: optionalNumber2(ctx, "limit"),
|
|
305
|
-
offset: optionalNumber2(ctx, "offset")
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
function dashboardReportDataInput(ctx) {
|
|
309
|
-
return compactInput({
|
|
310
|
-
...projectInput(ctx),
|
|
311
|
-
dashboard_id: ctx.num("dashboard-id"),
|
|
312
|
-
report_ids: optionalJsonArray(ctx, "report-ids"),
|
|
313
|
-
filters: optionalJson2(ctx, "filters"),
|
|
314
|
-
start_time: optionalString2(ctx, "start-time"),
|
|
315
|
-
end_time: optionalString2(ctx, "end-time"),
|
|
316
|
-
use_cache: optionalBoolean2(ctx, "use-cache"),
|
|
317
|
-
request_id: optionalString2(ctx, "request-id"),
|
|
318
|
-
timeout_seconds: optionalNumber2(ctx, "timeout-seconds"),
|
|
319
|
-
limit: optionalNumber2(ctx, "limit"),
|
|
320
|
-
format: optionalString2(ctx, "artifact-format")
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
function biPanelPageDataInput(ctx) {
|
|
324
|
-
return compactInput({
|
|
325
|
-
...projectInput(ctx),
|
|
326
|
-
panel_id: ctx.num("panel-id"),
|
|
327
|
-
page_key: ctx.str("page-key"),
|
|
328
|
-
result_type: ctx.str("result-type"),
|
|
329
|
-
chart_ids: optionalJsonArray(ctx, "chart-ids"),
|
|
330
|
-
parameter_controls: optionalJson2(ctx, "parameter-controls"),
|
|
331
|
-
permission_controls: optionalJson2(ctx, "permission-controls"),
|
|
332
|
-
chart_filter_controls: optionalJson2(ctx, "chart-filter-controls"),
|
|
333
|
-
columns: optionalJson2(ctx, "columns"),
|
|
334
|
-
row_limit: optionalNumber2(ctx, "row-limit"),
|
|
335
|
-
row_offset: optionalNumber2(ctx, "row-offset"),
|
|
336
|
-
block_limit: optionalNumber2(ctx, "block-limit"),
|
|
337
|
-
block_offset: optionalNumber2(ctx, "block-offset"),
|
|
338
|
-
use_cache: optionalBoolean2(ctx, "use-cache"),
|
|
339
|
-
request_id: optionalString2(ctx, "request-id"),
|
|
340
|
-
timeout_seconds: optionalNumber2(ctx, "timeout-seconds"),
|
|
341
|
-
limit: optionalNumber2(ctx, "limit"),
|
|
342
|
-
format: optionalString2(ctx, "artifact-format")
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
function optionalString2(ctx, name) {
|
|
346
|
-
const value = ctx.str(name);
|
|
347
|
-
return value === "" ? void 0 : value;
|
|
348
|
-
}
|
|
349
|
-
function optionalNumber2(ctx, name) {
|
|
350
|
-
const value = ctx.str(name);
|
|
351
|
-
return value === "" ? void 0 : Number(value);
|
|
352
|
-
}
|
|
353
|
-
function optionalBoolean2(ctx, name) {
|
|
354
|
-
const value = ctx.str(name);
|
|
355
|
-
return value === "" ? void 0 : ctx.bool(name);
|
|
356
|
-
}
|
|
357
|
-
function stringWithDefault(ctx, name, defaultValue) {
|
|
358
|
-
const value = ctx.str(name);
|
|
359
|
-
return value === "" ? defaultValue : value;
|
|
360
|
-
}
|
|
361
|
-
function numberWithDefault(ctx, name, defaultValue) {
|
|
362
|
-
const value = ctx.str(name);
|
|
363
|
-
return value === "" ? defaultValue : Number(value);
|
|
364
|
-
}
|
|
365
|
-
function booleanWithDefault(ctx, name, defaultValue) {
|
|
366
|
-
const value = ctx.str(name);
|
|
367
|
-
return value === "" ? defaultValue : ctx.bool(name);
|
|
368
|
-
}
|
|
369
|
-
function optionalJson2(ctx, name) {
|
|
370
|
-
const value = ctx.str(name);
|
|
371
|
-
return value === "" ? void 0 : ctx.json(name);
|
|
372
|
-
}
|
|
373
|
-
function jsonArray(ctx, name) {
|
|
374
|
-
const value = ctx.json(name);
|
|
375
|
-
return Array.isArray(value) ? value : [value];
|
|
376
|
-
}
|
|
377
|
-
function optionalJsonArray(ctx, name) {
|
|
378
|
-
const value = ctx.str(name);
|
|
379
|
-
if (value === "") {
|
|
380
|
-
return void 0;
|
|
381
|
-
}
|
|
382
|
-
const parsed = ctx.json(name);
|
|
383
|
-
return Array.isArray(parsed) ? parsed : [parsed];
|
|
384
|
-
}
|
|
385
|
-
function compactInput(input) {
|
|
386
|
-
const result = {};
|
|
387
|
-
for (const [key, value] of Object.entries(input)) {
|
|
388
|
-
if (value !== void 0) {
|
|
389
|
-
result[key] = value;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
return result;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
// src/commands/te-analysis/meta/event/list.ts
|
|
396
|
-
var metadataEventList = createAnalysisMetaCapabilityCommand({
|
|
397
|
-
resource: "event",
|
|
398
|
-
command: "list",
|
|
399
|
-
capabilityId: "metadata.event.list",
|
|
400
|
-
description: "List project super events.",
|
|
401
|
-
flags: [
|
|
402
|
-
projectIdFlag
|
|
403
|
-
],
|
|
404
|
-
risk: "read",
|
|
405
|
-
buildInput: projectInput
|
|
406
|
-
});
|
|
407
|
-
|
|
408
|
-
// src/commands/te-analysis/meta/event/get.ts
|
|
409
|
-
var metadataEventGet = createAnalysisMetaCapabilityCommand({
|
|
410
|
-
resource: "event",
|
|
411
|
-
command: "get",
|
|
412
|
-
capabilityId: "metadata.event.get",
|
|
413
|
-
description: "Get one super event metadata detail.",
|
|
414
|
-
flags: [
|
|
415
|
-
projectIdFlag,
|
|
416
|
-
{ name: "event-name", type: "string", required: true, desc: "Event name." }
|
|
417
|
-
],
|
|
418
|
-
risk: "read",
|
|
419
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), event_name: ctx.str("event-name") })
|
|
420
|
-
});
|
|
421
|
-
|
|
422
|
-
// src/commands/te-analysis/meta/event/create.ts
|
|
423
|
-
var metadataEventCreate = createAnalysisMetaCapabilityCommand({
|
|
424
|
-
resource: "event",
|
|
425
|
-
command: "create",
|
|
426
|
-
capabilityId: "metadata.event.create",
|
|
427
|
-
description: "Create super events and optionally associate event properties.",
|
|
428
|
-
flags: [
|
|
429
|
-
projectIdFlag,
|
|
430
|
-
payloadFlag
|
|
431
|
-
],
|
|
432
|
-
risk: "write",
|
|
433
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), payload: ctx.json("payload") })
|
|
434
|
-
});
|
|
435
|
-
|
|
436
|
-
// src/commands/te-analysis/meta/event/update.ts
|
|
437
|
-
var metadataEventUpdate = createAnalysisMetaCapabilityCommand({
|
|
438
|
-
resource: "event",
|
|
439
|
-
command: "update",
|
|
440
|
-
capabilityId: "metadata.event.update",
|
|
441
|
-
description: "Update event display names and remarks.",
|
|
442
|
-
flags: [
|
|
443
|
-
projectIdFlag,
|
|
444
|
-
{ name: "event-name", type: "string", required: true, desc: "Event name." },
|
|
445
|
-
{ name: "event-desc", type: "string", required: false, desc: "Event display name." },
|
|
446
|
-
{ name: "remark", type: "string", required: false, desc: "Event remark." }
|
|
447
|
-
],
|
|
448
|
-
risk: "write",
|
|
449
|
-
buildInput: (ctx) => compactInput({ ...projectInput(ctx), event_name: ctx.str("event-name"), event_desc: optionalString2(ctx, "event-desc"), remark: optionalString2(ctx, "remark") })
|
|
450
|
-
});
|
|
451
|
-
|
|
452
|
-
// src/commands/te-analysis/meta/event/relation-update.ts
|
|
453
|
-
var metadataEventRelationUpdate = createAnalysisMetaCapabilityCommand({
|
|
454
|
-
resource: "event",
|
|
455
|
-
command: "relation-update",
|
|
456
|
-
capabilityId: "metadata.event.relation_update",
|
|
457
|
-
description: "Update event-property connection or source relations.",
|
|
458
|
-
flags: [
|
|
459
|
-
projectIdFlag,
|
|
460
|
-
payloadFlag
|
|
461
|
-
],
|
|
462
|
-
risk: "write",
|
|
463
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), payload: ctx.json("payload") })
|
|
464
|
-
});
|
|
465
|
-
|
|
466
|
-
// src/commands/te-analysis/meta/event/hide-update.ts
|
|
467
|
-
var metadataEventHideUpdate = createAnalysisMetaCapabilityCommand({
|
|
468
|
-
resource: "event",
|
|
469
|
-
command: "hide-update",
|
|
470
|
-
capabilityId: "metadata.event.hide_update",
|
|
471
|
-
description: "Batch hide or show events.",
|
|
472
|
-
flags: [
|
|
473
|
-
projectIdFlag,
|
|
474
|
-
{ name: "event-names", type: "json", required: true, desc: "Event names JSON array, or a JSON string accepted by common-service." },
|
|
475
|
-
{ name: "is-hide", type: "boolean", required: true, desc: "Whether to hide the events." }
|
|
476
|
-
],
|
|
477
|
-
risk: "write",
|
|
478
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), event_names: ctx.json("event-names"), is_hide: ctx.bool("is-hide") })
|
|
479
|
-
});
|
|
480
|
-
|
|
481
|
-
// src/commands/te-analysis/meta/event/delete.ts
|
|
482
|
-
var metadataEventDelete = createAnalysisMetaCapabilityCommand({
|
|
483
|
-
resource: "event",
|
|
484
|
-
command: "delete",
|
|
485
|
-
capabilityId: "metadata.event.delete",
|
|
486
|
-
description: "Batch delete events or virtual events.",
|
|
487
|
-
flags: [
|
|
488
|
-
projectIdFlag,
|
|
489
|
-
{ name: "event-names", type: "json", required: true, desc: "Event names JSON array, or a JSON string accepted by common-service." }
|
|
490
|
-
],
|
|
491
|
-
risk: "high-risk-write",
|
|
492
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), event_names: ctx.json("event-names") })
|
|
493
|
-
});
|
|
494
|
-
|
|
495
|
-
// src/commands/te-analysis/meta/event/influence-list.ts
|
|
496
|
-
var metadataEventInfluenceList = createAnalysisMetaCapabilityCommand({
|
|
497
|
-
resource: "event",
|
|
498
|
-
command: "influence-list",
|
|
499
|
-
capabilityId: "metadata.event.influence_list",
|
|
500
|
-
description: "List assets affected by event delete, hide, or update.",
|
|
501
|
-
flags: [
|
|
502
|
-
projectIdFlag,
|
|
503
|
-
{ name: "event-name", type: "string", required: true, desc: "Event name." }
|
|
504
|
-
],
|
|
505
|
-
risk: "read",
|
|
506
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), event_name: ctx.str("event-name") })
|
|
507
|
-
});
|
|
508
|
-
|
|
509
|
-
// src/commands/te-analysis/meta/event/changelog-list.ts
|
|
510
|
-
var metadataEventChangelogList = createAnalysisMetaCapabilityCommand({
|
|
511
|
-
resource: "event",
|
|
512
|
-
command: "changelog-list",
|
|
513
|
-
capabilityId: "metadata.event.changelog_list",
|
|
514
|
-
description: "List event metadata change logs.",
|
|
515
|
-
flags: [
|
|
516
|
-
projectIdFlag,
|
|
517
|
-
{ name: "event-name", type: "string", required: true, desc: "Event name." }
|
|
518
|
-
],
|
|
519
|
-
risk: "read",
|
|
520
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), event_name: ctx.str("event-name") })
|
|
521
|
-
});
|
|
522
|
-
|
|
523
|
-
// src/commands/te-analysis/meta/event/index.ts
|
|
524
|
-
var commands = [
|
|
525
|
-
metadataEventList,
|
|
526
|
-
metadataEventGet,
|
|
527
|
-
metadataEventCreate,
|
|
528
|
-
metadataEventUpdate,
|
|
529
|
-
metadataEventRelationUpdate,
|
|
530
|
-
metadataEventHideUpdate,
|
|
531
|
-
metadataEventDelete,
|
|
532
|
-
metadataEventInfluenceList,
|
|
533
|
-
metadataEventChangelogList
|
|
534
|
-
];
|
|
535
|
-
var event_default = commands;
|
|
536
|
-
|
|
537
|
-
// src/commands/te-analysis/meta/property/list.ts
|
|
538
|
-
var metadataPropertyList = createAnalysisMetaCapabilityCommand({
|
|
539
|
-
resource: "property",
|
|
540
|
-
command: "list",
|
|
541
|
-
capabilityId: "metadata.property.list",
|
|
542
|
-
description: "List event or user properties.",
|
|
543
|
-
flags: [
|
|
544
|
-
projectIdFlag,
|
|
545
|
-
{ name: "table-type", type: "string", required: true, desc: "Property table type." }
|
|
546
|
-
],
|
|
547
|
-
risk: "read",
|
|
548
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), table_type: ctx.str("table-type") })
|
|
549
|
-
});
|
|
550
|
-
|
|
551
|
-
// src/commands/te-analysis/meta/property/get.ts
|
|
552
|
-
var metadataPropertyGet = createAnalysisMetaCapabilityCommand({
|
|
553
|
-
resource: "property",
|
|
554
|
-
command: "get",
|
|
555
|
-
capabilityId: "metadata.property.get",
|
|
556
|
-
description: "Get one event or user property metadata detail.",
|
|
557
|
-
flags: [
|
|
558
|
-
projectIdFlag,
|
|
559
|
-
{ name: "table-type", type: "string", required: true, desc: "Property table type." },
|
|
560
|
-
{ name: "prop-name", type: "string", required: true, desc: "Property column name." }
|
|
561
|
-
],
|
|
562
|
-
risk: "read",
|
|
563
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), table_type: ctx.str("table-type"), prop_name: ctx.str("prop-name") })
|
|
564
|
-
});
|
|
565
|
-
|
|
566
|
-
// src/commands/te-analysis/meta/property/create.ts
|
|
567
|
-
var metadataPropertyCreate = createAnalysisMetaCapabilityCommand({
|
|
568
|
-
resource: "property",
|
|
569
|
-
command: "create",
|
|
570
|
-
capabilityId: "metadata.property.create",
|
|
571
|
-
description: "Create event or user properties and optionally associate events.",
|
|
572
|
-
flags: [
|
|
573
|
-
projectIdFlag,
|
|
574
|
-
{ name: "table-type", type: "string", required: true, desc: "Property table type." },
|
|
575
|
-
payloadFlag
|
|
576
|
-
],
|
|
577
|
-
risk: "write",
|
|
578
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), table_type: ctx.str("table-type"), payload: ctx.json("payload") })
|
|
579
|
-
});
|
|
580
|
-
|
|
581
|
-
// src/commands/te-analysis/meta/property/update.ts
|
|
582
|
-
var metadataPropertyUpdate = createAnalysisMetaCapabilityCommand({
|
|
583
|
-
resource: "property",
|
|
584
|
-
command: "update",
|
|
585
|
-
capabilityId: "metadata.property.update",
|
|
586
|
-
description: "Update property display names and remarks.",
|
|
587
|
-
flags: [
|
|
588
|
-
projectIdFlag,
|
|
589
|
-
{ name: "table-type", type: "string", required: true, desc: "Property table type." },
|
|
590
|
-
{ name: "prop-name", type: "string", required: true, desc: "Property column name." },
|
|
591
|
-
{ name: "prop-desc", type: "string", required: false, desc: "Property display name." },
|
|
592
|
-
{ name: "prop-remark", type: "string", required: false, desc: "Property remark." }
|
|
593
|
-
],
|
|
594
|
-
risk: "write",
|
|
595
|
-
buildInput: (ctx) => compactInput({ ...projectInput(ctx), table_type: ctx.str("table-type"), prop_name: ctx.str("prop-name"), prop_desc: optionalString2(ctx, "prop-desc"), prop_remark: optionalString2(ctx, "prop-remark") })
|
|
596
|
-
});
|
|
597
|
-
|
|
598
|
-
// src/commands/te-analysis/meta/property/relation-update.ts
|
|
599
|
-
var metadataPropertyRelationUpdate = createAnalysisMetaCapabilityCommand({
|
|
600
|
-
resource: "property",
|
|
601
|
-
command: "relation-update",
|
|
602
|
-
capabilityId: "metadata.property.relation_update",
|
|
603
|
-
description: "Update property type, connection relation, or event mapping.",
|
|
604
|
-
flags: [
|
|
605
|
-
projectIdFlag,
|
|
606
|
-
{ name: "table-type", type: "string", required: true, desc: "Property table type." },
|
|
607
|
-
payloadFlag
|
|
608
|
-
],
|
|
609
|
-
risk: "write",
|
|
610
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), table_type: ctx.str("table-type"), payload: ctx.json("payload") })
|
|
611
|
-
});
|
|
612
|
-
|
|
613
|
-
// src/commands/te-analysis/meta/property/hide-update.ts
|
|
614
|
-
var metadataPropertyHideUpdate = createAnalysisMetaCapabilityCommand({
|
|
615
|
-
resource: "property",
|
|
616
|
-
command: "hide-update",
|
|
617
|
-
capabilityId: "metadata.property.hide_update",
|
|
618
|
-
description: "Batch hide or show properties.",
|
|
619
|
-
flags: [
|
|
620
|
-
projectIdFlag,
|
|
621
|
-
{ name: "table-type", type: "string", required: true, desc: "Property table type." },
|
|
622
|
-
{ name: "prop-names", type: "json", required: true, desc: "Property names JSON array, or a JSON string accepted by common-service." },
|
|
623
|
-
{ name: "is-hide", type: "boolean", required: true, desc: "Whether to hide the properties." }
|
|
624
|
-
],
|
|
625
|
-
risk: "write",
|
|
626
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), table_type: ctx.str("table-type"), prop_names: ctx.json("prop-names"), is_hide: ctx.bool("is-hide") })
|
|
627
|
-
});
|
|
628
|
-
|
|
629
|
-
// src/commands/te-analysis/meta/property/delete.ts
|
|
630
|
-
var metadataPropertyDelete = createAnalysisMetaCapabilityCommand({
|
|
631
|
-
resource: "property",
|
|
632
|
-
command: "delete",
|
|
633
|
-
capabilityId: "metadata.property.delete",
|
|
634
|
-
description: "Batch delete properties or virtual properties.",
|
|
635
|
-
flags: [
|
|
636
|
-
projectIdFlag,
|
|
637
|
-
{ name: "table-type", type: "string", required: true, desc: "Property table type." },
|
|
638
|
-
{ name: "prop-names", type: "json", required: true, desc: "Property names JSON array, or a JSON string accepted by common-service." }
|
|
639
|
-
],
|
|
640
|
-
risk: "high-risk-write",
|
|
641
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), table_type: ctx.str("table-type"), prop_names: ctx.json("prop-names") })
|
|
642
|
-
});
|
|
643
|
-
|
|
644
|
-
// src/commands/te-analysis/meta/property/influence-list.ts
|
|
645
|
-
var metadataPropertyInfluenceList = createAnalysisMetaCapabilityCommand({
|
|
646
|
-
resource: "property",
|
|
647
|
-
command: "influence-list",
|
|
648
|
-
capabilityId: "metadata.property.influence_list",
|
|
649
|
-
description: "List assets affected by property changes.",
|
|
650
|
-
flags: [
|
|
651
|
-
projectIdFlag,
|
|
652
|
-
{ name: "table-type", type: "string", required: true, desc: "Property table type." },
|
|
653
|
-
{ name: "prop-name", type: "string", required: true, desc: "Property column name." }
|
|
654
|
-
],
|
|
655
|
-
risk: "read",
|
|
656
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), table_type: ctx.str("table-type"), prop_name: ctx.str("prop-name") })
|
|
657
|
-
});
|
|
658
|
-
|
|
659
|
-
// src/commands/te-analysis/meta/property/changelog-list.ts
|
|
660
|
-
var metadataPropertyChangelogList = createAnalysisMetaCapabilityCommand({
|
|
661
|
-
resource: "property",
|
|
662
|
-
command: "changelog-list",
|
|
663
|
-
capabilityId: "metadata.property.changelog_list",
|
|
664
|
-
description: "List property metadata change logs.",
|
|
665
|
-
flags: [
|
|
666
|
-
projectIdFlag,
|
|
667
|
-
{ name: "table-type", type: "string", required: true, desc: "Property table type." },
|
|
668
|
-
{ name: "prop-name", type: "string", required: true, desc: "Property column name." }
|
|
669
|
-
],
|
|
670
|
-
risk: "read",
|
|
671
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), table_type: ctx.str("table-type"), prop_name: ctx.str("prop-name") })
|
|
672
|
-
});
|
|
673
|
-
|
|
674
|
-
// src/commands/te-analysis/meta/property/related-events.ts
|
|
675
|
-
var metadataPropertyRelatedEvents = createAnalysisMetaCapabilityCommand({
|
|
676
|
-
resource: "property",
|
|
677
|
-
command: "related-events",
|
|
678
|
-
capabilityId: "metadata.property.related_events",
|
|
679
|
-
description: "List events related to one event property.",
|
|
680
|
-
flags: [
|
|
681
|
-
projectIdFlag,
|
|
682
|
-
{ name: "prop-name", type: "string", required: true, desc: "Event property column name." }
|
|
683
|
-
],
|
|
684
|
-
risk: "read",
|
|
685
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), prop_name: ctx.str("prop-name") })
|
|
686
|
-
});
|
|
687
|
-
|
|
688
|
-
// src/commands/te-analysis/meta/property/index.ts
|
|
689
|
-
var commands2 = [
|
|
690
|
-
metadataPropertyList,
|
|
691
|
-
metadataPropertyGet,
|
|
692
|
-
metadataPropertyCreate,
|
|
693
|
-
metadataPropertyUpdate,
|
|
694
|
-
metadataPropertyRelationUpdate,
|
|
695
|
-
metadataPropertyHideUpdate,
|
|
696
|
-
metadataPropertyDelete,
|
|
697
|
-
metadataPropertyInfluenceList,
|
|
698
|
-
metadataPropertyChangelogList,
|
|
699
|
-
metadataPropertyRelatedEvents
|
|
700
|
-
];
|
|
701
|
-
var property_default = commands2;
|
|
702
|
-
|
|
703
|
-
// src/commands/te-analysis/meta/virtual-event/create.ts
|
|
704
|
-
var metadataVirtualEventCreate = createAnalysisMetaCapabilityCommand({
|
|
705
|
-
resource: "virtual-event",
|
|
706
|
-
command: "create",
|
|
707
|
-
capabilityId: "metadata.virtual_event.create",
|
|
708
|
-
description: "Create a virtual event from events and filters.",
|
|
709
|
-
flags: [
|
|
710
|
-
projectIdFlag,
|
|
711
|
-
payloadFlag,
|
|
712
|
-
{ name: "override", type: "boolean", required: false, desc: "Whether to override an existing virtual event rule." }
|
|
713
|
-
],
|
|
714
|
-
risk: "write",
|
|
715
|
-
buildInput: (ctx) => compactInput({ ...projectInput(ctx), payload: ctx.json("payload"), override: optionalBoolean2(ctx, "override") })
|
|
716
|
-
});
|
|
717
|
-
|
|
718
|
-
// src/commands/te-analysis/meta/virtual-event/get.ts
|
|
719
|
-
var metadataVirtualEventGet = createAnalysisMetaCapabilityCommand({
|
|
720
|
-
resource: "virtual-event",
|
|
721
|
-
command: "get",
|
|
722
|
-
capabilityId: "metadata.virtual_event.get",
|
|
723
|
-
description: "Get virtual event rule.",
|
|
724
|
-
flags: [
|
|
725
|
-
projectIdFlag,
|
|
726
|
-
{ name: "v-event-id", type: "number", required: true, desc: "Virtual event ID." }
|
|
727
|
-
],
|
|
728
|
-
risk: "read",
|
|
729
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), v_event_id: ctx.num("v-event-id") })
|
|
730
|
-
});
|
|
731
|
-
|
|
732
|
-
// src/commands/te-analysis/meta/virtual-event/delete.ts
|
|
733
|
-
var metadataVirtualEventDelete = createAnalysisMetaCapabilityCommand({
|
|
734
|
-
resource: "virtual-event",
|
|
735
|
-
command: "delete",
|
|
736
|
-
capabilityId: "metadata.virtual_event.delete",
|
|
737
|
-
description: "Delete a virtual event rule.",
|
|
738
|
-
flags: [
|
|
739
|
-
projectIdFlag,
|
|
740
|
-
{ name: "v-event-id", type: "number", required: true, desc: "Virtual event ID." }
|
|
741
|
-
],
|
|
742
|
-
risk: "high-risk-write",
|
|
743
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), v_event_id: ctx.num("v-event-id") })
|
|
744
|
-
});
|
|
745
|
-
|
|
746
|
-
// src/commands/te-analysis/meta/virtual-event/index.ts
|
|
747
|
-
var commands3 = [
|
|
748
|
-
metadataVirtualEventCreate,
|
|
749
|
-
metadataVirtualEventGet,
|
|
750
|
-
metadataVirtualEventDelete
|
|
751
|
-
];
|
|
752
|
-
var virtual_event_default = commands3;
|
|
753
|
-
|
|
754
|
-
// src/commands/te-analysis/meta/virtual-property/create.ts
|
|
755
|
-
var metadataVirtualPropertyCreate = createAnalysisMetaCapabilityCommand({
|
|
756
|
-
resource: "virtual-property",
|
|
757
|
-
command: "create",
|
|
758
|
-
capabilityId: "metadata.virtual_property.create",
|
|
759
|
-
description: "Create a SQL virtual event or user property.",
|
|
760
|
-
flags: [
|
|
761
|
-
projectIdFlag,
|
|
762
|
-
{ name: "sql-expression", type: "string", required: true, desc: "SQL expression used to calculate the virtual property." },
|
|
763
|
-
{ name: "v-prop", type: "json", required: true, desc: "Virtual property JSON object with property.column_name/table_type/select_type fields." },
|
|
764
|
-
{ name: "properties", type: "json", required: false, desc: "Dependent property JSON array." },
|
|
765
|
-
{ name: "sql-event-relation-type", type: "string", required: false, desc: "relation_default, relation_always, or relation_by_setting." },
|
|
766
|
-
{ name: "related-events", type: "json", required: false, desc: "Related events JSON array when using relation_by_setting." },
|
|
767
|
-
{ name: "tag-date-policies", type: "json", required: false, desc: "Optional tag date policies JSON array." },
|
|
768
|
-
{ name: "replace-remark", type: "string", required: false, desc: "Replacement remark." },
|
|
769
|
-
{ name: "replace-suggestion", type: "string", required: false, desc: "Replacement suggestion." }
|
|
770
|
-
],
|
|
771
|
-
risk: "write",
|
|
772
|
-
buildInput: (ctx) => compactInput({
|
|
773
|
-
...projectInput(ctx),
|
|
774
|
-
sql_expression: ctx.str("sql-expression"),
|
|
775
|
-
v_prop: ctx.json("v-prop"),
|
|
776
|
-
properties: optionalJson2(ctx, "properties"),
|
|
777
|
-
sql_event_relation_type: optionalString2(ctx, "sql-event-relation-type"),
|
|
778
|
-
related_events: optionalJson2(ctx, "related-events"),
|
|
779
|
-
tag_date_policies: optionalJson2(ctx, "tag-date-policies"),
|
|
780
|
-
replace_remark: optionalString2(ctx, "replace-remark"),
|
|
781
|
-
replace_suggestion: optionalString2(ctx, "replace-suggestion")
|
|
782
|
-
})
|
|
783
|
-
});
|
|
784
|
-
|
|
785
|
-
// src/commands/te-analysis/meta/virtual-property/sql-rule-update.ts
|
|
786
|
-
var metadataVirtualPropertySqlRuleUpdate = createAnalysisMetaCapabilityCommand({
|
|
787
|
-
resource: "virtual-property",
|
|
788
|
-
command: "sql-rule-update",
|
|
789
|
-
capabilityId: "metadata.virtual_property.sql_rule_update",
|
|
790
|
-
description: "Update SQL virtual property rule.",
|
|
791
|
-
flags: [
|
|
792
|
-
projectIdFlag,
|
|
793
|
-
{ name: "sql-expression", type: "string", required: true, desc: "SQL expression used to calculate the virtual property." },
|
|
794
|
-
{ name: "v-prop", type: "json", required: true, desc: "Virtual property JSON object with prop_id/property fields." },
|
|
795
|
-
{ name: "properties", type: "json", required: false, desc: "Dependent property JSON array." },
|
|
796
|
-
{ name: "sql-event-relation-type", type: "string", required: false, desc: "relation_default, relation_always, or relation_by_setting." },
|
|
797
|
-
{ name: "related-events", type: "json", required: false, desc: "Related events JSON array when using relation_by_setting." },
|
|
798
|
-
{ name: "tag-date-policies", type: "json", required: false, desc: "Optional tag date policies JSON array." },
|
|
799
|
-
{ name: "replace-remark", type: "string", required: false, desc: "Replacement remark." },
|
|
800
|
-
{ name: "replace-suggestion", type: "string", required: false, desc: "Replacement suggestion." }
|
|
801
|
-
],
|
|
802
|
-
risk: "write",
|
|
803
|
-
buildInput: (ctx) => compactInput({
|
|
804
|
-
...projectInput(ctx),
|
|
805
|
-
sql_expression: ctx.str("sql-expression"),
|
|
806
|
-
v_prop: ctx.json("v-prop"),
|
|
807
|
-
properties: optionalJson2(ctx, "properties"),
|
|
808
|
-
sql_event_relation_type: optionalString2(ctx, "sql-event-relation-type"),
|
|
809
|
-
related_events: optionalJson2(ctx, "related-events"),
|
|
810
|
-
tag_date_policies: optionalJson2(ctx, "tag-date-policies"),
|
|
811
|
-
replace_remark: optionalString2(ctx, "replace-remark"),
|
|
812
|
-
replace_suggestion: optionalString2(ctx, "replace-suggestion")
|
|
813
|
-
})
|
|
814
|
-
});
|
|
815
|
-
|
|
816
|
-
// src/commands/te-analysis/meta/virtual-property/sql-rule-delete.ts
|
|
817
|
-
var metadataVirtualPropertySqlRuleDelete = createAnalysisMetaCapabilityCommand({
|
|
818
|
-
resource: "virtual-property",
|
|
819
|
-
command: "sql-rule-delete",
|
|
820
|
-
capabilityId: "metadata.virtual_property.sql_rule_delete",
|
|
821
|
-
description: "Delete or revoke SQL virtual property rule.",
|
|
822
|
-
flags: [
|
|
823
|
-
projectIdFlag,
|
|
824
|
-
{ name: "v-prop-id", type: "number", required: true, desc: "Virtual property ID." },
|
|
825
|
-
{ name: "operation", type: "string", required: false, desc: "Delete operation. Use revoke to revoke instead of delete." }
|
|
826
|
-
],
|
|
827
|
-
risk: "high-risk-write",
|
|
828
|
-
buildInput: (ctx) => compactInput({ ...projectInput(ctx), v_prop_id: ctx.num("v-prop-id"), operation: optionalString2(ctx, "operation") })
|
|
829
|
-
});
|
|
830
|
-
|
|
831
|
-
// src/commands/te-analysis/meta/virtual-property/index.ts
|
|
832
|
-
var commands4 = [
|
|
833
|
-
metadataVirtualPropertyCreate,
|
|
834
|
-
metadataVirtualPropertySqlRuleUpdate,
|
|
835
|
-
metadataVirtualPropertySqlRuleDelete
|
|
836
|
-
];
|
|
837
|
-
var virtual_property_default = commands4;
|
|
838
|
-
|
|
839
|
-
// src/commands/te-analysis/meta/metric/list.ts
|
|
840
|
-
var metadataMetricList = createAnalysisMetaCapabilityCommand({
|
|
841
|
-
resource: "metric",
|
|
842
|
-
command: "list",
|
|
843
|
-
capabilityId: "metadata.metric.list",
|
|
844
|
-
description: "List project metrics.",
|
|
845
|
-
flags: [
|
|
846
|
-
projectIdFlag,
|
|
847
|
-
{ name: "ignore-authentication", type: "boolean", required: false, desc: "Whether to skip asset authentication status decoration." }
|
|
848
|
-
],
|
|
849
|
-
risk: "read",
|
|
850
|
-
buildInput: (ctx) => compactInput({ ...projectInput(ctx), ignore_authentication: optionalBoolean2(ctx, "ignore-authentication") })
|
|
851
|
-
});
|
|
852
|
-
|
|
853
|
-
// src/commands/te-analysis/meta/metric/get.ts
|
|
854
|
-
var metadataMetricGet = createAnalysisMetaCapabilityCommand({
|
|
855
|
-
resource: "metric",
|
|
856
|
-
command: "get",
|
|
857
|
-
capabilityId: "metadata.metric.get",
|
|
858
|
-
description: "Get metric definition, events, and params.",
|
|
859
|
-
flags: [
|
|
860
|
-
projectIdFlag,
|
|
861
|
-
{ name: "metric-id", type: "number", required: true, desc: "Metric ID." }
|
|
862
|
-
],
|
|
863
|
-
risk: "read",
|
|
864
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), metric_id: ctx.num("metric-id") })
|
|
865
|
-
});
|
|
866
|
-
|
|
867
|
-
// src/commands/te-analysis/meta/metric/create.ts
|
|
868
|
-
var metadataMetricCreate = createAnalysisMetaCapabilityCommand({
|
|
869
|
-
resource: "metric",
|
|
870
|
-
command: "create",
|
|
871
|
-
capabilityId: "metadata.metric.create",
|
|
872
|
-
description: "Create a metric from event or retention analysis configuration.",
|
|
873
|
-
flags: [
|
|
874
|
-
projectIdFlag,
|
|
875
|
-
{ name: "metric-name", type: "string", required: true, desc: "Metric technical name, for example pay_count." },
|
|
876
|
-
{ name: "metric-desc", type: "string", required: true, desc: "Metric display name." },
|
|
877
|
-
{ name: "metric-remark", type: "string", required: false, desc: "Metric remark." },
|
|
878
|
-
{ name: "metric-mode", type: "number", required: true, desc: "Metric model mode, for example 0 for event analysis." },
|
|
879
|
-
{ name: "metric-events", type: "json", required: true, desc: "Metric event-analysis QP JSON array." },
|
|
880
|
-
{ name: "metric-params", type: "json", required: false, desc: "Metric params JSON object. Defaults to {} in common when omitted." }
|
|
881
|
-
],
|
|
882
|
-
risk: "write",
|
|
883
|
-
buildInput: (ctx) => compactInput({
|
|
884
|
-
...projectInput(ctx),
|
|
885
|
-
metric_name: ctx.str("metric-name"),
|
|
886
|
-
metric_desc: ctx.str("metric-desc"),
|
|
887
|
-
metric_remark: optionalString2(ctx, "metric-remark"),
|
|
888
|
-
metric_mode: ctx.num("metric-mode"),
|
|
889
|
-
metric_events: ctx.json("metric-events"),
|
|
890
|
-
metric_params: optionalJson2(ctx, "metric-params")
|
|
891
|
-
})
|
|
892
|
-
});
|
|
893
|
-
|
|
894
|
-
// src/commands/te-analysis/meta/metric/update.ts
|
|
895
|
-
var metadataMetricUpdate = createAnalysisMetaCapabilityCommand({
|
|
896
|
-
resource: "metric",
|
|
897
|
-
command: "update",
|
|
898
|
-
capabilityId: "metadata.metric.update",
|
|
899
|
-
description: "Update metric definition, name, and remark.",
|
|
900
|
-
flags: [
|
|
901
|
-
projectIdFlag,
|
|
902
|
-
{ name: "metric-id", type: "number", required: true, desc: "Metric ID." },
|
|
903
|
-
{ name: "metric-name", type: "string", required: false, desc: "Metric technical name for full-definition update." },
|
|
904
|
-
{ name: "metric-desc", type: "string", required: false, desc: "Metric display name." },
|
|
905
|
-
{ name: "metric-remark", type: "string", required: false, desc: "Metric remark." },
|
|
906
|
-
{ name: "metric-mode", type: "number", required: false, desc: "Metric model mode for full-definition update." },
|
|
907
|
-
{ name: "metric-events", type: "json", required: false, desc: "Metric event-analysis QP JSON array for full-definition update." },
|
|
908
|
-
{ name: "metric-params", type: "json", required: false, desc: "Metric params JSON object." }
|
|
909
|
-
],
|
|
910
|
-
risk: "write",
|
|
911
|
-
buildInput: (ctx) => compactInput({
|
|
912
|
-
...projectInput(ctx),
|
|
913
|
-
metric_id: ctx.num("metric-id"),
|
|
914
|
-
metric_name: optionalString2(ctx, "metric-name"),
|
|
915
|
-
metric_desc: optionalString2(ctx, "metric-desc"),
|
|
916
|
-
metric_remark: optionalString2(ctx, "metric-remark"),
|
|
917
|
-
metric_mode: optionalNumber2(ctx, "metric-mode"),
|
|
918
|
-
metric_events: optionalJson2(ctx, "metric-events"),
|
|
919
|
-
metric_params: optionalJson2(ctx, "metric-params")
|
|
920
|
-
})
|
|
921
|
-
});
|
|
922
|
-
|
|
923
|
-
// src/commands/te-analysis/meta/metric/delete.ts
|
|
924
|
-
var metadataMetricDelete = createAnalysisMetaCapabilityCommand({
|
|
925
|
-
resource: "metric",
|
|
926
|
-
command: "delete",
|
|
927
|
-
capabilityId: "metadata.metric.delete",
|
|
928
|
-
description: "Delete a metric.",
|
|
929
|
-
flags: [
|
|
930
|
-
projectIdFlag,
|
|
931
|
-
{ name: "metric-id", type: "number", required: true, desc: "Metric ID." }
|
|
932
|
-
],
|
|
933
|
-
risk: "high-risk-write",
|
|
934
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), metric_id: ctx.num("metric-id") })
|
|
935
|
-
});
|
|
936
|
-
|
|
937
|
-
// src/commands/te-analysis/meta/metric/index.ts
|
|
938
|
-
var commands5 = [
|
|
939
|
-
metadataMetricList,
|
|
940
|
-
metadataMetricGet,
|
|
941
|
-
metadataMetricCreate,
|
|
942
|
-
metadataMetricUpdate,
|
|
943
|
-
metadataMetricDelete
|
|
944
|
-
];
|
|
945
|
-
var metric_default = commands5;
|
|
946
|
-
|
|
947
|
-
// src/commands/te-analysis/meta/asset/search.ts
|
|
948
|
-
var metadataAssetSearch = createAnalysisMetaCapabilityCommand({
|
|
949
|
-
resource: "asset",
|
|
950
|
-
command: "search",
|
|
951
|
-
capabilityId: "metadata.asset.search",
|
|
952
|
-
description: "Search project assets by keyword.",
|
|
953
|
-
flags: [
|
|
954
|
-
projectIdFlag,
|
|
955
|
-
payloadFlag
|
|
956
|
-
],
|
|
957
|
-
risk: "read",
|
|
958
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), payload: ctx.json("payload") })
|
|
959
|
-
});
|
|
960
|
-
|
|
961
|
-
// src/commands/te-analysis/meta/asset/recent-list.ts
|
|
962
|
-
var metadataAssetRecentList = createAnalysisMetaCapabilityCommand({
|
|
963
|
-
resource: "asset",
|
|
964
|
-
command: "recent-list",
|
|
965
|
-
capabilityId: "metadata.asset.recent_list",
|
|
966
|
-
description: "List recently visited assets for the current user.",
|
|
967
|
-
flags: [
|
|
968
|
-
projectIdFlag,
|
|
969
|
-
payloadFlag
|
|
970
|
-
],
|
|
971
|
-
risk: "read",
|
|
972
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), payload: ctx.json("payload") })
|
|
973
|
-
});
|
|
974
|
-
|
|
975
|
-
// src/commands/te-analysis/meta/asset/authentication-list.ts
|
|
976
|
-
var metadataAssetAuthenticationList = createAnalysisMetaCapabilityCommand({
|
|
977
|
-
resource: "asset",
|
|
978
|
-
command: "authentication-list",
|
|
979
|
-
capabilityId: "metadata.asset_authentication.list",
|
|
980
|
-
description: "List authenticatable project assets and authentication status.",
|
|
981
|
-
flags: [
|
|
982
|
-
projectIdFlag
|
|
983
|
-
],
|
|
984
|
-
risk: "read",
|
|
985
|
-
buildInput: projectInput
|
|
986
|
-
});
|
|
987
|
-
|
|
988
|
-
// src/commands/te-analysis/meta/asset/authentication-update.ts
|
|
989
|
-
var metadataAssetAuthenticationUpdate = createAnalysisMetaCapabilityCommand({
|
|
990
|
-
resource: "asset",
|
|
991
|
-
command: "authentication-update",
|
|
992
|
-
capabilityId: "metadata.asset_authentication.update",
|
|
993
|
-
description: "Batch authenticate or unauthenticate assets.",
|
|
994
|
-
flags: [
|
|
995
|
-
projectIdFlag,
|
|
996
|
-
payloadFlag
|
|
997
|
-
],
|
|
998
|
-
risk: "write",
|
|
999
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), payload: ctx.json("payload") })
|
|
1000
|
-
});
|
|
1001
|
-
|
|
1002
|
-
// src/commands/te-analysis/meta/asset/abnormal-list.ts
|
|
1003
|
-
var metadataAssetAbnormalList = createAnalysisMetaCapabilityCommand({
|
|
1004
|
-
resource: "asset",
|
|
1005
|
-
command: "abnormal-list",
|
|
1006
|
-
capabilityId: "metadata.asset_abnormal.list",
|
|
1007
|
-
description: "List abnormal assets by resource type.",
|
|
1008
|
-
flags: [
|
|
1009
|
-
projectIdFlag,
|
|
1010
|
-
{ name: "resource-types", type: "string", required: true, desc: "Resource types to query." }
|
|
1011
|
-
],
|
|
1012
|
-
risk: "read",
|
|
1013
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), resource_types: ctx.str("resource-types") })
|
|
1014
|
-
});
|
|
1015
|
-
|
|
1016
|
-
// src/commands/te-analysis/meta/asset/abnormal-get.ts
|
|
1017
|
-
var metadataAssetAbnormalGet = createAnalysisMetaCapabilityCommand({
|
|
1018
|
-
resource: "asset",
|
|
1019
|
-
command: "abnormal-get",
|
|
1020
|
-
capabilityId: "metadata.asset_abnormal.get",
|
|
1021
|
-
description: "Get abnormal reason for one asset.",
|
|
1022
|
-
flags: [
|
|
1023
|
-
projectIdFlag,
|
|
1024
|
-
{ name: "resource-type", type: "string", required: true, desc: "Resource type." },
|
|
1025
|
-
{ name: "resource-id", type: "string", required: false, desc: "Resource ID." },
|
|
1026
|
-
{ name: "resource-name", type: "string", required: false, desc: "Resource name." },
|
|
1027
|
-
{ name: "table-type", type: "number", required: false, desc: "Property table type when the resource is a property." }
|
|
1028
|
-
],
|
|
1029
|
-
risk: "read",
|
|
1030
|
-
buildInput: (ctx) => compactInput({ ...projectInput(ctx), resource_type: ctx.str("resource-type"), resource_id: optionalString2(ctx, "resource-id"), resource_name: optionalString2(ctx, "resource-name"), table_type: optionalNumber2(ctx, "table-type") })
|
|
1031
|
-
});
|
|
1032
|
-
|
|
1033
|
-
// src/commands/te-analysis/meta/asset/index.ts
|
|
1034
|
-
var commands6 = [
|
|
1035
|
-
metadataAssetSearch,
|
|
1036
|
-
metadataAssetRecentList,
|
|
1037
|
-
metadataAssetAuthenticationList,
|
|
1038
|
-
metadataAssetAuthenticationUpdate,
|
|
1039
|
-
metadataAssetAbnormalList,
|
|
1040
|
-
metadataAssetAbnormalGet
|
|
1041
|
-
];
|
|
1042
|
-
var asset_default = commands6;
|
|
1043
|
-
|
|
1044
|
-
// src/commands/te-analysis/meta/exchange/config-update.ts
|
|
1045
|
-
var metadataExchangeConfigUpdate = createAnalysisMetaCapabilityCommand({
|
|
1046
|
-
resource: "exchange",
|
|
1047
|
-
command: "config-update",
|
|
1048
|
-
capabilityId: "metadata.exchange_config.update",
|
|
1049
|
-
description: "Update exchange-rate configuration switch or value.",
|
|
1050
|
-
flags: [
|
|
1051
|
-
projectIdFlag,
|
|
1052
|
-
{ name: "config-val", type: "string", required: true, desc: "Exchange-rate configuration value." }
|
|
1053
|
-
],
|
|
1054
|
-
risk: "write",
|
|
1055
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), config_val: ctx.str("config-val") })
|
|
1056
|
-
});
|
|
1057
|
-
|
|
1058
|
-
// src/commands/te-analysis/meta/exchange/rule-list.ts
|
|
1059
|
-
var metadataExchangeRuleList = createAnalysisMetaCapabilityCommand({
|
|
1060
|
-
resource: "exchange",
|
|
1061
|
-
command: "rule-list",
|
|
1062
|
-
capabilityId: "metadata.exchange_rule.list",
|
|
1063
|
-
description: "List exchange-rate conversion rules.",
|
|
1064
|
-
flags: [
|
|
1065
|
-
projectIdFlag
|
|
1066
|
-
],
|
|
1067
|
-
risk: "read",
|
|
1068
|
-
buildInput: projectInput
|
|
1069
|
-
});
|
|
1070
|
-
|
|
1071
|
-
// src/commands/te-analysis/meta/exchange/rule-validate.ts
|
|
1072
|
-
var metadataExchangeRuleValidate = createAnalysisMetaCapabilityCommand({
|
|
1073
|
-
resource: "exchange",
|
|
1074
|
-
command: "rule-validate",
|
|
1075
|
-
capabilityId: "metadata.exchange_rule.validate",
|
|
1076
|
-
description: "Validate affected range before saving exchange-rate rules.",
|
|
1077
|
-
flags: [
|
|
1078
|
-
projectIdFlag,
|
|
1079
|
-
payloadFlag
|
|
1080
|
-
],
|
|
1081
|
-
risk: "read",
|
|
1082
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), payload: ctx.json("payload") })
|
|
1083
|
-
});
|
|
1084
|
-
|
|
1085
|
-
// src/commands/te-analysis/meta/exchange/rule-update.ts
|
|
1086
|
-
var metadataExchangeRuleUpdate = createAnalysisMetaCapabilityCommand({
|
|
1087
|
-
resource: "exchange",
|
|
1088
|
-
command: "rule-update",
|
|
1089
|
-
capabilityId: "metadata.exchange_rule.update",
|
|
1090
|
-
description: "Save currency field, amount field, and target currency rules.",
|
|
1091
|
-
flags: [
|
|
1092
|
-
projectIdFlag,
|
|
1093
|
-
payloadFlag
|
|
1094
|
-
],
|
|
1095
|
-
risk: "write",
|
|
1096
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), payload: ctx.json("payload") })
|
|
1097
|
-
});
|
|
1098
|
-
|
|
1099
|
-
// src/commands/te-analysis/meta/exchange/rate-refresh.ts
|
|
1100
|
-
var metadataExchangeRateRefresh = createAnalysisMetaCapabilityCommand({
|
|
1101
|
-
resource: "exchange",
|
|
1102
|
-
command: "rate-refresh",
|
|
1103
|
-
capabilityId: "metadata.exchange_rate.refresh",
|
|
1104
|
-
description: "Refresh exchange-rate data manually.",
|
|
1105
|
-
flags: [
|
|
1106
|
-
projectIdFlag
|
|
1107
|
-
],
|
|
1108
|
-
risk: "write",
|
|
1109
|
-
buildInput: projectInput
|
|
1110
|
-
});
|
|
1111
|
-
|
|
1112
|
-
// src/commands/te-analysis/meta/exchange/index.ts
|
|
1113
|
-
var commands7 = [
|
|
1114
|
-
metadataExchangeConfigUpdate,
|
|
1115
|
-
metadataExchangeRuleList,
|
|
1116
|
-
metadataExchangeRuleValidate,
|
|
1117
|
-
metadataExchangeRuleUpdate,
|
|
1118
|
-
metadataExchangeRateRefresh
|
|
1119
|
-
];
|
|
1120
|
-
var exchange_default = commands7;
|
|
1121
|
-
|
|
1122
|
-
// src/commands/te-analysis/meta/super-metadata/export.ts
|
|
1123
|
-
var metadataSuperMetadataExport = createAnalysisMetaCapabilityCommand({
|
|
1124
|
-
resource: "super-metadata",
|
|
1125
|
-
command: "export",
|
|
1126
|
-
capabilityId: "metadata.super_metadata.export",
|
|
1127
|
-
description: "Export super event and super property configuration as an asynchronous XLSX artifact.",
|
|
1128
|
-
flags: [
|
|
1129
|
-
projectIdFlag,
|
|
1130
|
-
{ name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
|
|
1131
|
-
{ name: "timeout-seconds", type: "number", required: false, desc: "Export timeout seconds. Default: 3600, max: 7200." }
|
|
1132
|
-
],
|
|
1133
|
-
risk: "read",
|
|
1134
|
-
buildInput: (ctx) => compactInput({
|
|
1135
|
-
...projectInput(ctx),
|
|
1136
|
-
request_id: optionalString2(ctx, "request-id"),
|
|
1137
|
-
timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
|
|
1138
|
-
})
|
|
1139
|
-
});
|
|
1140
|
-
|
|
1141
|
-
// src/commands/te-analysis/meta/super-metadata/import.ts
|
|
1142
|
-
var metadataSuperMetadataImport = createAnalysisMetaCapabilityCommand({
|
|
1143
|
-
resource: "super-metadata",
|
|
1144
|
-
command: "import",
|
|
1145
|
-
capabilityId: "metadata.super_metadata.import",
|
|
1146
|
-
description: "Pre-import and confirm-import super event and super property configuration.",
|
|
1147
|
-
flags: [
|
|
1148
|
-
projectIdFlag,
|
|
1149
|
-
{ name: "operation", type: "string", required: true, desc: "Import step: pre_import or ensure_import." },
|
|
1150
|
-
{ name: "input-file-id", type: "string", required: false, desc: "Uploaded XLSX input file ID for pre_import. Upload with purpose=super_metadata.import.xlsx." },
|
|
1151
|
-
{ name: "pre-import-meta-uuid", type: "string", required: false, desc: "UUID returned by pre_import, required for ensure_import." }
|
|
1152
|
-
],
|
|
1153
|
-
risk: "write",
|
|
1154
|
-
buildInput: (ctx) => compactInput({
|
|
1155
|
-
...projectInput(ctx),
|
|
1156
|
-
operation: ctx.str("operation"),
|
|
1157
|
-
input_file_id: optionalString2(ctx, "input-file-id"),
|
|
1158
|
-
pre_import_meta_uuid: optionalString2(ctx, "pre-import-meta-uuid")
|
|
1159
|
-
})
|
|
1160
|
-
});
|
|
1161
|
-
|
|
1162
|
-
// src/commands/te-analysis/meta/super-metadata/index.ts
|
|
1163
|
-
var commands8 = [
|
|
1164
|
-
metadataSuperMetadataExport,
|
|
1165
|
-
metadataSuperMetadataImport
|
|
1166
|
-
];
|
|
1167
|
-
var super_metadata_default = commands8;
|
|
1168
|
-
|
|
1169
|
-
// src/commands/te-analysis/meta/datatable/columns-get.ts
|
|
1170
|
-
var metadataDataTableColumnsGet = createAnalysisMetaCapabilityCommand({
|
|
1171
|
-
resource: "datatable",
|
|
1172
|
-
command: "columns-get",
|
|
1173
|
-
capabilityId: "metadata.data_table.columns_get",
|
|
1174
|
-
description: "Get columns for a project table reference.",
|
|
1175
|
-
flags: [
|
|
1176
|
-
projectIdFlag,
|
|
1177
|
-
{ name: "table-ref", type: "string", required: true, desc: "Project table reference." }
|
|
1178
|
-
],
|
|
1179
|
-
risk: "read",
|
|
1180
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), table_ref: ctx.str("table-ref") })
|
|
1181
|
-
});
|
|
1182
|
-
|
|
1183
|
-
// src/commands/te-analysis/meta/datatable/influence-list.ts
|
|
1184
|
-
var metadataDataTableInfluenceList = createAnalysisMetaCapabilityCommand({
|
|
1185
|
-
resource: "datatable",
|
|
1186
|
-
command: "influence-list",
|
|
1187
|
-
capabilityId: "metadata.data_table.influence_list",
|
|
1188
|
-
description: "List metadata and assets affected by data table deletion or column changes.",
|
|
1189
|
-
flags: [
|
|
1190
|
-
projectIdFlag,
|
|
1191
|
-
{ name: "datatable-id", type: "number", required: true, desc: "Data table ID." }
|
|
1192
|
-
],
|
|
1193
|
-
risk: "read",
|
|
1194
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), datatable_id: ctx.num("datatable-id") })
|
|
1195
|
-
});
|
|
1196
|
-
|
|
1197
|
-
// src/commands/te-analysis/meta/datatable/version-list.ts
|
|
1198
|
-
var metadataDataTableVersionList = createAnalysisMetaCapabilityCommand({
|
|
1199
|
-
resource: "datatable",
|
|
1200
|
-
command: "version-list",
|
|
1201
|
-
capabilityId: "metadata.data_table_version.list",
|
|
1202
|
-
description: "List data table historical versions.",
|
|
1203
|
-
flags: [
|
|
1204
|
-
projectIdFlag,
|
|
1205
|
-
{ name: "datatable-id", type: "number", required: true, desc: "Data table ID." }
|
|
1206
|
-
],
|
|
1207
|
-
risk: "read",
|
|
1208
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), datatable_id: ctx.num("datatable-id") })
|
|
1209
|
-
});
|
|
1210
|
-
|
|
1211
|
-
// src/commands/te-analysis/meta/datatable/version-get.ts
|
|
1212
|
-
var metadataDataTableVersionGet = createAnalysisMetaCapabilityCommand({
|
|
1213
|
-
resource: "datatable",
|
|
1214
|
-
command: "version-get",
|
|
1215
|
-
capabilityId: "metadata.data_table_version.get",
|
|
1216
|
-
description: "Get data table version detail.",
|
|
1217
|
-
flags: [
|
|
1218
|
-
projectIdFlag,
|
|
1219
|
-
{ name: "version-id", type: "number", required: true, desc: "Data table version ID." }
|
|
1220
|
-
],
|
|
1221
|
-
risk: "read",
|
|
1222
|
-
buildInput: (ctx) => ({ ...projectInput(ctx), version_id: ctx.num("version-id") })
|
|
1223
|
-
});
|
|
1224
|
-
|
|
1225
|
-
// src/commands/te-analysis/meta/datatable/index.ts
|
|
1226
|
-
var commands9 = [
|
|
1227
|
-
metadataDataTableColumnsGet,
|
|
1228
|
-
metadataDataTableInfluenceList,
|
|
1229
|
-
metadataDataTableVersionList,
|
|
1230
|
-
metadataDataTableVersionGet
|
|
1231
|
-
];
|
|
1232
|
-
var datatable_default = commands9;
|
|
1233
|
-
|
|
1234
|
-
// src/commands/te-analysis/meta/index.ts
|
|
1235
|
-
var commands10 = [
|
|
1236
|
-
getAlertDefinitionSchema,
|
|
1237
|
-
listAlerts,
|
|
1238
|
-
getAlert,
|
|
1239
|
-
createAlert,
|
|
1240
|
-
updateAlert,
|
|
1241
|
-
deleteAlert,
|
|
1242
|
-
...event_default,
|
|
1243
|
-
...property_default,
|
|
1244
|
-
...virtual_event_default,
|
|
1245
|
-
...virtual_property_default,
|
|
1246
|
-
...metric_default,
|
|
1247
|
-
...asset_default,
|
|
1248
|
-
...exchange_default,
|
|
1249
|
-
...super_metadata_default,
|
|
1250
|
-
...datatable_default
|
|
1251
|
-
];
|
|
1252
|
-
var meta_default = commands10;
|
|
1253
|
-
|
|
1254
|
-
// src/commands/te-analysis/report/list-reports.ts
|
|
1255
|
-
var listReports = createMcpCommand({
|
|
1256
|
-
command: "+list_reports",
|
|
1257
|
-
description: "List report metadata accessible to the current user in the project. Supports keyword filtering and returns paginated report summaries with selectable fields.",
|
|
1258
|
-
flags: [
|
|
1259
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
1260
|
-
{ name: "query", type: "string", required: false, desc: "Optional keyword filter. Performs fuzzy matching against reportName, reportDesc, and remark; if omitted, all accessible reports are returned.", alias: "q" },
|
|
1261
|
-
{ name: "fields", type: "json", required: false, desc: "Optional fields to return. Supported fields: reportId, reportName, reportDesc, remark, reportModel. Default fields when omitted: reportId, reportName, reportDesc, remark, reportModel.", alias: "f" },
|
|
1262
|
-
{ name: "limit", type: "number", required: false, desc: "Optional page size. Default: 20, maximum: 10000.", alias: "l" },
|
|
1263
|
-
{ name: "offset", type: "number", required: false, desc: "Optional page offset. Default: 0.", alias: "o" }
|
|
1264
|
-
],
|
|
1265
|
-
risk: "read",
|
|
1266
|
-
buildArgs: (ctx) => ({
|
|
1267
|
-
projectId: ctx.num("project_id"),
|
|
1268
|
-
query: optionalString(ctx, "query"),
|
|
1269
|
-
fields: optionalJson(ctx, "fields"),
|
|
1270
|
-
limit: optionalNumber(ctx, "limit"),
|
|
1271
|
-
offset: optionalNumber(ctx, "offset")
|
|
1272
|
-
})
|
|
1273
|
-
});
|
|
1274
|
-
|
|
1275
|
-
// src/commands/te-analysis/report/get-report-definition.ts
|
|
1276
|
-
var getReportDefinition = createMcpCommand({
|
|
1277
|
-
command: "+get_report_definition",
|
|
1278
|
-
description: "Get the definition details of a single report. Returns model type, event configuration, display configuration, and other definition data without executing a data query.",
|
|
1279
|
-
flags: [
|
|
1280
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
1281
|
-
{ name: "report_id", type: "number", required: true, desc: "Report ID", alias: "r" }
|
|
1282
|
-
],
|
|
1283
|
-
risk: "read",
|
|
1284
|
-
buildArgs: (ctx) => ({
|
|
1285
|
-
projectId: ctx.num("project_id"),
|
|
1286
|
-
reportId: ctx.num("report_id")
|
|
1287
|
-
})
|
|
1288
|
-
});
|
|
1289
|
-
|
|
1290
|
-
// src/commands/te-analysis/report/query-report-data.ts
|
|
1291
|
-
var queryReportData = createMcpCommand({
|
|
1292
|
-
command: "+query_report_data",
|
|
1293
|
-
description: "Query analysis data for one or more reports. Supports extra filters, group-by settings, and time range overrides. For long-running or cancelable queries, requestId is required and must be provided before starting. For any query that may exceed the CLI or MCP HTTP timeout, generate requestId first so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If requestId is omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID.",
|
|
1294
|
-
flags: [
|
|
1295
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
1296
|
-
{ name: "report_ids", type: "json", required: true, desc: "List of report IDs" },
|
|
1297
|
-
{ name: "filters", type: "json", required: false, desc: "Optional filter JSON. See +get_filter_schema for the structure." },
|
|
1298
|
-
{ name: "group_by", type: "json", required: false, desc: "Optional group-by JSON array. See +get_groupby_schema for the structure." },
|
|
1299
|
-
{ name: "request_id", type: "string", required: true, desc: "Required unique request ID used for tracking and cancellation. Generate it before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID. The response metadata.requestId echoes the supplied requestId and can also be passed to cancel_query(requestId) when the query is no longer needed." },
|
|
1300
|
-
{ name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
|
|
1301
|
-
{ name: "start_date", type: "string", required: false, desc: "Optional start date in yyyy-MM-dd format" },
|
|
1302
|
-
{ name: "end_date", type: "string", required: false, desc: "Optional end date in yyyy-MM-dd format" },
|
|
1303
|
-
{ name: "time_granularity", type: "string", required: false, desc: "Optional time granularity used to override the report default. Supported values: minute, minute5, minute10, hour, day, week, month, quarter, year, total." },
|
|
1304
|
-
{ name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." },
|
|
1305
|
-
{ name: "sql_params", type: "json", required: false, desc: `Optional override for a SQL-model report's dynamic parameters (the \${...} placeholders; get each param's paramName/paramType/current shape via +get_report_definition). JSON array matched by paramName. Value fields by paramType: Selector/Variable use paramExpress, e.g. [{"paramName":"selector1","paramExpress":"<value>"}]; Text needs a quota operator + paramExpress (all 13 quota codes, e.g. [{"paramName":"text1","quota":"C00","paramExpress":["<value>"]}]); Number needs quota + paramExpress (numeric ops only); 13 codes incl. C00=IN, C06=BETWEEN/range, C060=BETWEEN by date, C300=CONTAIN, C04=no filter, C05=IS NULL (see the ae-analysis query_report_data reference for the full table); Time needs a quota operator + startTime/endTime (C020 <=, C030 >=, C06/C060 between, C04/C05 has/no value), NOT recentDay; PartDate is a date range (startTime+endTime). Variable has no quota; override paramExpress (custom-type values include their own quotes). Only listed params are overridden; omitted params keep the report's saved defaults. Ignored for non-SQL reports.` },
|
|
1306
|
-
...clusterQueryFlags("Optional cluster query scope. Supported values: GLOBAL, SLAVE. Omit to query the current self cluster.")
|
|
1307
|
-
],
|
|
1308
|
-
risk: "read",
|
|
1309
|
-
buildArgs: (ctx) => ({
|
|
1310
|
-
projectId: ctx.num("project_id"),
|
|
1311
|
-
reportIds: ctx.json("report_ids"),
|
|
1312
|
-
filters: optionalJsonString(ctx, "filters"),
|
|
1313
|
-
groupBy: optionalJsonString(ctx, "group_by"),
|
|
1314
|
-
requestId: ctx.str("request_id"),
|
|
1315
|
-
useCache: optionalBoolean(ctx, "use_cache"),
|
|
1316
|
-
startDate: optionalString(ctx, "start_date"),
|
|
1317
|
-
endDate: optionalString(ctx, "end_date"),
|
|
1318
|
-
timeGranularity: optionalString(ctx, "time_granularity"),
|
|
1319
|
-
timeoutMinutes: optionalNumber(ctx, "timeout_minutes"),
|
|
1320
|
-
sqlParams: optionalJsonString(ctx, "sql_params"),
|
|
1321
|
-
...optionalClusterQueryArgs(ctx)
|
|
1322
|
-
})
|
|
1323
|
-
});
|
|
1324
|
-
|
|
1325
|
-
// src/commands/te-analysis/report/create-report.ts
|
|
1326
|
-
var createReport = createMcpCommand({
|
|
1327
|
-
command: "+create_report",
|
|
1328
|
-
description: "Create and persist a new report definition. Supports event, retention, funnel, prop_analysis, path, distribution, sql, interval, and attribution models.",
|
|
1329
|
-
flags: [
|
|
1330
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
1331
|
-
{ name: "report_name", type: "string", required: true, desc: "Report name. Length: 1-80 characters" },
|
|
1332
|
-
{ name: "model_type", type: "string", required: true, desc: "Report model type. Supported values: event, retention, funnel, prop_analysis, path, distribution, sql, interval, attribution" },
|
|
1333
|
-
{ name: "analysis_query", type: "json", required: true, desc: "Report analysis query JSON. Usually includes fields such as events and eventView. See +get_analysis_query_schema for the structure." },
|
|
1334
|
-
{ name: "description", type: "string", required: false, desc: "Optional report description" },
|
|
1335
|
-
{ name: "cache_seconds", type: "number", required: false, desc: "Optional cache duration in seconds" },
|
|
1336
|
-
{ name: "query_duration_ms", type: "number", required: false, desc: "Optional query duration in milliseconds" },
|
|
1337
|
-
{ name: "dashboard_ids", type: "json", required: false, desc: "Optional list of dashboard IDs to associate" }
|
|
1338
|
-
],
|
|
1339
|
-
risk: "write",
|
|
1340
|
-
buildArgs: (ctx) => ({
|
|
1341
|
-
projectId: ctx.num("project_id"),
|
|
1342
|
-
reportName: ctx.str("report_name"),
|
|
1343
|
-
modelType: ctx.str("model_type"),
|
|
1344
|
-
analysisQuery: requiredJsonString(ctx, "analysis_query"),
|
|
1345
|
-
description: optionalString(ctx, "description"),
|
|
1346
|
-
cacheSeconds: optionalNumber(ctx, "cache_seconds"),
|
|
1347
|
-
queryDurationMs: optionalNumber(ctx, "query_duration_ms"),
|
|
1348
|
-
dashboardIds: optionalJson(ctx, "dashboard_ids")
|
|
1349
|
-
})
|
|
1350
|
-
});
|
|
1351
|
-
|
|
1352
|
-
// src/commands/te-analysis/report/delete-report.ts
|
|
1353
|
-
var deleteReport = createMcpCommand({
|
|
1354
|
-
command: "+delete_report",
|
|
1355
|
-
description: "Delete a report by reportId",
|
|
1356
|
-
flags: [
|
|
1357
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
1358
|
-
{ name: "report_id", type: "number", required: true, desc: "Report ID to delete" }
|
|
1359
|
-
],
|
|
1360
|
-
risk: "high-risk-write",
|
|
1361
|
-
buildArgs: (ctx) => ({
|
|
1362
|
-
projectId: ctx.num("project_id"),
|
|
1363
|
-
reportId: ctx.num("report_id")
|
|
1364
|
-
})
|
|
1365
|
-
});
|
|
1366
|
-
|
|
1367
|
-
// src/commands/te-analysis/report/update-report.ts
|
|
1368
|
-
var updateReport = createMcpCommand({
|
|
1369
|
-
command: "+update_report",
|
|
1370
|
-
description: "Update an existing report. Supports updating name, description, and QP. At least one of report_name, report_desc, or qp must be provided. When updating qp, also provide report_model. First call +get_report_definition to retrieve the current version number.",
|
|
1371
|
-
flags: [
|
|
1372
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
1373
|
-
{ name: "report_id", type: "number", required: true, desc: "Report ID to update" },
|
|
1374
|
-
{ name: "report_version", type: "number", required: true, desc: "Current report version number. Retrieve via +get_report_definition." },
|
|
1375
|
-
{ name: "report_name", type: "string", required: false, desc: "New report name. Omit to keep existing." },
|
|
1376
|
-
{ name: "report_desc", type: "string", required: false, desc: "New report description. Omit to keep existing." },
|
|
1377
|
-
{ name: "qp", type: "string", required: false, desc: "New QP JSON string. Omit to keep existing. When provided, also supply report_model." },
|
|
1378
|
-
{ name: "report_model", type: "number", required: false, desc: "Analysis model type integer (e.g. 1=event, 2=retention). Required when qp is provided." }
|
|
1379
|
-
],
|
|
1380
|
-
risk: "write",
|
|
1381
|
-
mcpService: "te_analysis_extend",
|
|
1382
|
-
buildArgs: (ctx) => ({
|
|
1383
|
-
projectId: ctx.num("project_id"),
|
|
1384
|
-
reportId: ctx.num("report_id"),
|
|
1385
|
-
version: ctx.num("report_version"),
|
|
1386
|
-
reportName: optionalString(ctx, "report_name"),
|
|
1387
|
-
reportDesc: optionalString(ctx, "report_desc"),
|
|
1388
|
-
qp: optionalString(ctx, "qp"),
|
|
1389
|
-
reportModel: optionalNumber(ctx, "report_model")
|
|
1390
|
-
})
|
|
1391
|
-
});
|
|
1392
|
-
|
|
1393
|
-
// src/commands/te-analysis/report/index.ts
|
|
1394
|
-
var commands11 = [
|
|
1395
|
-
listReports,
|
|
1396
|
-
getReportDefinition,
|
|
1397
|
-
queryReportData,
|
|
1398
|
-
createReport,
|
|
1399
|
-
deleteReport,
|
|
1400
|
-
updateReport
|
|
1401
|
-
];
|
|
1402
|
-
var report_default = commands11;
|
|
1403
|
-
|
|
1404
|
-
// src/commands/te-analysis/dashboard/list.ts
|
|
1405
|
-
var dashboardList = createAnalysisCapabilityCommand({
|
|
1406
|
-
resource: "dashboard",
|
|
1407
|
-
command: "list",
|
|
1408
|
-
capabilityId: "analysis.dashboard.list",
|
|
1409
|
-
description: "List dashboards visible to the current user through the capability gateway.",
|
|
1410
|
-
flags: [projectIdFlag, queryFlag, fieldsFlag, limitFlag, offsetFlag],
|
|
1411
|
-
risk: "read",
|
|
1412
|
-
buildInput: listInput
|
|
1413
|
-
});
|
|
1414
|
-
|
|
1415
|
-
// src/commands/te-analysis/dashboard/create.ts
|
|
1416
|
-
var dashboardCreate = createAnalysisCapabilityCommand({
|
|
1417
|
-
resource: "dashboard",
|
|
1418
|
-
command: "create",
|
|
1419
|
-
capabilityId: "analysis.dashboard.create",
|
|
1420
|
-
description: "Create a dashboard in personal space, project space, or a folder.",
|
|
1421
|
-
flags: [
|
|
1422
|
-
projectIdFlag,
|
|
1423
|
-
{ name: "dashboard-name", type: "string", required: true, desc: "Dashboard name." },
|
|
1424
|
-
{ name: "space-id", type: "number", required: false, desc: "Target project space ID. Omit for personal space." },
|
|
1425
|
-
{ name: "folder-id", type: "number", required: false, desc: "Target folder ID." },
|
|
1426
|
-
{ name: "initial-report-id", type: "number", required: false, desc: "Optional report ID to add when creating the dashboard." },
|
|
1427
|
-
payloadFlag
|
|
1428
|
-
],
|
|
1429
|
-
risk: "write",
|
|
1430
|
-
buildInput: (ctx) => compactInput({
|
|
1431
|
-
...projectInput(ctx),
|
|
1432
|
-
dashboard_name: ctx.str("dashboard-name"),
|
|
1433
|
-
space_id: optionalNumber2(ctx, "space-id"),
|
|
1434
|
-
folder_id: optionalNumber2(ctx, "folder-id"),
|
|
1435
|
-
initial_report_id: optionalNumber2(ctx, "initial-report-id"),
|
|
1436
|
-
payload: optionalJson2(ctx, "payload")
|
|
1437
|
-
})
|
|
1438
|
-
});
|
|
1439
|
-
|
|
1440
|
-
// src/commands/te-analysis/dashboard/get.ts
|
|
1441
|
-
var dashboardGet = createAnalysisCapabilityCommand({
|
|
1442
|
-
resource: "dashboard",
|
|
1443
|
-
command: "get",
|
|
1444
|
-
capabilityId: "analysis.dashboard.get",
|
|
1445
|
-
description: "Get one dashboard detail, including creator, create/update time, settings, reports, notes, and share information.",
|
|
1446
|
-
flags: [
|
|
1447
|
-
projectIdFlag,
|
|
1448
|
-
{ name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
|
|
1449
|
-
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use cached dashboard detail. Default: true." }
|
|
1450
|
-
],
|
|
1451
|
-
risk: "read",
|
|
1452
|
-
buildInput: (ctx) => compactInput({
|
|
1453
|
-
...projectInput(ctx),
|
|
1454
|
-
dashboard_id: ctx.num("dashboard-id"),
|
|
1455
|
-
use_cache: optionalBoolean2(ctx, "use-cache")
|
|
1456
|
-
})
|
|
1457
|
-
});
|
|
1458
|
-
|
|
1459
|
-
// src/commands/te-analysis/dashboard/update.ts
|
|
1460
|
-
var dashboardUpdate = createAnalysisCapabilityCommand({
|
|
1461
|
-
resource: "dashboard",
|
|
1462
|
-
command: "update",
|
|
1463
|
-
capabilityId: "analysis.dashboard.update",
|
|
1464
|
-
description: "Update dashboard settings or create/update a dashboard note. Use --operation settings or note-upsert.",
|
|
1465
|
-
flags: [
|
|
1466
|
-
projectIdFlag,
|
|
1467
|
-
{ name: "operation", type: "string", required: true, desc: "Update operation: settings or note-upsert." },
|
|
1468
|
-
{ name: "dashboard-id", type: "number", required: false, desc: "Dashboard ID for a single-dashboard update." },
|
|
1469
|
-
{ name: "dashboard-ids", type: "json", required: false, desc: "Dashboard ID array for batch settings updates." },
|
|
1470
|
-
{ name: "dashboard-name", type: "string", required: false, desc: "Dashboard name for single rename." },
|
|
1471
|
-
{ name: "zone-offset", type: "number", required: false, desc: "Fixed dashboard time zone offset in hours. For example, UTC+8 is 8 and UTC-5 is -5. Valid range: -12 to 14." },
|
|
1472
|
-
{ name: "refresh-type", type: "number", required: false, desc: "Dashboard refresh type." },
|
|
1473
|
-
{ name: "dashboard-status", type: "number", required: false, desc: "Dashboard status code." },
|
|
1474
|
-
{ name: "note-id", type: "number", required: false, desc: "Dashboard note ID. Omit to create a new note." },
|
|
1475
|
-
{ name: "note-title", type: "string", required: false, desc: "Dashboard note title." },
|
|
1476
|
-
{ name: "description", type: "string", required: false, desc: "Dashboard note description." },
|
|
1477
|
-
{ name: "ui-config", type: "string", required: false, desc: "Dashboard or note UI config string." },
|
|
1478
|
-
payloadFlag
|
|
1479
|
-
],
|
|
1480
|
-
risk: "write",
|
|
1481
|
-
buildInput: (ctx) => compactInput({
|
|
1482
|
-
...projectInput(ctx),
|
|
1483
|
-
operation: ctx.str("operation"),
|
|
1484
|
-
dashboard_id: optionalNumber2(ctx, "dashboard-id"),
|
|
1485
|
-
dashboard_ids: optionalJsonArray(ctx, "dashboard-ids"),
|
|
1486
|
-
dashboard_name: optionalString2(ctx, "dashboard-name"),
|
|
1487
|
-
zone_offset: optionalNumber2(ctx, "zone-offset"),
|
|
1488
|
-
refresh_type: optionalNumber2(ctx, "refresh-type"),
|
|
1489
|
-
dashboard_status: optionalNumber2(ctx, "dashboard-status"),
|
|
1490
|
-
note_id: optionalNumber2(ctx, "note-id"),
|
|
1491
|
-
note_title: optionalString2(ctx, "note-title"),
|
|
1492
|
-
description: optionalString2(ctx, "description"),
|
|
1493
|
-
ui_config: optionalString2(ctx, "ui-config"),
|
|
1494
|
-
payload: optionalJson2(ctx, "payload")
|
|
1495
|
-
})
|
|
1496
|
-
});
|
|
1497
|
-
|
|
1498
|
-
// src/commands/te-analysis/dashboard/share-info.ts
|
|
1499
|
-
var dashboardShareInfo = createAnalysisCapabilityCommand({
|
|
1500
|
-
resource: "dashboard",
|
|
1501
|
-
command: "share-info",
|
|
1502
|
-
capabilityId: "analysis.dashboard.share_info",
|
|
1503
|
-
description: "Get dashboard sharing information.",
|
|
1504
|
-
flags: [projectIdFlag, { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." }],
|
|
1505
|
-
risk: "read",
|
|
1506
|
-
buildInput: (ctx) => ({
|
|
1507
|
-
...projectInput(ctx),
|
|
1508
|
-
dashboard_id: ctx.num("dashboard-id")
|
|
1509
|
-
})
|
|
1510
|
-
});
|
|
1511
|
-
|
|
1512
|
-
// src/commands/te-analysis/dashboard/share.ts
|
|
1513
|
-
var dashboardShare = createAnalysisCapabilityCommand({
|
|
1514
|
-
resource: "dashboard",
|
|
1515
|
-
command: "share",
|
|
1516
|
-
capabilityId: "analysis.dashboard.share",
|
|
1517
|
-
description: "Modify dashboard sharing members through the capability gateway.",
|
|
1518
|
-
flags: [
|
|
1519
|
-
projectIdFlag,
|
|
1520
|
-
{ name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
|
|
1521
|
-
{ name: "member-authorities", type: "json", required: false, desc: "Optional member authority map." },
|
|
1522
|
-
payloadFlag
|
|
1523
|
-
],
|
|
1524
|
-
risk: "write",
|
|
1525
|
-
buildInput: (ctx) => compactInput({
|
|
1526
|
-
...projectInput(ctx),
|
|
1527
|
-
dashboard_id: ctx.num("dashboard-id"),
|
|
1528
|
-
member_authorities: optionalJson2(ctx, "member-authorities"),
|
|
1529
|
-
payload: optionalJson2(ctx, "payload")
|
|
1530
|
-
})
|
|
1531
|
-
});
|
|
1532
|
-
|
|
1533
|
-
// src/commands/te-analysis/dashboard/delete.ts
|
|
1534
|
-
var dashboardDelete = createAnalysisCapabilityCommand({
|
|
1535
|
-
resource: "dashboard",
|
|
1536
|
-
command: "delete",
|
|
1537
|
-
capabilityId: "analysis.dashboard.delete",
|
|
1538
|
-
description: "Delete one or more dashboards.",
|
|
1539
|
-
flags: [projectIdFlag, { name: "dashboard-ids", type: "json", required: true, desc: "Dashboard ID array." }],
|
|
1540
|
-
risk: "high-risk-write",
|
|
1541
|
-
buildInput: (ctx) => ({
|
|
1542
|
-
...projectInput(ctx),
|
|
1543
|
-
dashboard_ids: jsonArray(ctx, "dashboard-ids")
|
|
1544
|
-
})
|
|
1545
|
-
});
|
|
1546
|
-
|
|
1547
|
-
// src/commands/te-analysis/dashboard/handover.ts
|
|
1548
|
-
var dashboardHandover = createAnalysisCapabilityCommand({
|
|
1549
|
-
resource: "dashboard",
|
|
1550
|
-
command: "handover",
|
|
1551
|
-
capabilityId: "analysis.dashboard.handover",
|
|
1552
|
-
description: "Handover one or more dashboards to another project user.",
|
|
1553
|
-
flags: [
|
|
1554
|
-
projectIdFlag,
|
|
1555
|
-
{ name: "dashboard-ids", type: "json", required: true, desc: "Dashboard ID array." },
|
|
1556
|
-
{ name: "to-user-id", type: "number", required: true, desc: "Target user ID." }
|
|
1557
|
-
],
|
|
1558
|
-
risk: "write",
|
|
1559
|
-
buildInput: (ctx) => ({
|
|
1560
|
-
...projectInput(ctx),
|
|
1561
|
-
dashboard_ids: jsonArray(ctx, "dashboard-ids"),
|
|
1562
|
-
to_user_id: ctx.num("to-user-id")
|
|
1563
|
-
})
|
|
1564
|
-
});
|
|
1565
|
-
|
|
1566
|
-
// src/commands/te-analysis/dashboard/copy.ts
|
|
1567
|
-
var dashboardCopy = createAnalysisCapabilityCommand({
|
|
1568
|
-
resource: "dashboard",
|
|
1569
|
-
command: "copy",
|
|
1570
|
-
capabilityId: "analysis.dashboard.copy",
|
|
1571
|
-
description: "Copy a dashboard, optionally copying reports and targeting a project space or folder.",
|
|
1572
|
-
flags: [
|
|
1573
|
-
projectIdFlag,
|
|
1574
|
-
{ name: "dashboard-id", type: "number", required: true, desc: "Source dashboard ID." },
|
|
1575
|
-
{ name: "dashboard-name", type: "string", required: true, desc: "New dashboard name." },
|
|
1576
|
-
{ name: "report-copy", type: "boolean", required: false, desc: "Whether to copy reports. Default: false." },
|
|
1577
|
-
{ name: "to-space-id", type: "number", required: false, desc: "Target project space ID. If both target IDs are omitted, copy to the source dashboard location." },
|
|
1578
|
-
{ name: "to-folder-id", type: "number", required: false, desc: "Target folder ID. If both target IDs are omitted, copy to the source dashboard location." }
|
|
1579
|
-
],
|
|
1580
|
-
risk: "write",
|
|
1581
|
-
buildInput: (ctx) => compactInput({
|
|
1582
|
-
...projectInput(ctx),
|
|
1583
|
-
dashboard_id: ctx.num("dashboard-id"),
|
|
1584
|
-
dashboard_name: ctx.str("dashboard-name"),
|
|
1585
|
-
report_copy: booleanWithDefault(ctx, "report-copy", false),
|
|
1586
|
-
to_space_id: optionalNumber2(ctx, "to-space-id"),
|
|
1587
|
-
to_folder_id: optionalNumber2(ctx, "to-folder-id")
|
|
1588
|
-
})
|
|
1589
|
-
});
|
|
1590
|
-
|
|
1591
|
-
// src/commands/te-analysis/dashboard/freeze.ts
|
|
1592
|
-
var dashboardFreeze = createAnalysisCapabilityCommand({
|
|
1593
|
-
resource: "dashboard",
|
|
1594
|
-
command: "freeze",
|
|
1595
|
-
capabilityId: "analysis.dashboard.freeze",
|
|
1596
|
-
description: "Freeze or unfreeze one or more dashboards.",
|
|
1597
|
-
flags: [
|
|
1598
|
-
projectIdFlag,
|
|
1599
|
-
{ name: "dashboard-ids", type: "json", required: true, desc: "Dashboard ID array." },
|
|
1600
|
-
{ name: "freeze", type: "boolean", required: false, desc: "true to freeze, false to unfreeze. Default: true." }
|
|
1601
|
-
],
|
|
1602
|
-
risk: "write",
|
|
1603
|
-
buildInput: (ctx) => compactInput({
|
|
1604
|
-
...projectInput(ctx),
|
|
1605
|
-
dashboard_ids: jsonArray(ctx, "dashboard-ids"),
|
|
1606
|
-
freeze: optionalBoolean2(ctx, "freeze")
|
|
1607
|
-
})
|
|
1608
|
-
});
|
|
1609
|
-
|
|
1610
|
-
// src/commands/te-analysis/dashboard/abnormal-get.ts
|
|
1611
|
-
var dashboardAbnormalGet = createAnalysisCapabilityCommand({
|
|
1612
|
-
resource: "dashboard",
|
|
1613
|
-
command: "abnormal-get",
|
|
1614
|
-
capabilityId: "analysis.dashboard.abnormal_get",
|
|
1615
|
-
description: "Get abnormal dependency information for a dashboard.",
|
|
1616
|
-
flags: [projectIdFlag, { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." }],
|
|
1617
|
-
risk: "read",
|
|
1618
|
-
buildInput: (ctx) => ({
|
|
1619
|
-
...projectInput(ctx),
|
|
1620
|
-
dashboard_id: ctx.num("dashboard-id")
|
|
1621
|
-
})
|
|
1622
|
-
});
|
|
1623
|
-
|
|
1624
|
-
// src/commands/te-analysis/dashboard/task-status.ts
|
|
1625
|
-
var dashboardTaskStatus = createAnalysisCapabilityCommand({
|
|
1626
|
-
resource: "dashboard",
|
|
1627
|
-
command: "task-status",
|
|
1628
|
-
capabilityId: "analysis.dashboard.task_status",
|
|
1629
|
-
description: "Get dashboard scheduled task status.",
|
|
1630
|
-
flags: [projectIdFlag, { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." }],
|
|
1631
|
-
risk: "read",
|
|
1632
|
-
buildInput: (ctx) => ({
|
|
1633
|
-
...projectInput(ctx),
|
|
1634
|
-
dashboard_id: ctx.num("dashboard-id")
|
|
1635
|
-
})
|
|
1636
|
-
});
|
|
1637
|
-
|
|
1638
|
-
// src/commands/te-analysis/dashboard/index.ts
|
|
1639
|
-
var commands12 = [
|
|
1640
|
-
dashboardList,
|
|
1641
|
-
dashboardCreate,
|
|
1642
|
-
dashboardGet,
|
|
1643
|
-
dashboardUpdate,
|
|
1644
|
-
dashboardShareInfo,
|
|
1645
|
-
dashboardShare,
|
|
1646
|
-
dashboardDelete,
|
|
1647
|
-
dashboardHandover,
|
|
1648
|
-
dashboardCopy,
|
|
1649
|
-
dashboardFreeze,
|
|
1650
|
-
dashboardAbnormalGet,
|
|
1651
|
-
dashboardTaskStatus
|
|
1652
|
-
];
|
|
1653
|
-
var dashboard_default = commands12;
|
|
1654
|
-
|
|
1655
|
-
// src/commands/te-analysis/dashboard-report-data/run.ts
|
|
1656
|
-
var dashboardReportDataRun = createAnalysisCapabilityCommand({
|
|
1657
|
-
resource: "dashboard-report-data",
|
|
1658
|
-
command: "run",
|
|
1659
|
-
capabilityId: "analysis.dashboard_report_data.run",
|
|
1660
|
-
description: "Run a bounded dashboard report data query and return inline JSON.",
|
|
1661
|
-
flags: [
|
|
1662
|
-
projectIdFlag,
|
|
1663
|
-
{ name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
|
|
1664
|
-
{ name: "report-ids", type: "json", required: false, desc: "Optional report ID array. Omit to query all dashboard reports." },
|
|
1665
|
-
{ name: "filters", type: "json", required: false, desc: 'Optional analysis Filter JSON injected as commonFilter.aiFilter. Use analysis +get_filter_schema for schema, e.g. {"relation":"and","filts":[...]}.' },
|
|
1666
|
-
{ name: "start-time", type: "string", required: false, desc: "Optional start date/time." },
|
|
1667
|
-
{ name: "end-time", type: "string", required: false, desc: "Optional end date/time." },
|
|
1668
|
-
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
|
|
1669
|
-
{ name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
|
|
1670
|
-
{ name: "timeout-seconds", type: "number", required: false, desc: "Sync timeout seconds. Default: 60, max: 180." },
|
|
1671
|
-
limitFlag
|
|
1672
|
-
],
|
|
1673
|
-
risk: "read",
|
|
1674
|
-
buildInput: dashboardReportDataInput
|
|
1675
|
-
});
|
|
1676
|
-
|
|
1677
|
-
// src/commands/te-analysis/dashboard-report-data/export.ts
|
|
1678
|
-
var dashboardReportDataExport = createAnalysisCapabilityCommand({
|
|
1679
|
-
resource: "dashboard-report-data",
|
|
1680
|
-
command: "export",
|
|
1681
|
-
capabilityId: "analysis.dashboard_report_data.export",
|
|
1682
|
-
description: "Submit a dashboard report data query as an asynchronous gzip JSONL artifact.",
|
|
1683
|
-
flags: [
|
|
1684
|
-
projectIdFlag,
|
|
1685
|
-
{ name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
|
|
1686
|
-
{ name: "report-ids", type: "json", required: false, desc: "Optional report ID array. Omit to query all dashboard reports." },
|
|
1687
|
-
{ name: "filters", type: "json", required: false, desc: 'Optional analysis Filter JSON injected as commonFilter.aiFilter. Use analysis +get_filter_schema for schema, e.g. {"relation":"and","filts":[...]}.' },
|
|
1688
|
-
{ name: "start-time", type: "string", required: false, desc: "Optional start date/time." },
|
|
1689
|
-
{ name: "end-time", type: "string", required: false, desc: "Optional end date/time." },
|
|
1690
|
-
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
|
|
1691
|
-
{ name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
|
|
1692
|
-
{ name: "timeout-seconds", type: "number", required: false, desc: "Export timeout seconds. Default: 3600, max: 7200." },
|
|
1693
|
-
{ name: "artifact-format", type: "string", required: false, desc: "Artifact format. Only jsonl is supported." }
|
|
1694
|
-
],
|
|
1695
|
-
risk: "read",
|
|
1696
|
-
buildInput: dashboardReportDataInput
|
|
1697
|
-
});
|
|
1698
|
-
|
|
1699
|
-
// src/commands/te-analysis/dashboard-report-data/index.ts
|
|
1700
|
-
var commands13 = [
|
|
1701
|
-
dashboardReportDataRun,
|
|
1702
|
-
dashboardReportDataExport
|
|
1703
|
-
];
|
|
1704
|
-
var dashboard_report_data_default = commands13;
|
|
1705
|
-
|
|
1706
|
-
// src/commands/te-analysis/query/cancel.ts
|
|
1707
|
-
var queryCancel = createAnalysisCapabilityCommand({
|
|
1708
|
-
resource: "query",
|
|
1709
|
-
command: "cancel",
|
|
1710
|
-
capabilityId: "analysis.query.cancel",
|
|
1711
|
-
description: "Cancel an analysis capability-gateway query/export by run_id.",
|
|
1712
|
-
flags: [
|
|
1713
|
-
{ name: "run-id", type: "string", required: true, desc: "Async run ID returned by an export capability." },
|
|
1714
|
-
{ name: "reason", type: "string", required: false, desc: "Optional cancellation reason." }
|
|
1715
|
-
],
|
|
1716
|
-
risk: "write",
|
|
1717
|
-
buildInput: (ctx) => compactInput({
|
|
1718
|
-
run_id: ctx.str("run-id"),
|
|
1719
|
-
reason: optionalString2(ctx, "reason")
|
|
1720
|
-
})
|
|
1721
|
-
});
|
|
1722
|
-
|
|
1723
|
-
// src/commands/te-analysis/query/index.ts
|
|
1724
|
-
var commands14 = [
|
|
1725
|
-
queryCancel
|
|
1726
|
-
];
|
|
1727
|
-
var query_default = commands14;
|
|
1728
|
-
|
|
1729
|
-
// src/commands/te-analysis/run/inspect.ts
|
|
1730
|
-
var runInspect = {
|
|
1731
|
-
service: "analysis",
|
|
1732
|
-
resource: "run",
|
|
1733
|
-
command: "inspect",
|
|
1734
|
-
description: "Inspect an analysis capability-gateway async run by run_id.",
|
|
1735
|
-
flags: [
|
|
1736
|
-
{ name: "run-id", type: "string", required: true, desc: "Async run ID returned by an export capability." }
|
|
1737
|
-
],
|
|
1738
|
-
risk: "read",
|
|
1739
|
-
dryRun: (ctx) => ({
|
|
1740
|
-
method: "GET",
|
|
1741
|
-
url: buildCapabilityGatewayUrl(
|
|
1742
|
-
ctx.host(),
|
|
1743
|
-
"analysis",
|
|
1744
|
-
`runs/${encodeURIComponent(ctx.str("run-id"))}`
|
|
1745
|
-
)
|
|
1746
|
-
}),
|
|
1747
|
-
execute: async (ctx) => callCapabilityApi(
|
|
1748
|
-
ctx.host(),
|
|
1749
|
-
"analysis",
|
|
1750
|
-
`runs/${encodeURIComponent(ctx.str("run-id"))}`,
|
|
1751
|
-
"GET"
|
|
1752
|
-
)
|
|
1753
|
-
};
|
|
1754
|
-
|
|
1755
|
-
// src/commands/te-analysis/run/index.ts
|
|
1756
|
-
var commands15 = [
|
|
1757
|
-
runInspect
|
|
1758
|
-
];
|
|
1759
|
-
var run_default = commands15;
|
|
1760
|
-
|
|
1761
|
-
// src/commands/te-analysis/artifact/download.ts
|
|
1762
|
-
import { mkdir, writeFile } from "fs/promises";
|
|
1763
|
-
import { dirname, resolve } from "path";
|
|
1764
|
-
var artifactDownload = {
|
|
1765
|
-
service: "analysis",
|
|
1766
|
-
resource: "artifact",
|
|
1767
|
-
command: "download",
|
|
1768
|
-
description: "Download a run-scoped analysis capability-gateway artifact to a local file.",
|
|
1769
|
-
flags: [
|
|
1770
|
-
{ name: "run-id", type: "string", required: true, desc: "Async run ID returned by an export capability." },
|
|
1771
|
-
{ name: "artifact-id", type: "string", required: true, desc: "Artifact ID returned by an export capability." },
|
|
1772
|
-
{ name: "output", type: "string", required: true, desc: "Local output file path. Use a file path, not a directory." }
|
|
1773
|
-
],
|
|
1774
|
-
risk: "read",
|
|
1775
|
-
dryRun: (ctx) => ({
|
|
1776
|
-
method: "GET",
|
|
1777
|
-
url: buildCapabilityGatewayUrl(
|
|
1778
|
-
ctx.host(),
|
|
1779
|
-
"analysis",
|
|
1780
|
-
`runs/${encodeURIComponent(ctx.str("run-id"))}/artifacts/${encodeURIComponent(ctx.str("artifact-id"))}/download`
|
|
1781
|
-
),
|
|
1782
|
-
body: {
|
|
1783
|
-
output_path: resolve(ctx.str("output"))
|
|
1784
|
-
}
|
|
1785
|
-
}),
|
|
1786
|
-
execute: async (ctx) => {
|
|
1787
|
-
const outputPath = resolve(ctx.str("output"));
|
|
1788
|
-
const artifact = await downloadCapabilityArtifact(
|
|
1789
|
-
ctx.host(),
|
|
1790
|
-
"analysis",
|
|
1791
|
-
ctx.str("run-id"),
|
|
1792
|
-
ctx.str("artifact-id")
|
|
1793
|
-
);
|
|
1794
|
-
await mkdir(dirname(outputPath), { recursive: true });
|
|
1795
|
-
await writeFile(outputPath, artifact.bytes);
|
|
1796
|
-
return {
|
|
1797
|
-
run_id: ctx.str("run-id"),
|
|
1798
|
-
artifact_id: ctx.str("artifact-id"),
|
|
1799
|
-
output_path: outputPath,
|
|
1800
|
-
bytes: artifact.bytes.byteLength,
|
|
1801
|
-
content_type: artifact.contentType,
|
|
1802
|
-
content_disposition: artifact.contentDisposition
|
|
1803
|
-
};
|
|
1804
|
-
}
|
|
1805
|
-
};
|
|
1806
|
-
|
|
1807
|
-
// src/commands/te-analysis/artifact/index.ts
|
|
1808
|
-
var commands16 = [
|
|
1809
|
-
artifactDownload
|
|
1810
|
-
];
|
|
1811
|
-
var artifact_default = commands16;
|
|
1812
|
-
|
|
1813
|
-
// src/commands/te-analysis/dashboard-definition/export.ts
|
|
1814
|
-
var dashboardDefinitionExport = createAnalysisCapabilityCommand({
|
|
1815
|
-
resource: "dashboard-definition",
|
|
1816
|
-
command: "export",
|
|
1817
|
-
capabilityId: "analysis.dashboard_definition.export",
|
|
1818
|
-
description: "Export dashboard definition JSON.",
|
|
1819
|
-
flags: [
|
|
1820
|
-
projectIdFlag,
|
|
1821
|
-
{ name: "dashboard-id", type: "number", required: false, desc: "Single dashboard ID to export. The gateway resolves folder or project-space context." },
|
|
1822
|
-
{ name: "dashboard-ids", type: "json", required: false, desc: "Dashboard ID array to export. The gateway resolves folder or project-space context." },
|
|
1823
|
-
{ name: "dashboard-folder-ids", type: "json", required: false, desc: 'Private folder ID array, or advanced descriptor array: [{"dashboard_folder_id":1,"dashboard_ids":[2]}].' },
|
|
1824
|
-
{ name: "shared-spaces", type: "json", required: false, desc: "Shared space export descriptor array." },
|
|
1825
|
-
{ name: "export-file-name", type: "string", required: false, desc: "Optional export file name." },
|
|
1826
|
-
payloadFlag
|
|
1827
|
-
],
|
|
1828
|
-
risk: "read",
|
|
1829
|
-
buildInput: (ctx) => compactInput({
|
|
1830
|
-
...projectInput(ctx),
|
|
1831
|
-
dashboard_id: optionalNumber2(ctx, "dashboard-id"),
|
|
1832
|
-
dashboard_ids: optionalJsonArray(ctx, "dashboard-ids"),
|
|
1833
|
-
dashboard_folder_ids: optionalJsonArray(ctx, "dashboard-folder-ids"),
|
|
1834
|
-
shared_spaces: optionalJson2(ctx, "shared-spaces"),
|
|
1835
|
-
export_file_name: optionalString2(ctx, "export-file-name"),
|
|
1836
|
-
payload: optionalJson2(ctx, "payload")
|
|
1837
|
-
})
|
|
1838
|
-
});
|
|
1839
|
-
|
|
1840
|
-
// src/commands/te-analysis/dashboard-definition/import.ts
|
|
1841
|
-
var dashboardDefinitionImport = createAnalysisCapabilityCommand({
|
|
1842
|
-
resource: "dashboard-definition",
|
|
1843
|
-
command: "import",
|
|
1844
|
-
capabilityId: "analysis.dashboard_definition.import",
|
|
1845
|
-
description: "Validate or import dashboard definition JSON. Use --validate-only for import pre-check.",
|
|
1846
|
-
flags: [
|
|
1847
|
-
projectIdFlag,
|
|
1848
|
-
{ name: "definition", type: "json", required: true, desc: "Dashboard definition JSON object." },
|
|
1849
|
-
{ name: "validate-only", type: "boolean", required: false, desc: "Only validate import conflicts and importable state." },
|
|
1850
|
-
{ name: "dashboard-name-conflict-policy", type: "string", required: false, desc: "Optional dashboard name conflict policy." },
|
|
1851
|
-
{ name: "space-dashboard-policy", type: "string", required: false, desc: "Optional space/dashboard import policy." },
|
|
1852
|
-
payloadFlag
|
|
1853
|
-
],
|
|
1854
|
-
risk: "write",
|
|
1855
|
-
buildInput: (ctx) => compactInput({
|
|
1856
|
-
...projectInput(ctx),
|
|
1857
|
-
definition: ctx.json("definition"),
|
|
1858
|
-
validate_only: optionalBoolean2(ctx, "validate-only"),
|
|
1859
|
-
dashboard_name_conflict_policy: optionalString2(ctx, "dashboard-name-conflict-policy"),
|
|
1860
|
-
space_dashboard_policy: optionalString2(ctx, "space-dashboard-policy"),
|
|
1861
|
-
payload: optionalJson2(ctx, "payload")
|
|
1862
|
-
})
|
|
1863
|
-
});
|
|
1864
|
-
|
|
1865
|
-
// src/commands/te-analysis/dashboard-definition/index.ts
|
|
1866
|
-
var commands17 = [
|
|
1867
|
-
dashboardDefinitionExport,
|
|
1868
|
-
dashboardDefinitionImport
|
|
1869
|
-
];
|
|
1870
|
-
var dashboard_definition_default = commands17;
|
|
1871
|
-
|
|
1872
|
-
// src/commands/te-analysis/dashboard-daily-report/shared.ts
|
|
1873
|
-
function dailyReportFlags(update) {
|
|
1874
|
-
const falseDefault = update ? " Default: false." : "";
|
|
1875
|
-
const emptyDefault = update ? " Default: empty." : "";
|
|
1876
|
-
const weekdayDefault = update ? " Default: 1,2,3,4,5,6,7." : "";
|
|
1877
|
-
const timeDefault = update ? " Default: 09:00." : "";
|
|
1878
|
-
const langDefault = update ? " Default: zh-CN." : "";
|
|
1879
|
-
const screenDefault = update ? " Default: normal." : "";
|
|
1880
|
-
const zoneDefault = update ? " Default: 0." : "";
|
|
1881
|
-
return [
|
|
1882
|
-
{ name: "need-csv", type: "boolean", required: false, desc: `Whether to include CSV attachment.${falseDefault}` },
|
|
1883
|
-
{ name: "host-url", type: "string", required: false, desc: `Public host URL used in report links.${emptyDefault}` },
|
|
1884
|
-
{ name: "enable-smtp", type: "boolean", required: false, desc: `Whether to use configured SMTP for email.${falseDefault}` },
|
|
1885
|
-
{ name: "enable-email", type: "boolean", required: false, desc: `Whether to send by email.${falseDefault}` },
|
|
1886
|
-
{ name: "enable-dd", type: "boolean", required: false, desc: `Whether to send by DingTalk webhook.${falseDefault}` },
|
|
1887
|
-
{ name: "dd-url", type: "json", required: false, desc: 'DingTalk webhook URL array, e.g. ["https://..."].' },
|
|
1888
|
-
{ name: "enable-wx", type: "boolean", required: false, desc: `Whether to send by WeCom webhook.${falseDefault}` },
|
|
1889
|
-
{ name: "wx-url", type: "json", required: false, desc: 'WeCom webhook URL array, e.g. ["https://..."].' },
|
|
1890
|
-
{ name: "enable-feishu", type: "boolean", required: false, desc: `Whether to send by Feishu webhook.${falseDefault}` },
|
|
1891
|
-
{ name: "feishu-info", type: "json", required: false, desc: 'Feishu config object, e.g. {"webhook":["https://..."]}.' },
|
|
1892
|
-
{ name: "enable-kim", type: "boolean", required: false, desc: `Whether to send by KIM/custom webhook.${falseDefault}` },
|
|
1893
|
-
{ name: "kim-url", type: "json", required: false, desc: 'KIM/custom webhook URL array, e.g. ["https://..."].' },
|
|
1894
|
-
{ name: "enable-slack", type: "boolean", required: false, desc: `Whether to send by Slack webhook.${falseDefault}` },
|
|
1895
|
-
{ name: "slack-url", type: "json", required: false, desc: 'Slack webhook URL array, e.g. ["https://..."].' },
|
|
1896
|
-
{ name: "email-login-users", type: "string", required: false, desc: "Comma-separated login users for email channel." },
|
|
1897
|
-
{ name: "email-new", type: "string", required: false, desc: "Comma-separated external emails when SMTP is enabled." },
|
|
1898
|
-
{ name: "send-title", type: "string", required: false, desc: "Daily report title." },
|
|
1899
|
-
{ name: "send-content", type: "string", required: false, desc: "Daily report content." },
|
|
1900
|
-
{ name: "send-date", type: "string", required: false, desc: `Scheduled weekdays, comma-separated 1..7.${weekdayDefault}` },
|
|
1901
|
-
{ name: "send-time", type: "string", required: false, desc: `Scheduled send time, HH:mm.${timeDefault}` },
|
|
1902
|
-
{ name: "lang", type: "string", required: false, desc: `Report language.${langDefault}` },
|
|
1903
|
-
{ name: "screen-type", type: "string", required: false, desc: `Screenshot screen type.${screenDefault}` },
|
|
1904
|
-
{ name: "zone-offset", type: "number", required: false, desc: `Time zone offset.${zoneDefault}` },
|
|
1905
|
-
...update ? [
|
|
1906
|
-
{ name: "enable-send", type: "boolean", required: false, desc: "Whether to enable scheduled sending. Default: false." }
|
|
1907
|
-
] : []
|
|
1908
|
-
];
|
|
1909
|
-
}
|
|
1910
|
-
function dailyReportInput(ctx, update) {
|
|
1911
|
-
const payload = optionalJson2(ctx, "payload");
|
|
1912
|
-
const useDefaults = update && payload === void 0;
|
|
1913
|
-
return compactInput({
|
|
1914
|
-
...projectInput(ctx),
|
|
1915
|
-
dashboard_id: ctx.num("dashboard-id"),
|
|
1916
|
-
need_csv: useDefaults ? booleanWithDefault(ctx, "need-csv", false) : optionalBoolean2(ctx, "need-csv"),
|
|
1917
|
-
host_url: useDefaults ? stringWithDefault(ctx, "host-url", "") : optionalString2(ctx, "host-url"),
|
|
1918
|
-
enable_smtp: useDefaults ? booleanWithDefault(ctx, "enable-smtp", false) : optionalBoolean2(ctx, "enable-smtp"),
|
|
1919
|
-
enable_email: useDefaults ? booleanWithDefault(ctx, "enable-email", false) : optionalBoolean2(ctx, "enable-email"),
|
|
1920
|
-
enable_dd: useDefaults ? booleanWithDefault(ctx, "enable-dd", false) : optionalBoolean2(ctx, "enable-dd"),
|
|
1921
|
-
dd_url: optionalJson2(ctx, "dd-url"),
|
|
1922
|
-
enable_wx: useDefaults ? booleanWithDefault(ctx, "enable-wx", false) : optionalBoolean2(ctx, "enable-wx"),
|
|
1923
|
-
wx_url: optionalJson2(ctx, "wx-url"),
|
|
1924
|
-
enable_feishu: useDefaults ? booleanWithDefault(ctx, "enable-feishu", false) : optionalBoolean2(ctx, "enable-feishu"),
|
|
1925
|
-
feishu_info: optionalJson2(ctx, "feishu-info"),
|
|
1926
|
-
enable_kim: useDefaults ? booleanWithDefault(ctx, "enable-kim", false) : optionalBoolean2(ctx, "enable-kim"),
|
|
1927
|
-
kim_url: optionalJson2(ctx, "kim-url"),
|
|
1928
|
-
enable_slack: useDefaults ? booleanWithDefault(ctx, "enable-slack", false) : optionalBoolean2(ctx, "enable-slack"),
|
|
1929
|
-
slack_url: optionalJson2(ctx, "slack-url"),
|
|
1930
|
-
email_login_users: optionalString2(ctx, "email-login-users"),
|
|
1931
|
-
email_new: optionalString2(ctx, "email-new"),
|
|
1932
|
-
send_title: optionalString2(ctx, "send-title"),
|
|
1933
|
-
send_content: optionalString2(ctx, "send-content"),
|
|
1934
|
-
send_date: useDefaults ? stringWithDefault(ctx, "send-date", "1,2,3,4,5,6,7") : optionalString2(ctx, "send-date"),
|
|
1935
|
-
send_time: useDefaults ? stringWithDefault(ctx, "send-time", "09:00") : optionalString2(ctx, "send-time"),
|
|
1936
|
-
lang: useDefaults ? stringWithDefault(ctx, "lang", "zh-CN") : optionalString2(ctx, "lang"),
|
|
1937
|
-
screen_type: useDefaults ? stringWithDefault(ctx, "screen-type", "normal") : optionalString2(ctx, "screen-type"),
|
|
1938
|
-
zone_offset: useDefaults ? numberWithDefault(ctx, "zone-offset", 0) : optionalNumber2(ctx, "zone-offset"),
|
|
1939
|
-
enable_send: update ? useDefaults ? booleanWithDefault(ctx, "enable-send", false) : optionalBoolean2(ctx, "enable-send") : void 0,
|
|
1940
|
-
payload
|
|
1941
|
-
});
|
|
1942
|
-
}
|
|
1943
|
-
|
|
1944
|
-
// src/commands/te-analysis/dashboard-daily-report/update.ts
|
|
1945
|
-
var dashboardDailyReportUpdate = createAnalysisCapabilityCommand({
|
|
1946
|
-
resource: "dashboard-daily-report",
|
|
1947
|
-
command: "update",
|
|
1948
|
-
capabilityId: "analysis.dashboard_daily_report.update",
|
|
1949
|
-
description: "Update dashboard daily report configuration.",
|
|
1950
|
-
flags: [
|
|
1951
|
-
projectIdFlag,
|
|
1952
|
-
{ name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
|
|
1953
|
-
...dailyReportFlags(true),
|
|
1954
|
-
payloadFlag
|
|
1955
|
-
],
|
|
1956
|
-
risk: "write",
|
|
1957
|
-
buildInput: (ctx) => dailyReportInput(ctx, true)
|
|
1958
|
-
});
|
|
1959
|
-
|
|
1960
|
-
// src/commands/te-analysis/dashboard-daily-report/send.ts
|
|
1961
|
-
var dashboardDailyReportSend = createAnalysisCapabilityCommand({
|
|
1962
|
-
resource: "dashboard-daily-report",
|
|
1963
|
-
command: "send",
|
|
1964
|
-
capabilityId: "analysis.dashboard_daily_report.send",
|
|
1965
|
-
description: "Send dashboard daily report immediately. Omit config to use saved config; pass channel flags for an ad hoc send.",
|
|
1966
|
-
flags: [
|
|
1967
|
-
projectIdFlag,
|
|
1968
|
-
{ name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
|
|
1969
|
-
...dailyReportFlags(false),
|
|
1970
|
-
payloadFlag
|
|
1971
|
-
],
|
|
1972
|
-
risk: "write",
|
|
1973
|
-
buildInput: (ctx) => dailyReportInput(ctx, false)
|
|
1974
|
-
});
|
|
1975
|
-
|
|
1976
|
-
// src/commands/te-analysis/dashboard-daily-report/index.ts
|
|
1977
|
-
var commands18 = [
|
|
1978
|
-
dashboardDailyReportUpdate,
|
|
1979
|
-
dashboardDailyReportSend
|
|
1980
|
-
];
|
|
1981
|
-
var dashboard_daily_report_default = commands18;
|
|
1982
|
-
|
|
1983
|
-
// src/commands/te-analysis/bi-panel/list.ts
|
|
1984
|
-
var biPanelList = createAnalysisCapabilityCommand({
|
|
1985
|
-
resource: "bi-panel",
|
|
1986
|
-
command: "list",
|
|
1987
|
-
capabilityId: "analysis.bi_panel.list",
|
|
1988
|
-
description: "List BI panels visible to the current user through the capability gateway.",
|
|
1989
|
-
flags: [projectIdFlag, queryFlag, fieldsFlag, limitFlag, offsetFlag],
|
|
1990
|
-
risk: "read",
|
|
1991
|
-
buildInput: listInput
|
|
1992
|
-
});
|
|
1993
|
-
|
|
1994
|
-
// src/commands/te-analysis/bi-panel/get.ts
|
|
1995
|
-
var biPanelGet = createAnalysisCapabilityCommand({
|
|
1996
|
-
resource: "bi-panel",
|
|
1997
|
-
command: "get",
|
|
1998
|
-
capabilityId: "analysis.bi_panel.get",
|
|
1999
|
-
description: "Get a BI panel released page structure. Use bi-panel-version get --version-type draft for unpublished edits.",
|
|
2000
|
-
flags: [
|
|
2001
|
-
projectIdFlag,
|
|
2002
|
-
{ name: "panel-id", type: "number", required: true, desc: "BI panel ID." },
|
|
2003
|
-
fieldsFlag
|
|
2004
|
-
],
|
|
2005
|
-
risk: "read",
|
|
2006
|
-
buildInput: (ctx) => compactInput({
|
|
2007
|
-
...projectInput(ctx),
|
|
2008
|
-
panel_id: ctx.num("panel-id"),
|
|
2009
|
-
fields: optionalJson2(ctx, "fields")
|
|
2010
|
-
})
|
|
2011
|
-
});
|
|
2012
|
-
|
|
2013
|
-
// src/commands/te-analysis/bi-panel/create.ts
|
|
2014
|
-
var biPanelCreate = createAnalysisCapabilityCommand({
|
|
2015
|
-
resource: "bi-panel",
|
|
2016
|
-
command: "create",
|
|
2017
|
-
capabilityId: "analysis.bi_panel.create",
|
|
2018
|
-
description: "Create a BI panel.",
|
|
2019
|
-
flags: [
|
|
2020
|
-
projectIdFlag,
|
|
2021
|
-
{ name: "panel-name", type: "string", required: false, desc: "BI panel name." },
|
|
2022
|
-
{ name: "panel-uuid", type: "string", required: false, desc: "BI panel UUID." },
|
|
2023
|
-
{ name: "space-id", type: "number", required: false, desc: "Target project space ID." },
|
|
2024
|
-
{ name: "folder-id", type: "number", required: false, desc: "Target folder ID." },
|
|
2025
|
-
payloadFlag
|
|
2026
|
-
],
|
|
2027
|
-
risk: "write",
|
|
2028
|
-
buildInput: (ctx) => compactInput({
|
|
2029
|
-
...projectInput(ctx),
|
|
2030
|
-
panel_name: optionalString2(ctx, "panel-name"),
|
|
2031
|
-
panel_uuid: optionalString2(ctx, "panel-uuid"),
|
|
2032
|
-
space_id: optionalNumber2(ctx, "space-id"),
|
|
2033
|
-
folder_id: optionalNumber2(ctx, "folder-id"),
|
|
2034
|
-
payload: optionalJson2(ctx, "payload")
|
|
2035
|
-
})
|
|
2036
|
-
});
|
|
2037
|
-
|
|
2038
|
-
// src/commands/te-analysis/bi-panel/update.ts
|
|
2039
|
-
var biPanelUpdate = createAnalysisCapabilityCommand({
|
|
2040
|
-
resource: "bi-panel",
|
|
2041
|
-
command: "update",
|
|
2042
|
-
capabilityId: "analysis.bi_panel.update",
|
|
2043
|
-
description: "Update BI panel content or metadata.",
|
|
2044
|
-
flags: [
|
|
2045
|
-
projectIdFlag,
|
|
2046
|
-
{ name: "panel-name", type: "string", required: false, desc: "BI panel name." },
|
|
2047
|
-
{ name: "panel-uuid", type: "string", required: false, desc: "BI panel UUID." },
|
|
2048
|
-
payloadFlag
|
|
2049
|
-
],
|
|
2050
|
-
risk: "write",
|
|
2051
|
-
buildInput: (ctx) => compactInput({
|
|
2052
|
-
...projectInput(ctx),
|
|
2053
|
-
panel_name: optionalString2(ctx, "panel-name"),
|
|
2054
|
-
panel_uuid: optionalString2(ctx, "panel-uuid"),
|
|
2055
|
-
payload: optionalJson2(ctx, "payload")
|
|
2056
|
-
})
|
|
2057
|
-
});
|
|
2058
|
-
|
|
2059
|
-
// src/commands/te-analysis/bi-panel/delete.ts
|
|
2060
|
-
var biPanelDelete = createAnalysisCapabilityCommand({
|
|
2061
|
-
resource: "bi-panel",
|
|
2062
|
-
command: "delete",
|
|
2063
|
-
capabilityId: "analysis.bi_panel.delete",
|
|
2064
|
-
description: "Delete one or more BI panels.",
|
|
2065
|
-
flags: [projectIdFlag, { name: "panel-ids", type: "json", required: true, desc: "BI panel ID array." }],
|
|
2066
|
-
risk: "high-risk-write",
|
|
2067
|
-
buildInput: (ctx) => ({
|
|
2068
|
-
...projectInput(ctx),
|
|
2069
|
-
panel_ids: jsonArray(ctx, "panel-ids")
|
|
2070
|
-
})
|
|
2071
|
-
});
|
|
2072
|
-
|
|
2073
|
-
// src/commands/te-analysis/bi-panel/share.ts
|
|
2074
|
-
var biPanelShare = createAnalysisCapabilityCommand({
|
|
2075
|
-
resource: "bi-panel",
|
|
2076
|
-
command: "share",
|
|
2077
|
-
capabilityId: "analysis.bi_panel.share",
|
|
2078
|
-
description: "Modify BI panel sharing members.",
|
|
2079
|
-
flags: [projectIdFlag, { name: "panel-id", type: "number", required: true, desc: "BI panel ID." }, payloadFlag],
|
|
2080
|
-
risk: "write",
|
|
2081
|
-
buildInput: (ctx) => compactInput({
|
|
2082
|
-
...projectInput(ctx),
|
|
2083
|
-
panel_id: ctx.num("panel-id"),
|
|
2084
|
-
payload: optionalJson2(ctx, "payload")
|
|
2085
|
-
})
|
|
2086
|
-
});
|
|
2087
|
-
|
|
2088
|
-
// src/commands/te-analysis/bi-panel/copy.ts
|
|
2089
|
-
var biPanelCopy = createAnalysisCapabilityCommand({
|
|
2090
|
-
resource: "bi-panel",
|
|
2091
|
-
command: "copy",
|
|
2092
|
-
capabilityId: "analysis.bi_panel.copy",
|
|
2093
|
-
description: "Copy a BI panel.",
|
|
2094
|
-
flags: [
|
|
2095
|
-
projectIdFlag,
|
|
2096
|
-
{ name: "panel-name", type: "string", required: false, desc: "New BI panel name." },
|
|
2097
|
-
{ name: "panel-uuid", type: "string", required: false, desc: "Source BI panel UUID." },
|
|
2098
|
-
{ name: "space-id", type: "number", required: false, desc: "Target project space ID." },
|
|
2099
|
-
{ name: "folder-id", type: "number", required: false, desc: "Target folder ID." },
|
|
2100
|
-
payloadFlag
|
|
2101
|
-
],
|
|
2102
|
-
risk: "write",
|
|
2103
|
-
buildInput: (ctx) => compactInput({
|
|
2104
|
-
...projectInput(ctx),
|
|
2105
|
-
panel_name: optionalString2(ctx, "panel-name"),
|
|
2106
|
-
panel_uuid: optionalString2(ctx, "panel-uuid"),
|
|
2107
|
-
space_id: optionalNumber2(ctx, "space-id"),
|
|
2108
|
-
folder_id: optionalNumber2(ctx, "folder-id"),
|
|
2109
|
-
payload: optionalJson2(ctx, "payload")
|
|
2110
|
-
})
|
|
2111
|
-
});
|
|
2112
|
-
|
|
2113
|
-
// src/commands/te-analysis/bi-panel/index.ts
|
|
2114
|
-
var commands19 = [
|
|
2115
|
-
biPanelList,
|
|
2116
|
-
biPanelGet,
|
|
2117
|
-
biPanelCreate,
|
|
2118
|
-
biPanelUpdate,
|
|
2119
|
-
biPanelDelete,
|
|
2120
|
-
biPanelShare,
|
|
2121
|
-
biPanelCopy
|
|
2122
|
-
];
|
|
2123
|
-
var bi_panel_default = commands19;
|
|
2124
|
-
|
|
2125
|
-
// src/commands/te-analysis/bi-panel-version/get.ts
|
|
2126
|
-
var biPanelVersionGet = createAnalysisCapabilityCommand({
|
|
2127
|
-
resource: "bi-panel-version",
|
|
2128
|
-
command: "get",
|
|
2129
|
-
capabilityId: "analysis.bi_panel_version.get",
|
|
2130
|
-
description: "Get a BI panel release or draft version. Use draft to inspect unpublished edits.",
|
|
2131
|
-
flags: [
|
|
2132
|
-
projectIdFlag,
|
|
2133
|
-
{ name: "panel-id", type: "number", required: false, desc: "BI panel ID. Required when --panel-uuid is omitted." },
|
|
2134
|
-
{ name: "panel-uuid", type: "string", required: false, desc: "BI panel UUID. Required when --panel-id is omitted." },
|
|
2135
|
-
{ name: "version-type", type: "string", required: false, desc: "Version to inspect: release or draft. Default: release." },
|
|
2136
|
-
fieldsFlag
|
|
2137
|
-
],
|
|
2138
|
-
risk: "read",
|
|
2139
|
-
buildInput: (ctx) => compactInput({
|
|
2140
|
-
...projectInput(ctx),
|
|
2141
|
-
panel_id: ctx.str("panel-id") === "" ? void 0 : ctx.num("panel-id"),
|
|
2142
|
-
panel_uuid: optionalString2(ctx, "panel-uuid"),
|
|
2143
|
-
version_type: optionalString2(ctx, "version-type"),
|
|
2144
|
-
fields: optionalJson2(ctx, "fields")
|
|
2145
|
-
})
|
|
2146
|
-
});
|
|
2147
|
-
|
|
2148
|
-
// src/commands/te-analysis/bi-panel-version/publish.ts
|
|
2149
|
-
var biPanelVersionPublish = createAnalysisCapabilityCommand({
|
|
2150
|
-
resource: "bi-panel-version",
|
|
2151
|
-
command: "publish",
|
|
2152
|
-
capabilityId: "analysis.bi_panel_version.publish",
|
|
2153
|
-
description: "Publish the current BI panel draft. Requires source version returned by bi-panel-version get.",
|
|
2154
|
-
flags: [
|
|
2155
|
-
projectIdFlag,
|
|
2156
|
-
{ name: "panel-id", type: "number", required: false, desc: "BI panel ID. Required when --panel-uuid is omitted." },
|
|
2157
|
-
{ name: "panel-uuid", type: "string", required: false, desc: "BI panel UUID. Required when --panel-id is omitted." },
|
|
2158
|
-
{ name: "source-version", type: "string", required: true, desc: "Current draft version to publish, for example 0.1." }
|
|
2159
|
-
],
|
|
2160
|
-
risk: "write",
|
|
2161
|
-
buildInput: (ctx) => compactInput({
|
|
2162
|
-
...projectInput(ctx),
|
|
2163
|
-
panel_id: ctx.str("panel-id") === "" ? void 0 : ctx.num("panel-id"),
|
|
2164
|
-
panel_uuid: optionalString2(ctx, "panel-uuid"),
|
|
2165
|
-
source_version: ctx.str("source-version")
|
|
2166
|
-
})
|
|
2167
|
-
});
|
|
2168
|
-
|
|
2169
|
-
// src/commands/te-analysis/bi-panel-version/index.ts
|
|
2170
|
-
var commands20 = [
|
|
2171
|
-
biPanelVersionGet,
|
|
2172
|
-
biPanelVersionPublish
|
|
2173
|
-
];
|
|
2174
|
-
var bi_panel_version_default = commands20;
|
|
2175
|
-
|
|
2176
|
-
// src/commands/te-analysis/bi-panel-page-data/run.ts
|
|
2177
|
-
var biPanelPageDataRun = createAnalysisCapabilityCommand({
|
|
2178
|
-
resource: "bi-panel-page-data",
|
|
2179
|
-
command: "run",
|
|
2180
|
-
capabilityId: "analysis.bi_panel_page_data.run",
|
|
2181
|
-
description: "Run a bounded BI panel page data query and return inline JSON.",
|
|
2182
|
-
flags: [
|
|
2183
|
-
projectIdFlag,
|
|
2184
|
-
{ name: "panel-id", type: "number", required: true, desc: "BI panel ID." },
|
|
2185
|
-
{ name: "page-key", type: "string", required: true, desc: "Page key returned by bi-panel get." },
|
|
2186
|
-
{ name: "result-type", type: "string", required: true, desc: "Result type: charts or summary." },
|
|
2187
|
-
{ name: "chart-ids", type: "json", required: false, desc: "Optional chart ID array." },
|
|
2188
|
-
{ name: "parameter-controls", type: "json", required: false, desc: "Optional parameter control override array." },
|
|
2189
|
-
{ name: "permission-controls", type: "json", required: false, desc: "Optional permission control array." },
|
|
2190
|
-
{ name: "chart-filter-controls", type: "json", required: false, desc: "Optional chart filter control array." },
|
|
2191
|
-
{ name: "columns", type: "json", required: false, desc: "Optional returned column array." },
|
|
2192
|
-
{ name: "row-limit", type: "number", required: false, desc: "Chart row limit." },
|
|
2193
|
-
{ name: "row-offset", type: "number", required: false, desc: "Chart row offset." },
|
|
2194
|
-
{ name: "block-limit", type: "number", required: false, desc: "Summary block limit." },
|
|
2195
|
-
{ name: "block-offset", type: "number", required: false, desc: "Summary block offset." },
|
|
2196
|
-
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
|
|
2197
|
-
{ name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
|
|
2198
|
-
{ name: "timeout-seconds", type: "number", required: false, desc: "Sync timeout seconds. Default: 60, max: 180." },
|
|
2199
|
-
limitFlag
|
|
2200
|
-
],
|
|
2201
|
-
risk: "read",
|
|
2202
|
-
buildInput: biPanelPageDataInput
|
|
2203
|
-
});
|
|
2204
|
-
|
|
2205
|
-
// src/commands/te-analysis/bi-panel-page-data/export.ts
|
|
2206
|
-
var biPanelPageDataExport = createAnalysisCapabilityCommand({
|
|
2207
|
-
resource: "bi-panel-page-data",
|
|
2208
|
-
command: "export",
|
|
2209
|
-
capabilityId: "analysis.bi_panel_page_data.export",
|
|
2210
|
-
description: "Submit a BI panel page data query as an asynchronous gzip JSONL artifact.",
|
|
2211
|
-
flags: [
|
|
2212
|
-
projectIdFlag,
|
|
2213
|
-
{ name: "panel-id", type: "number", required: true, desc: "BI panel ID." },
|
|
2214
|
-
{ name: "page-key", type: "string", required: true, desc: "Page key returned by bi-panel get." },
|
|
2215
|
-
{ name: "result-type", type: "string", required: true, desc: "Result type: charts or summary." },
|
|
2216
|
-
{ name: "chart-ids", type: "json", required: false, desc: "Optional chart ID array." },
|
|
2217
|
-
{ name: "parameter-controls", type: "json", required: false, desc: "Optional parameter control override array." },
|
|
2218
|
-
{ name: "permission-controls", type: "json", required: false, desc: "Optional permission control array." },
|
|
2219
|
-
{ name: "chart-filter-controls", type: "json", required: false, desc: "Optional chart filter control array." },
|
|
2220
|
-
{ name: "columns", type: "json", required: false, desc: "Optional returned column array." },
|
|
2221
|
-
{ name: "row-limit", type: "number", required: false, desc: "Chart row limit." },
|
|
2222
|
-
{ name: "row-offset", type: "number", required: false, desc: "Chart row offset." },
|
|
2223
|
-
{ name: "block-limit", type: "number", required: false, desc: "Summary block limit." },
|
|
2224
|
-
{ name: "block-offset", type: "number", required: false, desc: "Summary block offset." },
|
|
2225
|
-
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
|
|
2226
|
-
{ name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
|
|
2227
|
-
{ name: "timeout-seconds", type: "number", required: false, desc: "Export timeout seconds. Default: 600, max: 600." },
|
|
2228
|
-
{ name: "artifact-format", type: "string", required: false, desc: "Artifact format. Only jsonl is supported." }
|
|
2229
|
-
],
|
|
2230
|
-
risk: "read",
|
|
2231
|
-
buildInput: biPanelPageDataInput
|
|
2232
|
-
});
|
|
2233
|
-
|
|
2234
|
-
// src/commands/te-analysis/bi-panel-page-data/index.ts
|
|
2235
|
-
var commands21 = [
|
|
2236
|
-
biPanelPageDataRun,
|
|
2237
|
-
biPanelPageDataExport
|
|
2238
|
-
];
|
|
2239
|
-
var bi_panel_page_data_default = commands21;
|
|
2240
|
-
|
|
2241
|
-
// src/commands/te-analysis/project-space/list.ts
|
|
2242
|
-
var projectSpaceList = createAnalysisCapabilityCommand({
|
|
2243
|
-
resource: "project-space",
|
|
2244
|
-
command: "list",
|
|
2245
|
-
capabilityId: "analysis.project_space.list",
|
|
2246
|
-
description: "List project spaces visible to the current user.",
|
|
2247
|
-
flags: [projectIdFlag, queryFlag, fieldsFlag, limitFlag, offsetFlag],
|
|
2248
|
-
risk: "read",
|
|
2249
|
-
buildInput: listInput
|
|
2250
|
-
});
|
|
2251
|
-
|
|
2252
|
-
// src/commands/te-analysis/project-space/get.ts
|
|
2253
|
-
var projectSpaceGet = createAnalysisCapabilityCommand({
|
|
2254
|
-
resource: "project-space",
|
|
2255
|
-
command: "get",
|
|
2256
|
-
capabilityId: "analysis.project_space.get",
|
|
2257
|
-
description: "Get one project space detail.",
|
|
2258
|
-
flags: [projectIdFlag, { name: "space-id", type: "number", required: true, desc: "Project space ID." }, fieldsFlag],
|
|
2259
|
-
risk: "read",
|
|
2260
|
-
buildInput: (ctx) => compactInput({
|
|
2261
|
-
...projectInput(ctx),
|
|
2262
|
-
space_id: ctx.num("space-id"),
|
|
2263
|
-
fields: optionalJson2(ctx, "fields")
|
|
2264
|
-
})
|
|
2265
|
-
});
|
|
2266
|
-
|
|
2267
|
-
// src/commands/te-analysis/project-space/index.ts
|
|
2268
|
-
var commands22 = [
|
|
2269
|
-
projectSpaceList,
|
|
2270
|
-
projectSpaceGet
|
|
2271
|
-
];
|
|
2272
|
-
var project_space_default = commands22;
|
|
2273
|
-
|
|
2274
|
-
// src/commands/te-analysis/favorite/add.ts
|
|
2275
|
-
var favoriteAdd = createAnalysisCapabilityCommand({
|
|
2276
|
-
resource: "favorite",
|
|
2277
|
-
command: "add",
|
|
2278
|
-
capabilityId: "analysis.favorite.add",
|
|
2279
|
-
description: "Favorite one dashboard, BI panel, or folder.",
|
|
2280
|
-
flags: [
|
|
2281
|
-
projectIdFlag,
|
|
2282
|
-
{ name: "asset-id", type: "number", required: false, desc: "Asset ID." },
|
|
2283
|
-
{ name: "asset-type", type: "string", required: false, desc: "Asset type, for example dashboard, bi_panel, or folder." },
|
|
2284
|
-
{ name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." },
|
|
2285
|
-
{ name: "id", type: "number", required: false, desc: "Backend DTO ID field when required." },
|
|
2286
|
-
payloadFlag
|
|
2287
|
-
],
|
|
2288
|
-
risk: "write",
|
|
2289
|
-
buildInput: (ctx) => compactInput({
|
|
2290
|
-
...projectInput(ctx),
|
|
2291
|
-
asset_id: optionalNumber2(ctx, "asset-id"),
|
|
2292
|
-
asset_type: optionalString2(ctx, "asset-type"),
|
|
2293
|
-
space_id: optionalNumber2(ctx, "space-id"),
|
|
2294
|
-
id: optionalNumber2(ctx, "id"),
|
|
2295
|
-
payload: optionalJson2(ctx, "payload")
|
|
2296
|
-
})
|
|
2297
|
-
});
|
|
2298
|
-
|
|
2299
|
-
// src/commands/te-analysis/favorite/remove.ts
|
|
2300
|
-
var favoriteRemove = createAnalysisCapabilityCommand({
|
|
2301
|
-
resource: "favorite",
|
|
2302
|
-
command: "remove",
|
|
2303
|
-
capabilityId: "analysis.favorite.remove",
|
|
2304
|
-
description: "Remove favorite from one dashboard, BI panel, or folder.",
|
|
2305
|
-
flags: [
|
|
2306
|
-
projectIdFlag,
|
|
2307
|
-
{ name: "asset-id", type: "number", required: false, desc: "Asset ID." },
|
|
2308
|
-
{ name: "asset-type", type: "string", required: false, desc: "Asset type, for example dashboard, bi_panel, or folder." },
|
|
2309
|
-
{ name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." },
|
|
2310
|
-
{ name: "id", type: "number", required: false, desc: "Backend DTO ID field when required." },
|
|
2311
|
-
payloadFlag
|
|
2312
|
-
],
|
|
2313
|
-
risk: "write",
|
|
2314
|
-
buildInput: (ctx) => compactInput({
|
|
2315
|
-
...projectInput(ctx),
|
|
2316
|
-
asset_id: optionalNumber2(ctx, "asset-id"),
|
|
2317
|
-
asset_type: optionalString2(ctx, "asset-type"),
|
|
2318
|
-
space_id: optionalNumber2(ctx, "space-id"),
|
|
2319
|
-
id: optionalNumber2(ctx, "id"),
|
|
2320
|
-
payload: optionalJson2(ctx, "payload")
|
|
2321
|
-
})
|
|
2322
|
-
});
|
|
2323
|
-
|
|
2324
|
-
// src/commands/te-analysis/favorite/index.ts
|
|
2325
|
-
var commands23 = [
|
|
2326
|
-
favoriteAdd,
|
|
2327
|
-
favoriteRemove
|
|
2328
|
-
];
|
|
2329
|
-
var favorite_default = commands23;
|
|
2330
|
-
|
|
2331
|
-
// src/commands/te-analysis/public-link/create.ts
|
|
2332
|
-
var publicLinkCreate = createAnalysisCapabilityCommand({
|
|
2333
|
-
resource: "public-link",
|
|
2334
|
-
command: "create",
|
|
2335
|
-
capabilityId: "analysis.public_link.create",
|
|
2336
|
-
description: "Create a public link for a dashboard or BI panel.",
|
|
2337
|
-
flags: [
|
|
2338
|
-
projectIdFlag,
|
|
2339
|
-
{ name: "company-id", type: "number", required: false, desc: "Company ID. Derived from project ID when omitted." },
|
|
2340
|
-
{ name: "resource-type", type: "string", required: true, desc: "Resource type: dashboard or bi_panel." },
|
|
2341
|
-
{ name: "resource-id", type: "number", required: true, desc: "Target resource ID." },
|
|
2342
|
-
{ name: "access-controls", type: "json", required: false, desc: "Public link access-control JSON." },
|
|
2343
|
-
{ name: "remark", type: "string", required: false, desc: "Public link remark." },
|
|
2344
|
-
{ name: "effective-at", type: "string", required: true, desc: "Effective time, yyyy-MM-dd HH:mm:ss." },
|
|
2345
|
-
{ name: "expires-at", type: "string", required: true, desc: "Expiration time, yyyy-MM-dd HH:mm:ss." },
|
|
2346
|
-
payloadFlag
|
|
2347
|
-
],
|
|
2348
|
-
risk: "write",
|
|
2349
|
-
buildInput: (ctx) => compactInput({
|
|
2350
|
-
...projectInput(ctx),
|
|
2351
|
-
company_id: optionalNumber2(ctx, "company-id"),
|
|
2352
|
-
resource_type: ctx.str("resource-type"),
|
|
2353
|
-
resource_id: ctx.num("resource-id"),
|
|
2354
|
-
access_controls: optionalJson2(ctx, "access-controls"),
|
|
2355
|
-
remark: optionalString2(ctx, "remark"),
|
|
2356
|
-
effective_at: ctx.str("effective-at"),
|
|
2357
|
-
expires_at: ctx.str("expires-at"),
|
|
2358
|
-
payload: optionalJson2(ctx, "payload")
|
|
2359
|
-
})
|
|
2360
|
-
});
|
|
2361
|
-
|
|
2362
|
-
// src/commands/te-analysis/public-link/list.ts
|
|
2363
|
-
var publicLinkList = createAnalysisCapabilityCommand({
|
|
2364
|
-
resource: "public-link",
|
|
2365
|
-
command: "list",
|
|
2366
|
-
capabilityId: "analysis.public_link.list",
|
|
2367
|
-
description: "List public links in a project.",
|
|
2368
|
-
flags: [projectIdFlag, queryFlag, fieldsFlag, limitFlag, offsetFlag],
|
|
2369
|
-
risk: "read",
|
|
2370
|
-
buildInput: listInput
|
|
2371
|
-
});
|
|
2372
|
-
|
|
2373
|
-
// src/commands/te-analysis/public-link/update.ts
|
|
2374
|
-
var publicLinkUpdate = createAnalysisCapabilityCommand({
|
|
2375
|
-
resource: "public-link",
|
|
2376
|
-
command: "update",
|
|
2377
|
-
capabilityId: "analysis.public_link.update",
|
|
2378
|
-
description: "Update a public link.",
|
|
2379
|
-
flags: [
|
|
2380
|
-
projectIdFlag,
|
|
2381
|
-
{ name: "company-id", type: "number", required: false, desc: "Company ID. Derived from project ID when omitted." },
|
|
2382
|
-
{ name: "link-id", type: "number", required: true, desc: "Public link ID." },
|
|
2383
|
-
{ name: "access-controls", type: "json", required: false, desc: "Public link access-control JSON." },
|
|
2384
|
-
{ name: "remark", type: "string", required: false, desc: "Public link remark." },
|
|
2385
|
-
{ name: "effective-at", type: "string", required: true, desc: "Effective time, yyyy-MM-dd HH:mm:ss." },
|
|
2386
|
-
{ name: "expires-at", type: "string", required: true, desc: "Expiration time, yyyy-MM-dd HH:mm:ss." },
|
|
2387
|
-
payloadFlag
|
|
2388
|
-
],
|
|
2389
|
-
risk: "write",
|
|
2390
|
-
buildInput: (ctx) => compactInput({
|
|
2391
|
-
...projectInput(ctx),
|
|
2392
|
-
company_id: optionalNumber2(ctx, "company-id"),
|
|
2393
|
-
link_id: ctx.num("link-id"),
|
|
2394
|
-
access_controls: optionalJson2(ctx, "access-controls"),
|
|
2395
|
-
remark: optionalString2(ctx, "remark"),
|
|
2396
|
-
effective_at: ctx.str("effective-at"),
|
|
2397
|
-
expires_at: ctx.str("expires-at"),
|
|
2398
|
-
payload: optionalJson2(ctx, "payload")
|
|
2399
|
-
})
|
|
2400
|
-
});
|
|
2401
|
-
|
|
2402
|
-
// src/commands/te-analysis/public-link/offline.ts
|
|
2403
|
-
var publicLinkOffline = createAnalysisCapabilityCommand({
|
|
2404
|
-
resource: "public-link",
|
|
2405
|
-
command: "offline",
|
|
2406
|
-
capabilityId: "analysis.public_link.offline",
|
|
2407
|
-
description: "Offline one or more public links.",
|
|
2408
|
-
flags: [
|
|
2409
|
-
projectIdFlag,
|
|
2410
|
-
{ name: "company-id", type: "number", required: false, desc: "Company ID. Derived from project ID when omitted." },
|
|
2411
|
-
{ name: "link-id", type: "number", required: false, desc: "Public link ID." },
|
|
2412
|
-
{ name: "link-ids", type: "json", required: false, desc: "Public link ID array." }
|
|
2413
|
-
],
|
|
2414
|
-
risk: "write",
|
|
2415
|
-
buildInput: (ctx) => compactInput({
|
|
2416
|
-
...projectInput(ctx),
|
|
2417
|
-
company_id: optionalNumber2(ctx, "company-id"),
|
|
2418
|
-
link_id: optionalNumber2(ctx, "link-id"),
|
|
2419
|
-
link_ids: optionalJsonArray(ctx, "link-ids")
|
|
2420
|
-
})
|
|
2421
|
-
});
|
|
2422
|
-
|
|
2423
|
-
// src/commands/te-analysis/public-link/delete.ts
|
|
2424
|
-
var publicLinkDelete = createAnalysisCapabilityCommand({
|
|
2425
|
-
resource: "public-link",
|
|
2426
|
-
command: "delete",
|
|
2427
|
-
capabilityId: "analysis.public_link.delete",
|
|
2428
|
-
description: "Delete one or more public links.",
|
|
2429
|
-
flags: [
|
|
2430
|
-
projectIdFlag,
|
|
2431
|
-
{ name: "company-id", type: "number", required: false, desc: "Company ID. Derived from project ID when omitted." },
|
|
2432
|
-
{ name: "link-id", type: "number", required: false, desc: "Public link ID." },
|
|
2433
|
-
{ name: "link-ids", type: "json", required: false, desc: "Public link ID array." }
|
|
2434
|
-
],
|
|
2435
|
-
risk: "high-risk-write",
|
|
2436
|
-
buildInput: (ctx) => compactInput({
|
|
2437
|
-
...projectInput(ctx),
|
|
2438
|
-
company_id: optionalNumber2(ctx, "company-id"),
|
|
2439
|
-
link_id: optionalNumber2(ctx, "link-id"),
|
|
2440
|
-
link_ids: optionalJsonArray(ctx, "link-ids")
|
|
2441
|
-
})
|
|
2442
|
-
});
|
|
2443
|
-
|
|
2444
|
-
// src/commands/te-analysis/public-link/index.ts
|
|
2445
|
-
var commands24 = [
|
|
2446
|
-
publicLinkCreate,
|
|
2447
|
-
publicLinkList,
|
|
2448
|
-
publicLinkUpdate,
|
|
2449
|
-
publicLinkOffline,
|
|
2450
|
-
publicLinkDelete
|
|
2451
|
-
];
|
|
2452
|
-
var public_link_default = commands24;
|
|
2453
|
-
|
|
2454
|
-
// src/commands/te-analysis/model/query-adhoc.ts
|
|
2455
|
-
var queryAdhoc = createMcpCommand({
|
|
2456
|
-
command: "+query_adhoc",
|
|
2457
|
-
description: "Run ad hoc analysis with an already-built qp. For every non-SQL model, call the matching +build_*_analysis_qp command first and pass its qp; do not handcraft qp or call get_analysis_query_schema/list_events/list_properties/list_metrics/get_metric before the builder. Only SQL uses the schema/verified-definition path. Supports fields/limit/offset pagination. For long-running or cancelable queries, requestId is required and must be provided before starting. For any query that may exceed the CLI or MCP HTTP timeout, generate requestId first so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If requestId is omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID.",
|
|
2458
|
-
flags: [
|
|
2459
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
2460
|
-
{ name: "model_type", type: "string", required: true, desc: "Model type. Supported values: event, retention, funnel, distribution, attribution, heat_map, interval, path, rank_list, prop_analysis, sql." },
|
|
2461
|
-
{ name: "qp", type: "json", required: true, desc: "Query parameter JSON. For every non-SQL model, pass qp returned by the matching +build_*_analysis_qp command. Use +get_analysis_query_schema only for SQL." },
|
|
2462
|
-
{ name: "request_id", type: "string", required: true, desc: "Required unique request ID used for tracking and cancellation. Generate it before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID. The response metadata.requestId echoes the supplied requestId and can also be passed to cancel_query(requestId) when the query is no longer needed." },
|
|
2463
|
-
{ name: "use_cache", type: "boolean", required: false, desc: "Whether to use result cache. Default: true" },
|
|
2464
|
-
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset in hours. For example, UTC+8 is 8 and UTC-5 is -5" },
|
|
2465
|
-
{ name: "is_sort_by_columns", type: "boolean", required: false, desc: "Whether to sort query results by columns. Default: false" },
|
|
2466
|
-
{ name: "resolve_recent_day", type: "boolean", required: false, desc: "Whether to resolve relative time expressions such as last 7 days. If omitted, the service auto-resolves when qp.eventView.recentDay exists and start/end time is incomplete; otherwise it defaults to false." },
|
|
2467
|
-
{ name: "fields", type: "json", required: false, desc: "Optional fields to return. Must match column names in result." },
|
|
2468
|
-
{ name: "limit", type: "number", required: false, desc: "Optional limit. Default: 1000, maximum: 10000. For model_type=sql, either omit LIMIT in the SQL or keep it equal to --limit (the two must not differ)." },
|
|
2469
|
-
{ name: "offset", type: "number", required: false, desc: "Optional offset. Default: 0." },
|
|
2470
|
-
{ name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." },
|
|
2471
|
-
...clusterQueryFlags("Optional cluster query scope. Supported values: GLOBAL, SLAVE. Omit to query the current self cluster. SQL model analysis does not support this parameter.")
|
|
2472
|
-
],
|
|
2473
|
-
risk: "read",
|
|
2474
|
-
validate: (ctx) => {
|
|
2475
|
-
const limit = optionalNumber(ctx, "limit");
|
|
2476
|
-
assertLimitWithinCap(limit, "limit");
|
|
2477
|
-
if (ctx.str("model_type") === "sql") {
|
|
2478
|
-
assertSqlLimitConsistent(ctx.json("qp"), limit);
|
|
2479
|
-
}
|
|
2480
|
-
},
|
|
2481
|
-
buildArgs: (ctx) => ({
|
|
2482
|
-
projectId: ctx.num("project_id"),
|
|
2483
|
-
modelType: ctx.str("model_type"),
|
|
2484
|
-
qp: requiredJsonString(ctx, "qp"),
|
|
2485
|
-
requestId: ctx.str("request_id"),
|
|
2486
|
-
useCache: optionalBoolean(ctx, "use_cache"),
|
|
2487
|
-
zoneOffset: optionalNumber(ctx, "zone_offset"),
|
|
2488
|
-
isSortByColumns: optionalBoolean(ctx, "is_sort_by_columns"),
|
|
2489
|
-
resolveRecentDay: optionalBoolean(ctx, "resolve_recent_day"),
|
|
2490
|
-
fields: optionalJson(ctx, "fields"),
|
|
2491
|
-
limit: resolveSqlAwareLimit(optionalNumber(ctx, "limit"), ctx.str("model_type"), ctx.json("qp")),
|
|
2492
|
-
offset: optionalNumber(ctx, "offset"),
|
|
2493
|
-
timeoutMinutes: optionalNumber(ctx, "timeout_minutes"),
|
|
2494
|
-
...optionalClusterQueryArgs(ctx)
|
|
2495
|
-
})
|
|
2496
|
-
});
|
|
2497
|
-
|
|
2498
|
-
// src/commands/te-analysis/model/cancel-query.ts
|
|
2499
|
-
var cancelQuery = createMcpCommand({
|
|
2500
|
-
command: "+cancel_query",
|
|
2501
|
-
description: "Cancel a running MCP query by request ID. Use this when a previous query is no longer needed, the caller or agent timed out before the query returned, the request returns fetch failed, hits an HTTP timeout, or the user asks to stop waiting. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running; call +cancel_query --request_id <same value> with the requestId supplied before starting the query. For proactive cancellation, generate and pass requestId to the query tool before starting it, then call cancel_query with the same value if you stop waiting.",
|
|
2502
|
-
flags: [
|
|
2503
|
-
{ name: "request_id", type: "string", required: true, desc: "Request ID returned by a query tool in metadata.requestId, or the requestId supplied before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef." },
|
|
2504
|
-
{ name: "reason", type: "string", required: false, desc: "Optional cancellation reason. Default: MCP_CANCEL_QUERY_TOOL." }
|
|
2505
|
-
],
|
|
2506
|
-
risk: "write",
|
|
2507
|
-
buildArgs: (ctx) => ({
|
|
2508
|
-
requestId: ctx.str("request_id"),
|
|
2509
|
-
reason: optionalString(ctx, "reason")
|
|
2510
|
-
})
|
|
2511
|
-
});
|
|
2512
|
-
|
|
2513
|
-
// src/commands/te-analysis/model/build-event-analysis-qp.ts
|
|
2514
|
-
var buildEventAnalysisQp = createMcpCommand({
|
|
2515
|
-
command: "+build_event_analysis_qp",
|
|
2516
|
-
description: "Build a validated event-analysis QP from structured intent. Call before query_adhoc for event ad-hoc analysis. Do not call get_analysis_query_schema/list_events/list_properties/list_metrics/get_metric first; the builder resolves events, properties, and saved metric names internally. For a saved metric, pass its name in metrics[].event. This command only builds qp and does not execute query_adhoc.",
|
|
2517
|
-
flags: [
|
|
2518
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
2519
|
-
{ name: "time_range", type: "json", required: true, desc: "Required time range JSON for event analysis." },
|
|
2520
|
-
{ name: "metrics", type: "json", required: true, desc: "Required event metrics JSON array." },
|
|
2521
|
-
{ name: "time_particle_size", type: "string", required: false, desc: "Optional time granularity. Default: total." },
|
|
2522
|
-
{ name: "groups", type: "json", required: false, desc: "Optional group-by dimensions JSON array." },
|
|
2523
|
-
{ name: "filters", type: "json", required: false, desc: "Optional global filters JSON array." },
|
|
2524
|
-
{ name: "relation", type: "string", required: false, desc: "Optional filter relation. Supported values: and, or. Default: and." },
|
|
2525
|
-
{ name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
|
|
2526
|
-
],
|
|
2527
|
-
risk: "read",
|
|
2528
|
-
buildArgs: (ctx) => ({
|
|
2529
|
-
projectId: ctx.num("project_id"),
|
|
2530
|
-
timeRange: ctx.json("time_range"),
|
|
2531
|
-
metrics: ctx.json("metrics"),
|
|
2532
|
-
timeParticleSize: ctx.str("time_particle_size") || void 0,
|
|
2533
|
-
groups: optionalJson(ctx, "groups"),
|
|
2534
|
-
filters: optionalJson(ctx, "filters"),
|
|
2535
|
-
relation: ctx.str("relation") || void 0,
|
|
2536
|
-
authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
|
|
2537
|
-
})
|
|
2538
|
-
});
|
|
2539
|
-
|
|
2540
|
-
// src/commands/te-analysis/model/build-retention-analysis-qp.ts
|
|
2541
|
-
var buildRetentionAnalysisQp = createMcpCommand({
|
|
2542
|
-
command: "+build_retention_analysis_qp",
|
|
2543
|
-
description: "Build a validated retention-analysis QP from structured intent. Call before query_adhoc for retention ad-hoc analysis. Do not call get_analysis_query_schema/list_events/list_properties/list_metrics/get_metric first; the builder resolves events and properties internally. This command only builds qp and does not execute query_adhoc.",
|
|
2544
|
-
flags: [
|
|
2545
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
2546
|
-
{ name: "time_range", type: "json", required: true, desc: "Required time range JSON for retention analysis." },
|
|
2547
|
-
{ name: "retention", type: "json", required: true, desc: "Required retention intent JSON." },
|
|
2548
|
-
{ name: "relation", type: "string", required: false, desc: "Optional top-level retention filter relation. Supported values: and, or. Default: and." },
|
|
2549
|
-
{ name: "time_particle_size", type: "string", required: false, desc: "Optional time granularity. Supported values: day, week, month." },
|
|
2550
|
-
{ name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
|
|
2551
|
-
],
|
|
2552
|
-
risk: "read",
|
|
2553
|
-
buildArgs: (ctx) => ({
|
|
2554
|
-
projectId: ctx.num("project_id"),
|
|
2555
|
-
timeRange: ctx.json("time_range"),
|
|
2556
|
-
retention: ctx.json("retention"),
|
|
2557
|
-
relation: ctx.str("relation") || void 0,
|
|
2558
|
-
timeParticleSize: ctx.str("time_particle_size") || void 0,
|
|
2559
|
-
authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
|
|
2560
|
-
})
|
|
2561
|
-
});
|
|
2562
|
-
|
|
2563
|
-
// src/commands/te-analysis/model/build-funnel-analysis-qp.ts
|
|
2564
|
-
var buildFunnelAnalysisQp = createMcpCommand({
|
|
2565
|
-
command: "+build_funnel_analysis_qp",
|
|
2566
|
-
description: "Build a validated funnel-analysis QP from structured intent. Call before query_adhoc for funnel ad-hoc analysis. Do not call get_analysis_query_schema/list_events/list_properties/list_metrics/get_metric first; the builder resolves events and properties internally. This command only builds qp and does not execute query_adhoc.",
|
|
2567
|
-
flags: [
|
|
2568
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
2569
|
-
{ name: "time_range", type: "json", required: true, desc: "Required time range JSON for funnel analysis." },
|
|
2570
|
-
{ name: "funnel", type: "json", required: true, desc: "Required funnel intent JSON." },
|
|
2571
|
-
{ name: "relation", type: "string", required: false, desc: "Optional top-level funnel filter relation. Supported values: and, or. Default: and." },
|
|
2572
|
-
{ name: "time_particle_size", type: "string", required: false, desc: "Optional time granularity. Supported values: day, week, month." },
|
|
2573
|
-
{ name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
|
|
2574
|
-
],
|
|
2575
|
-
risk: "read",
|
|
2576
|
-
buildArgs: (ctx) => ({
|
|
2577
|
-
projectId: ctx.num("project_id"),
|
|
2578
|
-
timeRange: ctx.json("time_range"),
|
|
2579
|
-
funnel: ctx.json("funnel"),
|
|
2580
|
-
relation: ctx.str("relation") || void 0,
|
|
2581
|
-
timeParticleSize: ctx.str("time_particle_size") || void 0,
|
|
2582
|
-
authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
|
|
2583
|
-
})
|
|
2584
|
-
});
|
|
2585
|
-
|
|
2586
|
-
// src/commands/te-analysis/model/build-prop-analysis-qp.ts
|
|
2587
|
-
var buildPropAnalysisQp = createMcpCommand({
|
|
2588
|
-
command: "+build_prop_analysis_qp",
|
|
2589
|
-
description: "Build a validated prop-analysis QP from structured intent. Call before query_adhoc for prop_analysis ad-hoc analysis. Do not call get_analysis_query_schema/list_properties/list_metrics/get_metric first; the builder resolves user properties internally. This command only builds qp and does not execute query_adhoc.",
|
|
2590
|
-
flags: [
|
|
2591
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
2592
|
-
{ name: "prop_analysis", type: "json", required: true, desc: "Required user property analysis intent JSON." },
|
|
2593
|
-
{ name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
|
|
2594
|
-
],
|
|
2595
|
-
risk: "read",
|
|
2596
|
-
buildArgs: (ctx) => ({
|
|
2597
|
-
projectId: ctx.num("project_id"),
|
|
2598
|
-
propAnalysis: ctx.json("prop_analysis"),
|
|
2599
|
-
authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
|
|
2600
|
-
})
|
|
2601
|
-
});
|
|
2602
|
-
|
|
2603
|
-
// src/commands/te-analysis/model/drilldown-users.ts
|
|
2604
|
-
var drilldownUsers = createMcpCommand({
|
|
2605
|
-
command: "+drilldown_users",
|
|
2606
|
-
description: "Drill down to the user list for a specific data point in an existing analysis result. Use only after query_adhoc, query_report_data, or query_dashboard_report_data, and keep qp consistent with the source analysis. Supports pagination with limit/offset. For long-running or cancelable queries, requestId is required and must be provided before starting. For any query that may exceed the CLI or MCP HTTP timeout, generate requestId first so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If requestId is omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID.",
|
|
2607
|
-
flags: [
|
|
2608
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
2609
|
-
{ name: "model_type", type: "string", required: true, desc: "Model type used in the source analysis. Supported values: event, retention, funnel, distribution, attribution, heat_map, interval, path, rank_list, prop_analysis, sql." },
|
|
2610
|
-
{ name: "qp", type: "json", required: true, desc: "Query parameter JSON from the source analysis. Keep it consistent with the original analysis." },
|
|
2611
|
-
{ name: "properties", type: "json", required: false, desc: "Optional user properties JSON array. If omitted, default properties are returned." },
|
|
2612
|
-
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset in hours. For example, UTC+8 is 8" },
|
|
2613
|
-
{ name: "drilldown_date", type: "string", required: false, desc: "Target drilldown date from the analysis result. Format: yyyy-MM-dd" },
|
|
2614
|
-
{ name: "drilldown_groups", type: "json", required: false, desc: 'Drilldown group values from the analysis result as a JSON array, for example ["ios"]' },
|
|
2615
|
-
{ name: "event_index", type: "number", required: false, desc: "Event index for event-model drilldown. Use the event position from the analysis result starting from 0." },
|
|
2616
|
-
{ name: "is_lost", type: "boolean", required: false, desc: "For retention analysis, true queries lost users and false queries retained users. Default: false" },
|
|
2617
|
-
{ name: "retention_days", type: "number", required: false, desc: "Retention interval in days from the analysis result, for example 7 for day-7 retention" },
|
|
2618
|
-
{ name: "is_churned_user", type: "boolean", required: false, desc: "For funnel analysis, true queries churned users and false queries converted users. Default: false" },
|
|
2619
|
-
{ name: "funnel_step", type: "number", required: false, desc: "Funnel step number from the analysis result starting from 1" },
|
|
2620
|
-
{ name: "interval", type: "string", required: false, desc: "Interval used for interval analysis" },
|
|
2621
|
-
{ name: "distribution_bucket", type: "number", required: false, desc: "Distribution bucket index from the analysis result" },
|
|
2622
|
-
{ name: "compare_index", type: "number", required: false, desc: "Comparison index used in comparison analysis scenarios" },
|
|
2623
|
-
{ name: "include_total", type: "boolean", required: false, desc: "Whether to query users from the total row. Default: false" },
|
|
2624
|
-
{ name: "relation_val", type: "string", required: false, desc: "Relation value used in relation analysis scenarios" },
|
|
2625
|
-
{ name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
|
|
2626
|
-
{ name: "limit", type: "number", required: false, desc: "Optional limit. Default: 1000, maximum: 10000." },
|
|
2627
|
-
{ name: "offset", type: "number", required: false, desc: "Optional offset. Default: 0." },
|
|
2628
|
-
{ name: "request_id", type: "string", required: true, desc: "Required unique request ID used for tracking and cancellation. Generate it before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID. The response metadata.requestId echoes the supplied requestId and can also be passed to cancel_query(requestId) when the query is no longer needed." },
|
|
2629
|
-
{ name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." }
|
|
2630
|
-
],
|
|
2631
|
-
risk: "read",
|
|
2632
|
-
validate: (ctx) => {
|
|
2633
|
-
assertLimitWithinCap(optionalNumber(ctx, "limit"), "limit");
|
|
2634
|
-
},
|
|
2635
|
-
buildArgs: (ctx) => ({
|
|
2636
|
-
projectId: ctx.num("project_id"),
|
|
2637
|
-
modelType: ctx.str("model_type"),
|
|
2638
|
-
qp: requiredJsonString(ctx, "qp"),
|
|
2639
|
-
properties: optionalJsonString(ctx, "properties"),
|
|
2640
|
-
zoneOffset: optionalNumber(ctx, "zone_offset"),
|
|
2641
|
-
drilldownDate: optionalString(ctx, "drilldown_date"),
|
|
2642
|
-
drilldownGroups: optionalJsonString(ctx, "drilldown_groups"),
|
|
2643
|
-
eventIndex: optionalNumber(ctx, "event_index"),
|
|
2644
|
-
isLost: optionalBoolean(ctx, "is_lost"),
|
|
2645
|
-
retentionDays: optionalNumber(ctx, "retention_days"),
|
|
2646
|
-
isChurnedUser: optionalBoolean(ctx, "is_churned_user"),
|
|
2647
|
-
funnelStep: optionalNumber(ctx, "funnel_step"),
|
|
2648
|
-
interval: optionalString(ctx, "interval"),
|
|
2649
|
-
distributionBucket: optionalNumber(ctx, "distribution_bucket"),
|
|
2650
|
-
compareIndex: optionalNumber(ctx, "compare_index"),
|
|
2651
|
-
includeTotal: optionalBoolean(ctx, "include_total"),
|
|
2652
|
-
relationVal: optionalString(ctx, "relation_val"),
|
|
2653
|
-
useCache: optionalBoolean(ctx, "use_cache"),
|
|
2654
|
-
limit: optionalNumber(ctx, "limit") ?? DEFAULT_QUERY_LIMIT,
|
|
2655
|
-
offset: optionalNumber(ctx, "offset"),
|
|
2656
|
-
requestId: ctx.str("request_id"),
|
|
2657
|
-
timeoutMinutes: optionalNumber(ctx, "timeout_minutes")
|
|
2658
|
-
})
|
|
2659
|
-
});
|
|
2660
|
-
|
|
2661
|
-
// src/commands/te-analysis/model/drilldown-user-events.ts
|
|
2662
|
-
var drilldownUserEvents = createMcpCommand({
|
|
2663
|
-
command: "+drilldown_user_events",
|
|
2664
|
-
description: "Drill down to detailed event sequences for a specific user on specific dates. Use the result of drilldown_users and keep event names and dates consistent with the source analysis. For long-running or cancelable queries, requestId is required and must be provided before starting. For any query that may exceed the CLI or MCP HTTP timeout, generate requestId first so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If requestId is omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID.",
|
|
2665
|
-
flags: [
|
|
2666
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
2667
|
-
{ name: "user_id", type: "string", required: true, desc: "User ID from drilldown_users" },
|
|
2668
|
-
{ name: "event_names", type: "json", required: true, desc: "JSON array of event names" },
|
|
2669
|
-
{ name: "target_dates", type: "json", required: true, desc: "JSON array of discrete target dates" },
|
|
2670
|
-
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset in hours. For example, UTC+8 is 8" },
|
|
2671
|
-
{ name: "properties", type: "json", required: false, desc: "Optional event properties JSON array" },
|
|
2672
|
-
{ name: "time_granularity", type: "string", required: false, desc: "Time granularity. Supported values: T0, T1, T2, T3, T4, T5, T6, T7" },
|
|
2673
|
-
{ name: "first_day_of_week", type: "number", required: false, desc: "First day of week. Supported values: 1-7" },
|
|
2674
|
-
{ name: "sort_order", type: "string", required: false, desc: "Sort order. Supported values: asc and desc" },
|
|
2675
|
-
{ name: "event_name_filter", type: "string", required: false, desc: "Optional event name filter" },
|
|
2676
|
-
{ name: "time_filter", type: "string", required: false, desc: "Optional time filter condition" },
|
|
2677
|
-
{ name: "time_filter_before_nums", type: "number", required: false, desc: "Number of records before the time filter point" },
|
|
2678
|
-
{ name: "time_filter_after_nums", type: "number", required: false, desc: "Number of records after the time filter point" },
|
|
2679
|
-
{ name: "entity_id", type: "number", required: false, desc: "Optional entity ID for multi-entity scenarios" },
|
|
2680
|
-
{ name: "entity_value", type: "string", required: false, desc: "Optional entity value for multi-entity scenarios" },
|
|
2681
|
-
{ name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
|
|
2682
|
-
{ name: "limit", type: "number", required: false, desc: "Result limit. Default: 1000, maximum: 10000." },
|
|
2683
|
-
{ name: "offset", type: "number", required: false, desc: "Result offset. Default: 0." },
|
|
2684
|
-
{ name: "request_id", type: "string", required: true, desc: "Required unique request ID used for tracking and cancellation. Generate it before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID. The response metadata.requestId echoes the supplied requestId and can also be passed to cancel_query(requestId) when the query is no longer needed." },
|
|
2685
|
-
{ name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." }
|
|
2686
|
-
],
|
|
2687
|
-
risk: "read",
|
|
2688
|
-
validate: (ctx) => {
|
|
2689
|
-
assertLimitWithinCap(optionalNumber(ctx, "limit"), "limit");
|
|
2690
|
-
},
|
|
2691
|
-
buildArgs: (ctx) => ({
|
|
2692
|
-
projectId: ctx.num("project_id"),
|
|
2693
|
-
userId: ctx.str("user_id"),
|
|
2694
|
-
eventNames: requiredJsonString(ctx, "event_names"),
|
|
2695
|
-
targetDates: requiredJsonString(ctx, "target_dates"),
|
|
2696
|
-
zoneOffset: optionalNumber(ctx, "zone_offset"),
|
|
2697
|
-
properties: optionalJsonString(ctx, "properties"),
|
|
2698
|
-
timeGranularity: optionalString(ctx, "time_granularity"),
|
|
2699
|
-
firstDayOfWeek: optionalNumber(ctx, "first_day_of_week"),
|
|
2700
|
-
sortOrder: optionalString(ctx, "sort_order"),
|
|
2701
|
-
eventNameFilter: optionalString(ctx, "event_name_filter"),
|
|
2702
|
-
timeFilter: optionalString(ctx, "time_filter"),
|
|
2703
|
-
timeFilterBeforeNums: optionalNumber(ctx, "time_filter_before_nums"),
|
|
2704
|
-
timeFilterAfterNums: optionalNumber(ctx, "time_filter_after_nums"),
|
|
2705
|
-
entityId: optionalNumber(ctx, "entity_id"),
|
|
2706
|
-
entityValue: optionalString(ctx, "entity_value"),
|
|
2707
|
-
useCache: optionalBoolean(ctx, "use_cache"),
|
|
2708
|
-
limit: optionalNumber(ctx, "limit") ?? DEFAULT_QUERY_LIMIT,
|
|
2709
|
-
offset: optionalNumber(ctx, "offset"),
|
|
2710
|
-
requestId: ctx.str("request_id"),
|
|
2711
|
-
timeoutMinutes: optionalNumber(ctx, "timeout_minutes")
|
|
2712
|
-
})
|
|
2713
|
-
});
|
|
2714
|
-
|
|
2715
|
-
// src/commands/te-analysis/model/create-result-cluster.ts
|
|
2716
|
-
var createResultCluster = createMcpCommand({
|
|
2717
|
-
command: "+create_result_cluster",
|
|
2718
|
-
description: "Create a reusable result cluster from users matched by a drilldown condition in an existing analysis result. Use only after query_adhoc, query_report_data, or query_dashboard_report_data.",
|
|
2719
|
-
flags: [
|
|
2720
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
2721
|
-
{ name: "cluster_name", type: "string", required: true, desc: "Cluster name. Must start with a letter and contain only letters, digits, and underscores. It must be unique within the project." },
|
|
2722
|
-
{ name: "model_type", type: "string", required: true, desc: "Model type used in the source analysis. Supported values: event, retention, funnel, distribution, attribution, heat_map, interval, path, rank_list, prop_analysis, sql." },
|
|
2723
|
-
{ name: "qp", type: "json", required: true, desc: "Query parameter JSON from the source analysis. Keep it consistent with the source analysis." },
|
|
2724
|
-
{ name: "display_name", type: "string", required: false, desc: "Optional cluster display name. If omitted, cluster_name is used." },
|
|
2725
|
-
{ name: "zone_offset", type: "number", required: false, desc: "Optional time zone offset. If omitted, the project default time zone is used." },
|
|
2726
|
-
{ name: "drilldown_date", type: "string", required: false, desc: "Target drilldown date from the analysis result. Format: yyyy-MM-dd" },
|
|
2727
|
-
{ name: "drilldown_groups", type: "json", required: false, desc: 'Drilldown group values from the analysis result as a JSON array, for example ["ios"]. Defaults to the overall group when omitted.' },
|
|
2728
|
-
{ name: "event_index", type: "number", required: false, desc: "Event index for event-model drilldown. Use the event position from the analysis result starting from 0." },
|
|
2729
|
-
{ name: "is_lost", type: "boolean", required: false, desc: "For retention analysis, true saves lost users and false saves retained users. Default: false" },
|
|
2730
|
-
{ name: "retention_days", type: "number", required: false, desc: "Retention interval in days from the analysis result, for example 7 for day-7 retention" },
|
|
2731
|
-
{ name: "is_churned_user", type: "boolean", required: false, desc: "For funnel analysis, true saves churned users and false saves converted users. Default: false" },
|
|
2732
|
-
{ name: "funnel_step", type: "number", required: false, desc: "Funnel step number from the analysis result starting from 1" },
|
|
2733
|
-
{ name: "interval", type: "string", required: false, desc: "Interval used for interval analysis" },
|
|
2734
|
-
{ name: "distribution_bucket", type: "number", required: false, desc: "Distribution bucket index from the analysis result" },
|
|
2735
|
-
{ name: "compare_index", type: "number", required: false, desc: "Comparison index used in comparison analysis scenarios" },
|
|
2736
|
-
{ name: "include_total", type: "boolean", required: false, desc: "Whether to save users from the total row. Default: false" },
|
|
2737
|
-
{ name: "relation_val", type: "string", required: false, desc: "Relation value used in relation analysis scenarios" }
|
|
2738
|
-
],
|
|
2739
|
-
risk: "write",
|
|
2740
|
-
buildArgs: (ctx) => ({
|
|
2741
|
-
projectId: ctx.num("project_id"),
|
|
2742
|
-
clusterName: ctx.str("cluster_name"),
|
|
2743
|
-
modelType: ctx.str("model_type"),
|
|
2744
|
-
qp: requiredJsonString(ctx, "qp"),
|
|
2745
|
-
displayName: optionalString(ctx, "display_name"),
|
|
2746
|
-
zoneOffset: optionalNumber(ctx, "zone_offset"),
|
|
2747
|
-
drilldownDate: optionalString(ctx, "drilldown_date"),
|
|
2748
|
-
drilldownGroups: optionalJsonString(ctx, "drilldown_groups"),
|
|
2749
|
-
eventIndex: optionalNumber(ctx, "event_index"),
|
|
2750
|
-
isLost: optionalBoolean(ctx, "is_lost"),
|
|
2751
|
-
retentionDays: optionalNumber(ctx, "retention_days"),
|
|
2752
|
-
isChurnedUser: optionalBoolean(ctx, "is_churned_user"),
|
|
2753
|
-
funnelStep: optionalNumber(ctx, "funnel_step"),
|
|
2754
|
-
interval: optionalString(ctx, "interval"),
|
|
2755
|
-
distributionBucket: optionalNumber(ctx, "distribution_bucket"),
|
|
2756
|
-
compareIndex: optionalNumber(ctx, "compare_index"),
|
|
2757
|
-
includeTotal: optionalBoolean(ctx, "include_total"),
|
|
2758
|
-
relationVal: optionalString(ctx, "relation_val")
|
|
2759
|
-
})
|
|
2760
|
-
});
|
|
2761
|
-
|
|
2762
|
-
// src/commands/te-analysis/model/load-filters.ts
|
|
2763
|
-
var loadFilters = createMcpCommand({
|
|
2764
|
-
command: "+load_filters",
|
|
2765
|
-
description: "Load candidate values for a property from event or user tables. Use quot to specify the property field whose enum values should be loaded.",
|
|
2766
|
-
flags: [
|
|
2767
|
-
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
2768
|
-
{ name: "quot", type: "string", required: true, desc: "Property identifier (field name). This is the property whose candidate values will be loaded." },
|
|
2769
|
-
{ name: "table_type", type: "string", required: true, desc: "Table type. Supported values: event and user." },
|
|
2770
|
-
{ name: "event_name", type: "string", required: false, desc: "Optional event name. Effective when table_type=event." },
|
|
2771
|
-
{ name: "inputdata", type: "string", required: false, desc: "Optional input prefix used for fuzzy filtering of candidate values." },
|
|
2772
|
-
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset in hours. For example, UTC+8 is 8" },
|
|
2773
|
-
{ name: "cluster_date_policy", type: "string", required: false, desc: "Cluster date policy. Supported values: LATEST, AUTO, SPECIFIED." },
|
|
2774
|
-
{ name: "specified_cluster_date", type: "string", required: false, desc: "Specified cluster date in yyyy-MM-dd format. Effective only when cluster_date_policy=SPECIFIED." },
|
|
2775
|
-
{ name: "is_report", type: "boolean", required: false, desc: "Whether this is report mode. Default: false" }
|
|
2776
|
-
],
|
|
2777
|
-
risk: "read",
|
|
2778
|
-
mcpService: "te_analysis_extend",
|
|
2779
|
-
buildArgs: (ctx) => ({
|
|
2780
|
-
projectId: ctx.num("project_id"),
|
|
2781
|
-
quot: ctx.str("quot"),
|
|
2782
|
-
tableType: ctx.str("table_type"),
|
|
2783
|
-
eventName: optionalString(ctx, "event_name"),
|
|
2784
|
-
inputdata: optionalString(ctx, "inputdata"),
|
|
2785
|
-
zoneOffset: optionalNumber(ctx, "zone_offset"),
|
|
2786
|
-
clusterDatePolicy: optionalString(ctx, "cluster_date_policy"),
|
|
2787
|
-
specifiedClusterDate: optionalString(ctx, "specified_cluster_date"),
|
|
2788
|
-
isReport: optionalBoolean(ctx, "is_report")
|
|
2789
|
-
})
|
|
2790
|
-
});
|
|
2791
|
-
|
|
2792
|
-
// src/commands/te-analysis/model/get-table-columns.ts
|
|
2793
|
-
var getTableColumns = createMcpCommand({
|
|
2794
|
-
command: "+get_table_columns",
|
|
2795
|
-
description: "Query the field list of a project table. Returns column names and types for a tableRef so the table structure can be understood before SQL analysis.",
|
|
2796
|
-
flags: [
|
|
2797
|
-
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
2798
|
-
{ name: "table_ref", type: "string", required: true, desc: "Table reference. Supports hive.schema.table, schema.table, or table. If only table is provided, the backend resolves it against project available tables and fails on ambiguity." }
|
|
2799
|
-
],
|
|
2800
|
-
risk: "read",
|
|
2801
|
-
mcpService: "te_analysis_extend",
|
|
2802
|
-
buildArgs: (ctx) => ({
|
|
2803
|
-
projectId: ctx.num("project_id"),
|
|
2804
|
-
tableRef: ctx.str("table_ref")
|
|
2805
|
-
})
|
|
2806
|
-
});
|
|
2807
|
-
|
|
2808
|
-
// src/commands/te-analysis/model/build-interval-analysis-qp.ts
|
|
2809
|
-
var buildIntervalAnalysisQp = createMcpCommand({
|
|
2810
|
-
command: "+build_interval_analysis_qp",
|
|
2811
|
-
description: "Build a validated interval-analysis QP from structured interval intent. Interval analysis measures the time elapsed between an initial event and a return event per user. Call before query_adhoc. This command only builds qp and does not execute query_adhoc.",
|
|
2812
|
-
flags: [
|
|
2813
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
2814
|
-
{ name: "time_range", type: "json", required: true, desc: "Required time range JSON for interval analysis." },
|
|
2815
|
-
{ name: "interval", type: "json", required: true, desc: "Interval analysis intent JSON. Required fields: initialEvent, returnEvent, window (value+unit). Optional: relationEventPropertyName, groups, filters, initialFilters, returnFilters, initialFilterRelation, returnFilterRelation." },
|
|
2816
|
-
{ name: "relation", type: "string", required: false, desc: "Filter relation for top-level interval filters. Supported values: and, or. Default: and." },
|
|
2817
|
-
{ name: "time_particle_size", type: "string", required: false, desc: "Time granularity. Allowed values: day, week, month. Defaults to day when omitted." },
|
|
2818
|
-
{ name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
|
|
2819
|
-
],
|
|
2820
|
-
risk: "read",
|
|
2821
|
-
buildArgs: (ctx) => ({
|
|
2822
|
-
projectId: ctx.num("project_id"),
|
|
2823
|
-
timeRange: ctx.json("time_range"),
|
|
2824
|
-
interval: ctx.json("interval"),
|
|
2825
|
-
relation: optionalString(ctx, "relation"),
|
|
2826
|
-
timeParticleSize: optionalString(ctx, "time_particle_size"),
|
|
2827
|
-
authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
|
|
2828
|
-
})
|
|
2829
|
-
});
|
|
2830
|
-
|
|
2831
|
-
// src/commands/te-analysis/model/build-path-analysis-qp.ts
|
|
2832
|
-
var buildPathAnalysisQp = createMcpCommand({
|
|
2833
|
-
command: "+build_path_analysis_qp",
|
|
2834
|
-
description: "Build a validated path-analysis QP from structured path intent. Path analysis visualizes user navigation flows between events within a session. Call before query_adhoc. This command only builds qp and does not execute query_adhoc.",
|
|
2835
|
-
flags: [
|
|
2836
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
2837
|
-
{ name: "time_range", type: "json", required: true, desc: "Required time range JSON for path analysis." },
|
|
2838
|
-
{ name: "path", type: "json", required: true, desc: "Path analysis intent JSON. Required fields: sourceEvent, eventNames (array), sessionInterval, sessionUnit. Optional: sourceType (0=forward, 1=backward, default 0)." },
|
|
2839
|
-
{ name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
|
|
2840
|
-
],
|
|
2841
|
-
risk: "read",
|
|
2842
|
-
buildArgs: (ctx) => ({
|
|
2843
|
-
projectId: ctx.num("project_id"),
|
|
2844
|
-
timeRange: ctx.json("time_range"),
|
|
2845
|
-
path: ctx.json("path"),
|
|
2846
|
-
authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
|
|
2847
|
-
})
|
|
2848
|
-
});
|
|
2849
|
-
|
|
2850
|
-
// src/commands/te-analysis/model/build-attribution-analysis-qp.ts
|
|
2851
|
-
var buildAttributionAnalysisQp = createMcpCommand({
|
|
2852
|
-
command: "+build_attribution_analysis_qp",
|
|
2853
|
-
description: "Build a validated attribution-analysis QP from structured attribution intent. Attribution analysis assigns conversion credit to touchpoint events that preceded a target conversion event. Call before query_adhoc. This command only builds qp and does not execute query_adhoc.",
|
|
2854
|
-
flags: [
|
|
2855
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
2856
|
-
{ name: "time_range", type: "json", required: true, desc: "Required time range JSON for attribution analysis." },
|
|
2857
|
-
{ name: "attribution", type: "json", required: true, desc: "Attribution intent JSON. Required fields: targetEvent, targetAggregation, attributionEvents (array), attributionModel (first/last/linear), window (value+unit). Optional: targetProperty, directConversion, filters, relation." },
|
|
2858
|
-
{ name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
|
|
2859
|
-
],
|
|
2860
|
-
risk: "read",
|
|
2861
|
-
buildArgs: (ctx) => ({
|
|
2862
|
-
projectId: ctx.num("project_id"),
|
|
2863
|
-
timeRange: ctx.json("time_range"),
|
|
2864
|
-
attribution: ctx.json("attribution"),
|
|
2865
|
-
authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
|
|
2866
|
-
})
|
|
2867
|
-
});
|
|
2868
|
-
|
|
2869
|
-
// src/commands/te-analysis/model/build-heat-map-analysis-qp.ts
|
|
2870
|
-
var buildHeatMapAnalysisQp = createMcpCommand({
|
|
2871
|
-
command: "+build_heat_map_analysis_qp",
|
|
2872
|
-
description: "Build a validated heatmap-analysis QP from structured heatmap intent. Heatmap analysis visualizes user interaction intensity on a 2D coordinate plane (e.g. screen position). Call before query_adhoc. This command only builds qp and does not execute query_adhoc.",
|
|
2873
|
-
flags: [
|
|
2874
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
2875
|
-
{ name: "time_range", type: "json", required: true, desc: "Required time range JSON for heatmap analysis." },
|
|
2876
|
-
{ name: "heat_map", type: "json", required: true, desc: "Heatmap intent JSON. Required fields: hotEvent, hotAggregation, xProp, yProp. Optional: hotProperty, filters, relation." },
|
|
2877
|
-
{ name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
|
|
2878
|
-
],
|
|
2879
|
-
risk: "read",
|
|
2880
|
-
buildArgs: (ctx) => ({
|
|
2881
|
-
projectId: ctx.num("project_id"),
|
|
2882
|
-
timeRange: ctx.json("time_range"),
|
|
2883
|
-
heatMap: ctx.json("heat_map"),
|
|
2884
|
-
authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
|
|
2885
|
-
})
|
|
2886
|
-
});
|
|
2887
|
-
|
|
2888
|
-
// src/commands/te-analysis/model/build-rank-list-analysis-qp.ts
|
|
2889
|
-
var buildRankListAnalysisQp = createMcpCommand({
|
|
2890
|
-
command: "+build_rank_list_analysis_qp",
|
|
2891
|
-
description: "Build a validated rank-list-analysis QP from structured rank list intent. Rank list analysis ranks entities (users, items, etc.) by a metric value. Call before query_adhoc. This command only builds qp and does not execute query_adhoc.",
|
|
2892
|
-
flags: [
|
|
2893
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
2894
|
-
{ name: "time_range", type: "json", required: true, desc: "Required time range JSON for rank list analysis." },
|
|
2895
|
-
{ name: "rank_list", type: "json", required: true, desc: "Rank list intent JSON. Required fields: rankDimension (field), rankEvent, rankAggregation. Optional: rankProperty, rankType (rank/dense_rank/row_rank), orderBy (DESC/ASC), filters, relation." },
|
|
2896
|
-
{ name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
|
|
2897
|
-
],
|
|
2898
|
-
risk: "read",
|
|
2899
|
-
buildArgs: (ctx) => ({
|
|
2900
|
-
projectId: ctx.num("project_id"),
|
|
2901
|
-
timeRange: ctx.json("time_range"),
|
|
2902
|
-
rankList: ctx.json("rank_list"),
|
|
2903
|
-
authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
|
|
2904
|
-
})
|
|
2905
|
-
});
|
|
2906
|
-
|
|
2907
|
-
// src/commands/te-analysis/model/build-distribution-analysis-qp.ts
|
|
2908
|
-
var buildDistributionAnalysisQp = createMcpCommand({
|
|
2909
|
-
command: "+build_distribution_analysis_qp",
|
|
2910
|
-
description: "Build a validated distribution-analysis QP from structured distribution metrics. Distribution analysis shows how a metric value is distributed across users or events. Call before query_adhoc. This command only builds qp and does not execute query_adhoc.",
|
|
2911
|
-
flags: [
|
|
2912
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
2913
|
-
{ name: "time_range", type: "json", required: true, desc: "Required time range JSON for distribution analysis." },
|
|
2914
|
-
{ name: "distribution_metrics", type: "json", required: true, desc: "Distribution metrics JSON array. Each item: event, aggregation (A200=count/A201=active-days/A202=active-hours/A103=sum etc.). Optional per item: property, percentile, intervalType, quotaIntervalArr, filters, relation." },
|
|
2915
|
-
{ name: "time_particle_size", type: "string", required: false, desc: "Time granularity. Allowed values: day, week, month, total. Defaults to day when omitted." },
|
|
2916
|
-
{ name: "groups", type: "json", required: false, desc: "Optional group-by dimensions JSON array." },
|
|
2917
|
-
{ name: "filters", type: "json", required: false, desc: "Optional global filters JSON array." },
|
|
2918
|
-
{ name: "relation", type: "string", required: false, desc: "Optional filter relation. Supported values: and, or. Default: and." },
|
|
2919
|
-
{ name: "authenticated_only", type: "boolean", required: false, desc: "When true, resolve only authenticated assets while building the QP." }
|
|
2920
|
-
],
|
|
2921
|
-
risk: "read",
|
|
2922
|
-
buildArgs: (ctx) => ({
|
|
2923
|
-
projectId: ctx.num("project_id"),
|
|
2924
|
-
timeRange: ctx.json("time_range"),
|
|
2925
|
-
distributionMetrics: ctx.json("distribution_metrics"),
|
|
2926
|
-
timeParticleSize: optionalString(ctx, "time_particle_size"),
|
|
2927
|
-
groups: optionalJson(ctx, "groups"),
|
|
2928
|
-
filters: optionalJson(ctx, "filters"),
|
|
2929
|
-
relation: optionalString(ctx, "relation"),
|
|
2930
|
-
authenticatedOnly: optionalBoolean(ctx, "authenticated_only")
|
|
2931
|
-
})
|
|
2932
|
-
});
|
|
2933
|
-
|
|
2934
|
-
// src/commands/te-analysis/model/index.ts
|
|
2935
|
-
var commands25 = [
|
|
2936
|
-
buildEventAnalysisQp,
|
|
2937
|
-
buildRetentionAnalysisQp,
|
|
2938
|
-
buildFunnelAnalysisQp,
|
|
2939
|
-
buildPropAnalysisQp,
|
|
2940
|
-
buildIntervalAnalysisQp,
|
|
2941
|
-
buildPathAnalysisQp,
|
|
2942
|
-
buildAttributionAnalysisQp,
|
|
2943
|
-
buildHeatMapAnalysisQp,
|
|
2944
|
-
buildRankListAnalysisQp,
|
|
2945
|
-
buildDistributionAnalysisQp,
|
|
2946
|
-
queryAdhoc,
|
|
2947
|
-
cancelQuery,
|
|
2948
|
-
drilldownUsers,
|
|
2949
|
-
drilldownUserEvents,
|
|
2950
|
-
createResultCluster,
|
|
2951
|
-
loadFilters,
|
|
2952
|
-
getTableColumns
|
|
2953
|
-
];
|
|
2954
|
-
var model_default = commands25;
|
|
2955
|
-
|
|
2956
|
-
// src/commands/te-analysis/entity/query-entity-details.ts
|
|
2957
|
-
var queryEntityDetails = createMcpCommand({
|
|
2958
|
-
command: "+query_entity_details",
|
|
2959
|
-
description: "Query entity detail data based on an entity ID and cluster definition. Supports display properties, sorting, and result limits. For long-running or cancelable queries, requestId is required and must be provided before starting. For any query that may exceed the CLI or MCP HTTP timeout, generate requestId first so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If requestId is omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID.",
|
|
2960
|
-
flags: [
|
|
2961
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
2962
|
-
{ name: "entity_id", type: "number", required: false, desc: "Optional entity ID used in multi-entity scenarios. If omitted, the default user entity is used." },
|
|
2963
|
-
{ name: "definition", type: "json", required: true, desc: "Cluster definition JSON. See +get_cluster_definition_schema for the structure." },
|
|
2964
|
-
{ name: "properties", type: "json", required: false, desc: "Optional display properties JSON" },
|
|
2965
|
-
{ name: "sort_by", type: "string", required: false, desc: "Optional sort field" },
|
|
2966
|
-
{ name: "sort_order", type: "string", required: false, desc: "Optional sort order. Supported values: asc and desc" },
|
|
2967
|
-
{ name: "limit", type: "number", required: false, desc: "Optional result limit. Default: 1000, maximum: 10000" },
|
|
2968
|
-
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset. For example, UTC+8 is 8" },
|
|
2969
|
-
{ name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
|
|
2970
|
-
{ name: "request_id", type: "string", required: true, desc: "Required unique request ID used for tracking and cancellation. Generate it before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID. The response metadata.requestId echoes the supplied requestId and can also be passed to cancel_query(requestId) when the query is no longer needed." },
|
|
2971
|
-
{ name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." }
|
|
2972
|
-
],
|
|
2973
|
-
risk: "read",
|
|
2974
|
-
validate: (ctx) => {
|
|
2975
|
-
assertLimitWithinCap(optionalNumber(ctx, "limit"), "limit");
|
|
2976
|
-
},
|
|
2977
|
-
buildArgs: (ctx) => ({
|
|
2978
|
-
projectId: ctx.num("project_id"),
|
|
2979
|
-
entityId: optionalNumber(ctx, "entity_id"),
|
|
2980
|
-
definition: requiredJsonString(ctx, "definition"),
|
|
2981
|
-
properties: optionalJsonString(ctx, "properties"),
|
|
2982
|
-
sortBy: optionalString(ctx, "sort_by"),
|
|
2983
|
-
sortOrder: optionalString(ctx, "sort_order"),
|
|
2984
|
-
limit: optionalNumber(ctx, "limit") ?? DEFAULT_QUERY_LIMIT,
|
|
2985
|
-
zoneOffset: optionalNumber(ctx, "zone_offset"),
|
|
2986
|
-
useCache: optionalBoolean(ctx, "use_cache"),
|
|
2987
|
-
requestId: ctx.str("request_id"),
|
|
2988
|
-
timeoutMinutes: optionalNumber(ctx, "timeout_minutes")
|
|
2989
|
-
})
|
|
2990
|
-
});
|
|
2991
|
-
|
|
2992
|
-
// src/commands/te-analysis/entity/query-event-details.ts
|
|
2993
|
-
var queryEventDetails = createMcpCommand({
|
|
2994
|
-
command: "+query_event_details",
|
|
2995
|
-
description: "Query event detail data. Supports time range, filters, display properties, sorting, and result limits. Time can be specified via --relative_date_range OR (--start_time AND --end_time). For long-running or cancelable queries, requestId is required and must be provided before starting. For any query that may exceed the CLI or MCP HTTP timeout, generate requestId first so you can call +cancel_query --request_id <same value> if you stop waiting or the request returns fetch failed. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Submitted queries return metadata.requestId; pass that value to cancel_query(requestId) when the query is no longer needed. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If requestId is omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID.",
|
|
2996
|
-
flags: [
|
|
2997
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
2998
|
-
{ name: "event_name", type: "string", required: true, desc: "Event name" },
|
|
2999
|
-
{ name: "start_time", type: "string", required: false, desc: "Start time. Format: yyyy-MM-dd HH:mm:ss. Required if not using relative_date_range." },
|
|
3000
|
-
{ name: "end_time", type: "string", required: false, desc: "End time. Format: yyyy-MM-dd HH:mm:ss. Required if not using relative_date_range." },
|
|
3001
|
-
{ name: "relative_date_range", type: "string", required: false, desc: "Optional relative date range in m-n format. For example, 0-7 means the most recent 7 days including today. Use either this field or start_time/end_time." },
|
|
3002
|
-
{ name: "filters", type: "json", required: false, desc: "Optional filter JSON. See +get_filter_schema for the structure." },
|
|
3003
|
-
{ name: "properties", type: "json", required: false, desc: "Optional display properties JSON" },
|
|
3004
|
-
{ name: "sort_by", type: "string", required: false, desc: "Optional sort field" },
|
|
3005
|
-
{ name: "sort_order", type: "string", required: false, desc: "Optional sort order. Supported values: asc and desc" },
|
|
3006
|
-
{ name: "limit", type: "number", required: false, desc: "Optional result limit. Default: 1000, maximum: 10000" },
|
|
3007
|
-
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset. For example, UTC+8 is 8" },
|
|
3008
|
-
{ name: "use_cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true" },
|
|
3009
|
-
{ name: "request_id", type: "string", required: true, desc: "Required unique request ID used for tracking and cancellation. Generate it before starting the query. It must use mcp_<32 lowercase hex UUID>, for example mcp_0123456789abcdef0123456789abcdef. Provide this before starting the query so it can be cancelled later with +cancel_query --request_id <same value>, even if the caller stops waiting before the tool returns. If fetch failed, HTTP timeout, or caller timeout happens, the backend query may still be running. requestId is not auto-generated for MCP query tools because the caller must know it before the response for proactive cleanup. If omitted or blank, the backend returns REQUEST_ID_REQUIRED; invalid format returns INVALID_REQUEST_ID. The response metadata.requestId echoes the supplied requestId and can also be passed to cancel_query(requestId) when the query is no longer needed." },
|
|
3010
|
-
{ name: "timeout_minutes", type: "number", required: false, desc: "Query timeout in minutes. If omitted, 30 minutes is used." }
|
|
3011
|
-
],
|
|
3012
|
-
risk: "read",
|
|
3013
|
-
buildArgs: (ctx) => ({
|
|
3014
|
-
projectId: ctx.num("project_id"),
|
|
3015
|
-
eventName: ctx.str("event_name"),
|
|
3016
|
-
startTime: optionalString(ctx, "start_time"),
|
|
3017
|
-
endTime: optionalString(ctx, "end_time"),
|
|
3018
|
-
relativeDateRange: optionalString(ctx, "relative_date_range"),
|
|
3019
|
-
filters: optionalJsonString(ctx, "filters"),
|
|
3020
|
-
properties: optionalJsonString(ctx, "properties"),
|
|
3021
|
-
sortBy: optionalString(ctx, "sort_by"),
|
|
3022
|
-
sortOrder: optionalString(ctx, "sort_order"),
|
|
3023
|
-
limit: optionalNumber(ctx, "limit"),
|
|
3024
|
-
zoneOffset: optionalNumber(ctx, "zone_offset"),
|
|
3025
|
-
useCache: optionalBoolean(ctx, "use_cache"),
|
|
3026
|
-
requestId: ctx.str("request_id"),
|
|
3027
|
-
timeoutMinutes: optionalNumber(ctx, "timeout_minutes")
|
|
3028
|
-
})
|
|
3029
|
-
});
|
|
3030
|
-
|
|
3031
|
-
// src/commands/te-analysis/entity/build-entity-details-sql.ts
|
|
3032
|
-
var buildEntityDetailsSql = createMcpCommand({
|
|
3033
|
-
command: "+build_entity_details_sql",
|
|
3034
|
-
description: "Build the SQL for an entity details query. The parameters are the same as query_entity_details, but this tool returns SQL instead of query results.",
|
|
3035
|
-
flags: [
|
|
3036
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
3037
|
-
{ name: "entity_id", type: "number", required: false, desc: "Optional entity ID used in multi-entity scenarios. If omitted, the default user entity is used." },
|
|
3038
|
-
{ name: "definition", type: "json", required: true, desc: "Cluster definition JSON. See +get_cluster_definition_schema for the structure." },
|
|
3039
|
-
{ name: "properties", type: "json", required: false, desc: "Optional display properties JSON" },
|
|
3040
|
-
{ name: "sort_by", type: "string", required: false, desc: "Optional sort field" },
|
|
3041
|
-
{ name: "sort_order", type: "string", required: false, desc: "Optional sort order. Supported values: asc and desc" },
|
|
3042
|
-
{ name: "limit", type: "number", required: false, desc: "Optional result limit. Default: 1000, maximum: 10000" },
|
|
3043
|
-
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset. For example, UTC+8 is 8" }
|
|
3044
|
-
],
|
|
3045
|
-
risk: "read",
|
|
3046
|
-
buildArgs: (ctx) => ({
|
|
3047
|
-
projectId: ctx.num("project_id"),
|
|
3048
|
-
entityId: optionalNumber(ctx, "entity_id"),
|
|
3049
|
-
definition: requiredJsonString(ctx, "definition"),
|
|
3050
|
-
properties: optionalJsonString(ctx, "properties"),
|
|
3051
|
-
sortBy: optionalString(ctx, "sort_by"),
|
|
3052
|
-
sortOrder: optionalString(ctx, "sort_order"),
|
|
3053
|
-
limit: optionalNumber(ctx, "limit"),
|
|
3054
|
-
zoneOffset: optionalNumber(ctx, "zone_offset")
|
|
3055
|
-
})
|
|
3056
|
-
});
|
|
3057
|
-
|
|
3058
|
-
// src/commands/te-analysis/entity/build-event-details-sql.ts
|
|
3059
|
-
var buildEventDetailsSql = createMcpCommand({
|
|
3060
|
-
command: "+build_event_details_sql",
|
|
3061
|
-
description: "Build the SQL for an event details query. The parameters are the same as query_event_details, but this tool returns SQL instead of query results.",
|
|
3062
|
-
flags: [
|
|
3063
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
3064
|
-
{ name: "event_name", type: "string", required: true, desc: "Event name" },
|
|
3065
|
-
{ name: "start_time", type: "string", required: false, desc: "Start time. Format: yyyy-MM-dd HH:mm:ss" },
|
|
3066
|
-
{ name: "end_time", type: "string", required: false, desc: "End time. Format: yyyy-MM-dd HH:mm:ss" },
|
|
3067
|
-
{ name: "relative_date_range", type: "string", required: false, desc: "Optional relative date range in m-n format. For example, 0-7 means the most recent 7 days including today. Use either this field or start_time/end_time." },
|
|
3068
|
-
{ name: "filters", type: "json", required: false, desc: "Optional filter JSON. See +get_filter_schema for the structure." },
|
|
3069
|
-
{ name: "properties", type: "json", required: false, desc: "Optional display properties JSON" },
|
|
3070
|
-
{ name: "sort_by", type: "string", required: false, desc: "Optional sort field" },
|
|
3071
|
-
{ name: "sort_order", type: "string", required: false, desc: "Optional sort order. Supported values: asc and desc" },
|
|
3072
|
-
{ name: "limit", type: "number", required: false, desc: "Optional result limit. Default: 100, maximum: 10000" },
|
|
3073
|
-
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset. For example, UTC+8 is 8" }
|
|
3074
|
-
],
|
|
3075
|
-
risk: "read",
|
|
3076
|
-
buildArgs: (ctx) => ({
|
|
3077
|
-
projectId: ctx.num("project_id"),
|
|
3078
|
-
eventName: ctx.str("event_name"),
|
|
3079
|
-
startTime: optionalString(ctx, "start_time"),
|
|
3080
|
-
endTime: optionalString(ctx, "end_time"),
|
|
3081
|
-
relativeDateRange: optionalString(ctx, "relative_date_range"),
|
|
3082
|
-
filters: optionalJsonString(ctx, "filters"),
|
|
3083
|
-
properties: optionalJsonString(ctx, "properties"),
|
|
3084
|
-
sortBy: optionalString(ctx, "sort_by"),
|
|
3085
|
-
sortOrder: optionalString(ctx, "sort_order"),
|
|
3086
|
-
limit: optionalNumber(ctx, "limit"),
|
|
3087
|
-
zoneOffset: optionalNumber(ctx, "zone_offset")
|
|
3088
|
-
})
|
|
3089
|
-
});
|
|
3090
|
-
|
|
3091
|
-
// src/commands/te-analysis/entity/index.ts
|
|
3092
|
-
var commands26 = [
|
|
3093
|
-
queryEntityDetails,
|
|
3094
|
-
queryEventDetails,
|
|
3095
|
-
buildEntityDetailsSql,
|
|
3096
|
-
buildEventDetailsSql
|
|
3097
|
-
];
|
|
3098
|
-
var entity_default = commands26;
|
|
3099
|
-
|
|
3100
|
-
// src/commands/te-analysis/schema/get-analysis-query-schema.ts
|
|
3101
|
-
var getAnalysisQuerySchema = createMcpCommand({
|
|
3102
|
-
command: "+get_analysis_query_schema",
|
|
3103
|
-
description: "Get the analysis query schema for the SQL manual path. Do not use this tool for natural-language non-SQL ad-hoc analysis; all ten non-SQL models have matching +build_*_analysis_qp commands. Returns field definitions and usage examples for low-level/manual SQL QP construction.",
|
|
3104
|
-
flags: [
|
|
3105
|
-
{ name: "model_type", type: "string", required: true, desc: "Model type. Supported values: event, retention, funnel, distribution, sql, interval, path, attribution, prop_analysis, rank_list, heat_map" },
|
|
3106
|
-
{ name: "segments", type: "string", required: false, desc: "Schema segments to include (comma-separated). Options: core, filter_group, calctype, aggregatetype, examples, full. Empty/null \u2192 core only (recommended)." },
|
|
3107
|
-
{ name: "include_core", type: "boolean", required: false, desc: "Whether to automatically include core segment. Default: true. Set false for follow-up requests to prevent duplicate core returns." }
|
|
3108
|
-
],
|
|
3109
|
-
risk: "read",
|
|
3110
|
-
buildArgs: (ctx) => ({
|
|
3111
|
-
modelType: ctx.str("model_type"),
|
|
3112
|
-
segments: optionalString(ctx, "segments"),
|
|
3113
|
-
includeCore: optionalBoolean(ctx, "include_core")
|
|
3114
|
-
})
|
|
3115
|
-
});
|
|
3116
|
-
|
|
3117
|
-
// src/commands/te-analysis/schema/get-filter-schema.ts
|
|
3118
|
-
var getFilterSchema = createMcpCommand({
|
|
3119
|
-
command: "+get_filter_schema",
|
|
3120
|
-
description: "Get the filter schema. Returns field definitions, operator enums, data type descriptions, and examples.",
|
|
3121
|
-
flags: [],
|
|
3122
|
-
risk: "read",
|
|
3123
|
-
buildArgs: (ctx) => ({})
|
|
3124
|
-
});
|
|
3125
|
-
|
|
3126
|
-
// src/commands/te-analysis/schema/get-groupby-schema.ts
|
|
3127
|
-
var getGroupbySchema = createMcpCommand({
|
|
3128
|
-
command: "+get_groupby_schema",
|
|
3129
|
-
description: "Get the group-by schema. Returns field definitions and examples for group-by configuration.",
|
|
3130
|
-
flags: [],
|
|
3131
|
-
risk: "read",
|
|
3132
|
-
buildArgs: (ctx) => ({})
|
|
3133
|
-
});
|
|
3134
|
-
|
|
3135
|
-
// src/commands/te-analysis/schema/index.ts
|
|
3136
|
-
var commands27 = [
|
|
3137
|
-
getAnalysisQuerySchema,
|
|
3138
|
-
getFilterSchema,
|
|
3139
|
-
getGroupbySchema
|
|
3140
|
-
];
|
|
3141
|
-
var schema_default = commands27;
|
|
3142
|
-
|
|
3143
|
-
// src/commands/te-analysis/global/list-query-clusters.ts
|
|
3144
|
-
var listQueryClusters = createMcpCommand({
|
|
3145
|
-
command: "+list_query_clusters",
|
|
3146
|
-
description: "List query cluster options accessible to the current account in the project. Use this to decide whether to query the current self cluster, global aggregated data, or one specific slave cluster.",
|
|
3147
|
-
flags: [
|
|
3148
|
-
{ name: "project_id", type: "number", required: true, desc: "Project ID used to resolve cluster query permissions", alias: "p" }
|
|
3149
|
-
],
|
|
3150
|
-
risk: "read",
|
|
3151
|
-
buildArgs: (ctx) => ({
|
|
3152
|
-
projectId: ctx.num("project_id")
|
|
3153
|
-
})
|
|
3154
|
-
});
|
|
3155
|
-
|
|
3156
|
-
// src/commands/te-analysis/global/index.ts
|
|
3157
|
-
var commands28 = [
|
|
3158
|
-
listQueryClusters
|
|
3159
|
-
];
|
|
3160
|
-
var global_default = commands28;
|
|
3161
|
-
|
|
3162
|
-
// src/commands/te-analysis/index.ts
|
|
3163
|
-
registerCapabilityGatewayRoute("analysis", { gatewayDomain: "analysis" });
|
|
3164
|
-
var commands29 = [
|
|
3165
|
-
...meta_default,
|
|
3166
|
-
...report_default,
|
|
3167
|
-
...dashboard_default,
|
|
3168
|
-
...dashboard_report_data_default,
|
|
3169
|
-
...query_default,
|
|
3170
|
-
...run_default,
|
|
3171
|
-
...artifact_default,
|
|
3172
|
-
...dashboard_definition_default,
|
|
3173
|
-
...dashboard_daily_report_default,
|
|
3174
|
-
...bi_panel_default,
|
|
3175
|
-
...bi_panel_version_default,
|
|
3176
|
-
...bi_panel_page_data_default,
|
|
3177
|
-
...project_space_default,
|
|
3178
|
-
...favorite_default,
|
|
3179
|
-
...public_link_default,
|
|
3180
|
-
...model_default,
|
|
3181
|
-
...entity_default,
|
|
3182
|
-
...schema_default,
|
|
3183
|
-
...isGlobalQueryModeEnabled() ? global_default : []
|
|
3184
|
-
];
|
|
3185
|
-
var te_analysis_default = commands29;
|
|
3186
|
-
export {
|
|
3187
|
-
te_analysis_default as default
|
|
3188
|
-
};
|