@thinkingai/ae-cli 6.0.30 → 6.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -7
- package/README.zh.md +5 -7
- package/dist/{auth-7TQRGLBC.js → auth-7H3HAAJ3.js} +10 -10
- package/dist/{capability-KVA55RMK.js → capability-SEH3JWLN.js} +49 -10
- package/dist/{capability-LKHLZQPD.js → capability-SQ2IWKP3.js} +49 -10
- package/dist/{chunk-GWZ5MYWE.js → chunk-6LEYLOV3.js} +25 -4
- package/dist/{chunk-THBBNYXI.js → chunk-DYOS6YY7.js} +100 -62
- package/dist/{chunk-CWZUGF2J.js → chunk-HL2AJQ4Q.js} +15 -0
- package/dist/{chunk-OJR23CIK.js → chunk-I4A62X3N.js} +100 -61
- package/dist/chunk-N2QORU5D.js +68 -0
- package/dist/{chunk-7QQ4233A.js → chunk-PKRD2IEM.js} +25 -4
- package/dist/chunk-TKQJQXWT.js +68 -0
- package/dist/{chunk-ZAOL36CG.js → chunk-TNW2CI4W.js} +46 -30
- package/dist/{config-ZVPARN4R.js → config-7UZWDE74.js} +25 -25
- package/dist/index.js +143 -46
- package/dist/{metadata-6CCFV4K5.js → metadata-W6JFFMBA.js} +6 -43
- package/dist/{metadata-PDOIWH5O.js → metadata-X62TKIVK.js} +6 -43
- package/dist/{raw-OHSUK42D.js → raw-CN542NGT.js} +8 -6
- package/dist/{sync-ULT5SECP.js → sync-ERNHDPB5.js} +1 -1
- package/dist/{te-agent-FAIBM3SA.js → te-agent-FCCWUDTJ.js} +1 -1
- package/dist/te-analysis-NJGNWZFC.js +4530 -0
- package/dist/te-analysis-YGV5V5EX.js +4530 -0
- package/dist/{te-common-SDB3O2QG.js → te-common-5NJLF3XG.js} +1 -1
- package/dist/{te-common-CFGQXTFV.js → te-common-7VTJZPII.js} +1 -1
- package/dist/{te-community-6A7LKYUH.js → te-community-PEZ2VEF7.js} +1 -1
- package/dist/{te-community-GMWFGILT.js → te-community-TSKJ652U.js} +1 -1
- package/dist/{te-dataops-Z53CTG2U.js → te-dataops-F36T656A.js} +32 -12
- package/dist/{te-dataops-6LIPYNGH.js → te-dataops-ZNJBQ6VT.js} +33 -12
- package/dist/{te-engage-M7JQSJDP.js → te-engage-BUWVSSSK.js} +398 -11
- package/dist/{te-engage-545HJL6J.js → te-engage-EPE3QKDE.js} +398 -11
- package/dist/{te-meta-FADFLTDM.js → te-meta-MAAUHFQO.js} +9 -9
- package/dist/{te-meta-PKT27OTN.js → te-meta-VKWNAWO4.js} +9 -9
- package/dist/{te-team-RG75PR5D.js → te-team-OKCOX7OE.js} +5 -5
- package/package.json +15 -7
- package/skills/ae-agent/SKILL.md +6 -8
- package/skills/ae-agent/references/accept-skill-share.md +2 -2
- package/skills/ae-agent/references/add-attachment.md +3 -3
- package/skills/ae-agent/references/add-mcp.md +2 -3
- package/skills/ae-agent/references/add-model.md +3 -5
- package/skills/ae-agent/references/add-skill.md +2 -3
- package/skills/ae-agent/references/approve-skill.md +2 -2
- package/skills/ae-agent/references/auto-provision-mcp-credentials.md +3 -3
- package/skills/ae-agent/references/cancel-skill-submission.md +2 -2
- package/skills/ae-agent/references/copy-skill.md +3 -3
- package/skills/ae-agent/references/create-agent.md +3 -4
- package/skills/ae-agent/references/create-automation.md +5 -9
- package/skills/ae-agent/references/del-agent.md +3 -2
- package/skills/ae-agent/references/del-attachment.md +3 -2
- package/skills/ae-agent/references/del-mcp.md +3 -2
- package/skills/ae-agent/references/del-model.md +3 -2
- package/skills/ae-agent/references/del-skill-asset.md +3 -3
- package/skills/ae-agent/references/del-skill-reference.md +3 -3
- package/skills/ae-agent/references/del-skill-script.md +3 -3
- package/skills/ae-agent/references/del-skill.md +3 -2
- package/skills/ae-agent/references/edit-skill.md +4 -4
- package/skills/ae-agent/references/mcp-auth-disconnect.md +2 -2
- package/skills/ae-agent/references/mcp-auth-start.md +3 -3
- package/skills/ae-agent/references/reject-skill-share.md +2 -2
- package/skills/ae-agent/references/reject-skill.md +2 -2
- package/skills/ae-agent/references/rescan-skills.md +2 -2
- package/skills/ae-agent/references/set-mcp-credential.md +3 -3
- package/skills/ae-agent/references/set-mcp-meta.md +2 -2
- package/skills/ae-agent/references/set-skill-meta.md +2 -2
- package/skills/ae-agent/references/share-skill.md +3 -3
- package/skills/ae-agent/references/submit-skill.md +3 -3
- package/skills/ae-agent/references/toggle-mcp.md +3 -3
- package/skills/ae-agent/references/toggle-model.md +3 -3
- package/skills/ae-agent/references/toggle-skill.md +3 -3
- package/skills/ae-agent/references/update-agent.md +2 -2
- package/skills/ae-agent/references/update-automation.md +6 -8
- package/skills/ae-agent/references/update-mcp.md +4 -4
- package/skills/ae-agent/references/update-model.md +2 -3
- package/skills/ae-agent/references/upload-skill-asset.md +3 -3
- package/skills/ae-agent/references/upload-skill-reference.md +3 -3
- package/skills/ae-agent/references/upload-skill-script.md +3 -3
- package/skills/ae-agent/references/upload-skill.md +6 -7
- package/skills/ae-analysis/SKILL.md +105 -512
- package/skills/ae-analysis/references/adhoc_export.md +71 -0
- package/skills/ae-analysis/references/adhoc_run.md +58 -0
- package/skills/ae-analysis/references/ai_models.md +459 -0
- package/skills/ae-analysis/references/analysis_data_retrieval.md +101 -0
- package/skills/ae-analysis/references/analysis_gateway_assets.md +72 -12
- package/skills/ae-analysis/references/analysis_interpretation.md +38 -0
- package/skills/ae-analysis/references/artifact_download.md +13 -7
- package/skills/ae-analysis/references/asset_abnormal_get.md +5 -5
- package/skills/ae-analysis/references/asset_abnormal_list.md +5 -5
- package/skills/ae-analysis/references/asset_authentication_list.md +5 -5
- package/skills/ae-analysis/references/asset_authentication_update.md +6 -6
- package/skills/ae-analysis/references/asset_batch_dashboard_schedule_freeze.md +26 -0
- package/skills/ae-analysis/references/asset_batch_delete.md +26 -0
- package/skills/ae-analysis/references/asset_batch_disable_auto_backup.md +26 -0
- package/skills/ae-analysis/references/asset_batch_disable_auto_update.md +26 -0
- package/skills/ae-analysis/references/asset_batch_handover.md +26 -0
- package/skills/ae-analysis/references/asset_batch_info_export.md +25 -0
- package/skills/ae-analysis/references/asset_batch_sql_export.md +25 -0
- package/skills/ae-analysis/references/asset_dependency_list.md +30 -0
- package/skills/ae-analysis/references/asset_export.md +30 -0
- package/skills/ae-analysis/references/asset_impact_list.md +30 -0
- package/skills/ae-analysis/references/asset_lineage_get.md +25 -0
- package/skills/ae-analysis/references/asset_list.md +30 -0
- package/skills/ae-analysis/references/asset_query_history_list.md +30 -0
- package/skills/ae-analysis/references/asset_recent_list.md +4 -4
- package/skills/ae-analysis/references/asset_search.md +4 -4
- package/skills/ae-analysis/references/asset_url_get.md +28 -0
- package/skills/ae-analysis/references/audience_models.md +42 -0
- package/skills/ae-analysis/references/batch_create_metadata.md +5 -1
- package/skills/ae-analysis/references/batch_edit_metadata.md +4 -1
- package/skills/ae-analysis/references/bi_panel_copy.md +1 -1
- package/skills/ae-analysis/references/bi_panel_create.md +1 -1
- package/skills/ae-analysis/references/bi_panel_delete.md +2 -0
- package/skills/ae-analysis/references/bi_panel_list.md +4 -2
- package/skills/ae-analysis/references/bi_panel_page_data_export.md +8 -4
- package/skills/ae-analysis/references/bi_panel_page_data_run.md +7 -3
- package/skills/ae-analysis/references/bi_panel_share.md +1 -1
- package/skills/ae-analysis/references/bi_panel_update.md +1 -1
- package/skills/ae-analysis/references/bi_panel_version_publish.md +1 -1
- package/skills/ae-analysis/references/cancel_query.md +4 -4
- package/skills/ae-analysis/references/command_index.md +209 -0
- package/skills/ae-analysis/references/create_alert.md +1 -1
- package/skills/ae-analysis/references/create_entity.md +1 -1
- package/skills/ae-analysis/references/create_metric.md +11 -15
- package/skills/ae-analysis/references/create_project_mark_time.md +2 -1
- package/skills/ae-analysis/references/create_virtual_event.md +10 -14
- package/skills/ae-analysis/references/create_virtual_property.md +1 -1
- package/skills/ae-analysis/references/dashboard_copy.md +1 -1
- package/skills/ae-analysis/references/dashboard_create.md +1 -1
- package/skills/ae-analysis/references/dashboard_daily_report_send.md +1 -1
- package/skills/ae-analysis/references/dashboard_daily_report_update.md +1 -1
- package/skills/ae-analysis/references/dashboard_definition_import.md +1 -1
- package/skills/ae-analysis/references/dashboard_delete.md +2 -0
- package/skills/ae-analysis/references/dashboard_freeze.md +1 -1
- package/skills/ae-analysis/references/dashboard_handover.md +1 -1
- package/skills/ae-analysis/references/dashboard_list.md +4 -2
- package/skills/ae-analysis/references/dashboard_report_add.md +15 -0
- package/skills/ae-analysis/references/dashboard_report_data_export.md +15 -7
- package/skills/ae-analysis/references/dashboard_report_data_run.md +15 -7
- package/skills/ae-analysis/references/dashboard_share.md +11 -2
- package/skills/ae-analysis/references/dashboard_update.md +12 -3
- package/skills/ae-analysis/references/datatable_columns_get.md +2 -2
- package/skills/ae-analysis/references/datatable_influence_list.md +2 -2
- package/skills/ae-analysis/references/datatable_version_get.md +2 -2
- package/skills/ae-analysis/references/datatable_version_list.md +2 -2
- package/skills/ae-analysis/references/delete_alert.md +8 -3
- package/skills/ae-analysis/references/delete_metric.md +8 -3
- package/skills/ae-analysis/references/delete_project_mark_times.md +5 -3
- package/skills/ae-analysis/references/delete_track_items.md +4 -3
- package/skills/ae-analysis/references/drilldown_user_events_export.md +20 -0
- package/skills/ae-analysis/references/drilldown_user_events_run.md +34 -0
- package/skills/ae-analysis/references/drilldown_users_export.md +17 -0
- package/skills/ae-analysis/references/drilldown_users_run.md +61 -0
- package/skills/ae-analysis/references/entity_detail_export.md +31 -0
- package/skills/ae-analysis/references/entity_detail_run.md +50 -0
- package/skills/ae-analysis/references/entity_id_import_options.md +20 -0
- package/skills/ae-analysis/references/event_changelog_list.md +2 -2
- package/skills/ae-analysis/references/event_create.md +4 -4
- package/skills/ae-analysis/references/event_delete.md +5 -4
- package/skills/ae-analysis/references/event_detail_export.md +31 -0
- package/skills/ae-analysis/references/event_detail_run.md +58 -0
- package/skills/ae-analysis/references/event_get.md +2 -2
- package/skills/ae-analysis/references/event_hide_update.md +3 -3
- package/skills/ae-analysis/references/event_influence_list.md +2 -2
- package/skills/ae-analysis/references/event_list.md +2 -2
- package/skills/ae-analysis/references/{super_metadata_export.md → event_property_bundle_export.md} +7 -7
- package/skills/ae-analysis/references/event_property_bundle_import.md +25 -0
- package/skills/ae-analysis/references/event_relation_update.md +4 -4
- package/skills/ae-analysis/references/event_update.md +2 -2
- package/skills/ae-analysis/references/exchange_config_update.md +2 -2
- package/skills/ae-analysis/references/exchange_rate_refresh.md +2 -2
- package/skills/ae-analysis/references/exchange_rule_list.md +2 -2
- package/skills/ae-analysis/references/exchange_rule_update.md +4 -4
- package/skills/ae-analysis/references/exchange_rule_validate.md +4 -4
- package/skills/ae-analysis/references/favorite_add.md +1 -1
- package/skills/ae-analysis/references/favorite_remove.md +1 -1
- package/skills/ae-analysis/references/folder_create.md +2 -3
- package/skills/ae-analysis/references/folder_share.md +2 -3
- package/skills/ae-analysis/references/generate_track_program.md +2 -1
- package/skills/ae-analysis/references/generate_track_sdk_sample.md +2 -1
- package/skills/ae-analysis/references/get_alert.md +4 -0
- package/skills/ae-analysis/references/get_alert_definition_schema.md +1 -0
- package/skills/ae-analysis/references/get_metric.md +4 -4
- package/skills/ae-analysis/references/get_project_config.md +1 -0
- package/skills/ae-analysis/references/get_resource_url.md +1 -0
- package/skills/ae-analysis/references/get_track_program.md +3 -0
- package/skills/ae-analysis/references/history_tag_batch_refresh.md +19 -0
- package/skills/ae-analysis/references/history_tag_clear.md +13 -0
- package/skills/ae-analysis/references/history_tag_data_drilldown_export.md +15 -0
- package/skills/ae-analysis/references/history_tag_data_drilldown_run.md +13 -0
- package/skills/ae-analysis/references/history_tag_data_export.md +15 -0
- package/skills/ae-analysis/references/history_tag_data_run.md +15 -0
- package/skills/ae-analysis/references/history_tag_list.md +11 -0
- package/skills/ae-analysis/references/history_tag_refresh.md +11 -0
- package/skills/ae-analysis/references/input_file_inspect.md +9 -0
- package/skills/ae-analysis/references/input_file_purpose_list.md +9 -0
- package/skills/ae-analysis/references/input_file_upload.md +11 -0
- package/skills/ae-analysis/references/list_alerts.md +3 -2
- package/skills/ae-analysis/references/list_entities.md +3 -2
- package/skills/ae-analysis/references/list_events.md +5 -5
- package/skills/ae-analysis/references/list_metrics.md +5 -5
- package/skills/ae-analysis/references/list_project_mark_times.md +2 -1
- package/skills/ae-analysis/references/list_project_users.md +1 -0
- package/skills/ae-analysis/references/list_properties.md +5 -5
- package/skills/ae-analysis/references/load_filters.md +3 -0
- package/skills/ae-analysis/references/metric_create.md +11 -6
- package/skills/ae-analysis/references/metric_delete.md +5 -4
- package/skills/ae-analysis/references/metric_get.md +2 -2
- package/skills/ae-analysis/references/metric_list.md +2 -2
- package/skills/ae-analysis/references/metric_update.md +12 -6
- package/skills/ae-analysis/references/operation_record_export.md +25 -0
- package/skills/ae-analysis/references/operation_record_list.md +31 -0
- package/skills/ae-analysis/references/project_space_create.md +2 -3
- package/skills/ae-analysis/references/project_space_list.md +3 -1
- package/skills/ae-analysis/references/project_space_share.md +2 -3
- package/skills/ae-analysis/references/property_changelog_list.md +2 -2
- package/skills/ae-analysis/references/property_create.md +4 -4
- package/skills/ae-analysis/references/property_delete.md +5 -4
- package/skills/ae-analysis/references/property_get.md +2 -2
- package/skills/ae-analysis/references/property_hide_update.md +3 -3
- package/skills/ae-analysis/references/property_influence_list.md +2 -2
- package/skills/ae-analysis/references/property_list.md +2 -2
- package/skills/ae-analysis/references/property_related_events.md +2 -2
- package/skills/ae-analysis/references/property_relation_update.md +4 -4
- package/skills/ae-analysis/references/property_update.md +2 -2
- package/skills/ae-analysis/references/public_link_create.md +1 -1
- package/skills/ae-analysis/references/public_link_delete.md +2 -0
- package/skills/ae-analysis/references/public_link_list.md +3 -1
- package/skills/ae-analysis/references/public_link_offline.md +1 -1
- package/skills/ae-analysis/references/public_link_update.md +1 -1
- package/skills/ae-analysis/references/query_cancel.md +1 -1
- package/skills/ae-analysis/references/query_create_result_cluster.md +47 -0
- package/skills/ae-analysis/references/report_abnormal_get.md +15 -0
- package/skills/ae-analysis/references/report_change_log_get.md +15 -0
- package/skills/ae-analysis/references/report_change_log_list.md +15 -0
- package/skills/ae-analysis/references/report_create.md +29 -0
- package/skills/ae-analysis/references/report_data_export.md +37 -0
- package/skills/ae-analysis/references/report_data_run.md +45 -0
- package/skills/ae-analysis/references/report_delete.md +17 -0
- package/skills/ae-analysis/references/report_get.md +21 -0
- package/skills/ae-analysis/references/report_list.md +17 -0
- package/skills/ae-analysis/references/report_list_export.md +15 -0
- package/skills/ae-analysis/references/report_update.md +22 -0
- package/skills/ae-analysis/references/report_version_rollback.md +15 -0
- package/skills/ae-analysis/references/rule_create.md +27 -0
- package/skills/ae-analysis/references/rule_delete.md +26 -0
- package/skills/ae-analysis/references/rule_list.md +24 -0
- package/skills/ae-analysis/references/rule_schema.md +24 -0
- package/skills/ae-analysis/references/rule_update.md +28 -0
- package/skills/ae-analysis/references/run_inspect.md +10 -4
- package/skills/ae-analysis/references/save_track_items.md +4 -1
- package/skills/ae-analysis/references/sql_table_columns.md +20 -0
- package/skills/ae-analysis/references/sql_table_list.md +33 -0
- package/skills/ae-analysis/references/update_alert.md +1 -1
- package/skills/ae-analysis/references/update_metric.md +11 -14
- package/skills/ae-analysis/references/update_project_mark_time.md +4 -3
- package/skills/ae-analysis/references/user_cluster_create.md +15 -0
- package/skills/ae-analysis/references/user_cluster_create_id.md +15 -0
- package/skills/ae-analysis/references/user_cluster_delete.md +13 -0
- package/skills/ae-analysis/references/user_cluster_get.md +11 -0
- package/skills/ae-analysis/references/user_cluster_list.md +15 -0
- package/skills/ae-analysis/references/user_cluster_member_export.md +15 -0
- package/skills/ae-analysis/references/user_cluster_member_list.md +19 -0
- package/skills/ae-analysis/references/user_cluster_models.md +87 -0
- package/skills/ae-analysis/references/user_cluster_refresh.md +11 -0
- package/skills/ae-analysis/references/user_cluster_update.md +13 -0
- package/skills/ae-analysis/references/user_cluster_update_id.md +15 -0
- package/skills/ae-analysis/references/user_tag_create.md +15 -0
- package/skills/ae-analysis/references/user_tag_create_id.md +15 -0
- package/skills/ae-analysis/references/user_tag_delete.md +13 -0
- package/skills/ae-analysis/references/user_tag_get.md +11 -0
- package/skills/ae-analysis/references/user_tag_list.md +17 -0
- package/skills/ae-analysis/references/user_tag_member_export.md +15 -0
- package/skills/ae-analysis/references/user_tag_member_list.md +19 -0
- package/skills/ae-analysis/references/user_tag_models.md +54 -0
- package/skills/ae-analysis/references/user_tag_refresh.md +11 -0
- package/skills/ae-analysis/references/user_tag_update.md +13 -0
- package/skills/ae-analysis/references/user_tag_update_id.md +15 -0
- package/skills/ae-analysis/references/virtual_event_create.md +4 -4
- package/skills/ae-analysis/references/virtual_event_delete.md +5 -4
- package/skills/ae-analysis/references/virtual_event_get.md +2 -2
- package/skills/ae-analysis/references/virtual_property_create.md +13 -6
- package/skills/ae-analysis/references/virtual_property_sql_rule_delete.md +5 -4
- package/skills/ae-analysis/references/virtual_property_sql_rule_update.md +13 -6
- package/skills/ae-analysis-global/SKILL.md +6 -8
- package/skills/ae-analysis-global/references/list_query_clusters.md +7 -6
- package/skills/ae-capability/SKILL.md +68 -15
- package/skills/ae-community/SKILL.md +2 -2
- package/skills/ae-dataops/SKILL.md +1 -1
- package/skills/ae-engage/SKILL.md +38 -10
- package/skills/ae-engage/references/build-task-save-guide.md +11 -9
- package/skills/ae-engage/references/channel_touch_limits_list.md +29 -0
- package/skills/ae-engage/references/group-list.md +13 -0
- package/skills/ae-engage/references/operation-log-query.md +11 -0
- package/skills/ae-engage/references/ops-delete.md +14 -0
- package/skills/ae-engage/references/push-record-query.md +26 -0
- package/skills/ae-engage/references/save-flow.md +5 -4
- package/skills/ae-engage/references/save-task.md +24 -20
- package/skills/ae-engage/references/segment-list-query.md +18 -0
- package/skills/ae-engage/references/task-operation-log-query.md +23 -0
- package/skills/ae-engage/references/version-list.md +18 -0
- package/skills/ae-generate-tracking-code/SKILL.md +1 -1
- package/skills/ae-generate-tracking-code/references/snippet-delivery.md +2 -2
- package/skills/ae-generate-tracking-plan/SKILL.md +17 -12
- package/skills/ae-generate-tracking-plan/references/te-api.md +2 -1
- package/skills/ae-kb/SKILL.md +1 -1
- package/skills/ae-metadata/SKILL.md +9 -8
- package/skills/ae-metadata/references/metadata_data_table_csv_delete.md +1 -0
- package/skills/ae-metadata/references/metadata_data_table_csv_write.md +6 -6
- package/skills/ae-metadata/references/metadata_data_table_property_bindings_update.md +2 -2
- package/skills/ae-metadata/references/metadata_data_table_sql_delete.md +1 -0
- package/skills/ae-metadata/references/metadata_data_table_sql_write.md +21 -7
- package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +3 -3
- package/skills/ae-metadata/references/metadata_property_dimension_table_create_and_bind_csv.md +4 -4
- package/skills/ae-team/SKILL.md +9 -9
- package/skills/ae-team/references/create.md +2 -2
- package/skills/ae-team/references/delete.md +3 -3
- package/skills/ae-team/references/run-cancel.md +3 -3
- package/skills/ae-team/references/run-chat.md +4 -4
- package/skills/ae-team/references/run-reply.md +3 -3
- package/skills/ae-team/references/run-start.md +4 -5
- package/skills/ae-team/references/run-watch.md +1 -1
- package/skills/ae-team/references/update.md +2 -2
- package/dist/chunk-P2JRP6HJ.js +0 -42
- package/dist/chunk-S5XN6KEX.js +0 -42
- package/dist/te-analysis-DDXGM7WM.js +0 -3188
- package/dist/te-analysis-HCDNYI7E.js +0 -3188
- package/dist/te-audience-ECFS4GF4.js +0 -600
- package/dist/te-audience-WO377T2J.js +0 -600
- package/skills/ae-analysis/references/build_attribution_analysis_qp.md +0 -62
- package/skills/ae-analysis/references/build_cluster_definition.md +0 -62
- package/skills/ae-analysis/references/build_distribution_analysis_qp.md +0 -67
- package/skills/ae-analysis/references/build_entity_details_sql.md +0 -58
- package/skills/ae-analysis/references/build_event_analysis_qp.md +0 -134
- package/skills/ae-analysis/references/build_event_details_sql.md +0 -61
- package/skills/ae-analysis/references/build_funnel_analysis_qp.md +0 -145
- package/skills/ae-analysis/references/build_heat_map_analysis_qp.md +0 -54
- package/skills/ae-analysis/references/build_interval_analysis_qp.md +0 -60
- package/skills/ae-analysis/references/build_path_analysis_qp.md +0 -53
- package/skills/ae-analysis/references/build_prop_analysis_qp.md +0 -124
- package/skills/ae-analysis/references/build_rank_list_analysis_qp.md +0 -63
- package/skills/ae-analysis/references/build_retention_analysis_qp.md +0 -143
- package/skills/ae-analysis/references/build_tag_definition.md +0 -65
- package/skills/ae-analysis/references/copy_dashboard.md +0 -33
- package/skills/ae-analysis/references/create_cluster.md +0 -69
- package/skills/ae-analysis/references/create_dashboard.md +0 -49
- package/skills/ae-analysis/references/create_id_cluster.md +0 -40
- package/skills/ae-analysis/references/create_id_tag.md +0 -39
- package/skills/ae-analysis/references/create_or_update_dashboard_note.md +0 -39
- package/skills/ae-analysis/references/create_public_access_link.md +0 -43
- package/skills/ae-analysis/references/create_report.md +0 -60
- package/skills/ae-analysis/references/create_result_cluster.md +0 -73
- package/skills/ae-analysis/references/create_space.md +0 -34
- package/skills/ae-analysis/references/create_tag.md +0 -61
- package/skills/ae-analysis/references/delete_cluster.md +0 -27
- package/skills/ae-analysis/references/delete_dashboard.md +0 -30
- package/skills/ae-analysis/references/delete_report.md +0 -27
- package/skills/ae-analysis/references/delete_tag.md +0 -27
- package/skills/ae-analysis/references/drilldown_user_events.md +0 -74
- package/skills/ae-analysis/references/drilldown_users.md +0 -80
- package/skills/ae-analysis/references/freeze_dashboards.md +0 -29
- package/skills/ae-analysis/references/get_analysis_query_schema.md +0 -71
- package/skills/ae-analysis/references/get_bi_panel_detail.md +0 -35
- package/skills/ae-analysis/references/get_cluster_definition_schema.md +0 -53
- package/skills/ae-analysis/references/get_clusters_by_name.md +0 -69
- package/skills/ae-analysis/references/get_filter_schema.md +0 -33
- package/skills/ae-analysis/references/get_groupby_schema.md +0 -33
- package/skills/ae-analysis/references/get_report_definition.md +0 -37
- package/skills/ae-analysis/references/get_table_columns.md +0 -37
- package/skills/ae-analysis/references/get_tag_definition_schema.md +0 -49
- package/skills/ae-analysis/references/get_tags_by_name.md +0 -69
- package/skills/ae-analysis/references/list_bi_panels.md +0 -35
- package/skills/ae-analysis/references/list_cluster_members.md +0 -45
- package/skills/ae-analysis/references/list_clusters.md +0 -46
- package/skills/ae-analysis/references/list_dashboards.md +0 -43
- package/skills/ae-analysis/references/list_public_access_links.md +0 -41
- package/skills/ae-analysis/references/list_reports.md +0 -43
- package/skills/ae-analysis/references/list_spaces.md +0 -27
- package/skills/ae-analysis/references/list_tag_members.md +0 -46
- package/skills/ae-analysis/references/list_tags.md +0 -44
- package/skills/ae-analysis/references/move_dashboard.md +0 -33
- package/skills/ae-analysis/references/query_adhoc.md +0 -141
- package/skills/ae-analysis/references/query_bi_panel_data.md +0 -58
- package/skills/ae-analysis/references/query_dashboard_detail.md +0 -35
- package/skills/ae-analysis/references/query_dashboard_report_data.md +0 -63
- package/skills/ae-analysis/references/query_entity_details.md +0 -63
- package/skills/ae-analysis/references/query_event_details.md +0 -66
- package/skills/ae-analysis/references/query_report_data.md +0 -99
- package/skills/ae-analysis/references/refresh_cluster.md +0 -31
- package/skills/ae-analysis/references/refresh_tag.md +0 -31
- package/skills/ae-analysis/references/super_metadata_import.md +0 -24
- package/skills/ae-analysis/references/update_cluster.md +0 -61
- package/skills/ae-analysis/references/update_dashboard.md +0 -45
- package/skills/ae-analysis/references/update_id_cluster.md +0 -36
- package/skills/ae-analysis/references/update_id_tag.md +0 -37
- package/skills/ae-analysis/references/update_public_access_link.md +0 -41
- package/skills/ae-analysis/references/update_report.md +0 -35
- package/skills/ae-analysis/references/update_tag.md +0 -61
- package/skills/ae-analysis-intent/SKILL.md +0 -132
- package/skills/ae-metadata/references/metadata_input_file_upload.md +0 -29
|
@@ -0,0 +1,4530 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createCapabilityCommand
|
|
3
|
+
} from "./chunk-N2QORU5D.js";
|
|
4
|
+
import {
|
|
5
|
+
registerCapabilityGatewayRoute,
|
|
6
|
+
resolveGatewayDomain
|
|
7
|
+
} from "./chunk-HL2AJQ4Q.js";
|
|
8
|
+
import {
|
|
9
|
+
CapabilityGatewayError,
|
|
10
|
+
buildCapabilityGatewayUrl,
|
|
11
|
+
fetchCapabilityGateway,
|
|
12
|
+
requestCapabilityGateway,
|
|
13
|
+
requestCapabilityGatewayWithEnvelope,
|
|
14
|
+
uploadInputFile
|
|
15
|
+
} from "./chunk-DYOS6YY7.js";
|
|
16
|
+
import {
|
|
17
|
+
withOutputMetadata
|
|
18
|
+
} from "./chunk-TNW2CI4W.js";
|
|
19
|
+
import {
|
|
20
|
+
callMcpTool,
|
|
21
|
+
parseMcpResult,
|
|
22
|
+
resolveMcpUrl
|
|
23
|
+
} from "./chunk-6LEYLOV3.js";
|
|
24
|
+
import {
|
|
25
|
+
isGlobalQueryModeEnabled
|
|
26
|
+
} from "./chunk-KGJQCYVC.js";
|
|
27
|
+
import "./chunk-NOO24N7W.js";
|
|
28
|
+
import "./chunk-2NDGFQHW.js";
|
|
29
|
+
import "./chunk-AJTH7LT3.js";
|
|
30
|
+
import "./chunk-YCLVYFK7.js";
|
|
31
|
+
|
|
32
|
+
// src/commands/te-analysis/shared.ts
|
|
33
|
+
function createMcpCommand(config) {
|
|
34
|
+
const toolName = config.command.slice(1);
|
|
35
|
+
const mcpService = config.mcpService || "analysis";
|
|
36
|
+
return {
|
|
37
|
+
service: "analysis",
|
|
38
|
+
command: config.command,
|
|
39
|
+
description: config.description,
|
|
40
|
+
flags: config.flags,
|
|
41
|
+
risk: config.risk,
|
|
42
|
+
validate: config.validate,
|
|
43
|
+
dryRun: (ctx) => ({
|
|
44
|
+
method: "tools/call",
|
|
45
|
+
url: resolveMcpUrl(ctx.mcpUrl(), ctx.host(), mcpService),
|
|
46
|
+
body: {
|
|
47
|
+
name: toolName,
|
|
48
|
+
arguments: config.buildArgs(ctx)
|
|
49
|
+
}
|
|
50
|
+
}),
|
|
51
|
+
execute: async (ctx) => {
|
|
52
|
+
const url = resolveMcpUrl(ctx.mcpUrl(), ctx.host(), mcpService);
|
|
53
|
+
const result = await callMcpTool(url, toolName, config.buildArgs(ctx), ctx.host());
|
|
54
|
+
return parseMcpResult(result);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function optionalString(ctx, name) {
|
|
59
|
+
const value = ctx.str(name);
|
|
60
|
+
return value === "" ? void 0 : value;
|
|
61
|
+
}
|
|
62
|
+
function optionalNumber(ctx, name) {
|
|
63
|
+
const value = ctx.str(name);
|
|
64
|
+
return value === "" ? void 0 : Number(value);
|
|
65
|
+
}
|
|
66
|
+
function optionalBoolean(ctx, name) {
|
|
67
|
+
const value = ctx.str(name);
|
|
68
|
+
return value === "" ? void 0 : ctx.bool(name);
|
|
69
|
+
}
|
|
70
|
+
function requiredJsonString(ctx, name) {
|
|
71
|
+
return JSON.stringify(ctx.json(name));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// src/commands/te-analysis/meta/get-alert-definition-schema.ts
|
|
75
|
+
var getAlertDefinitionSchema = createMcpCommand({
|
|
76
|
+
command: "+get_alert_definition_schema",
|
|
77
|
+
description: "Get the alert definition schema. Returns field definitions, enum descriptions, and examples for creating or updating alerts.",
|
|
78
|
+
flags: [],
|
|
79
|
+
risk: "read",
|
|
80
|
+
mcpService: "te_analysis_extend",
|
|
81
|
+
buildArgs: () => ({})
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
// src/commands/te-analysis/meta/list-alerts.ts
|
|
85
|
+
var listAlerts = createMcpCommand({
|
|
86
|
+
command: "+list_alerts",
|
|
87
|
+
description: "List all alerts in the project. Supports keyword filtering by alert name and returns a paginated alert list with total count.",
|
|
88
|
+
flags: [
|
|
89
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
90
|
+
{ name: "query", type: "string", required: false, alias: "q", desc: "Optional keyword filter. Performs fuzzy matching against alert names; if omitted, all alerts are returned." },
|
|
91
|
+
{ name: "limit", type: "number", required: false, alias: "l", desc: "Optional page size. Default: 50, maximum: 200.", min: 1, max: 200 },
|
|
92
|
+
{ name: "offset", type: "number", required: false, alias: "o", desc: "Optional page offset. Default: 0." }
|
|
93
|
+
],
|
|
94
|
+
risk: "read",
|
|
95
|
+
mcpService: "te_analysis_extend",
|
|
96
|
+
buildArgs: (ctx) => ({
|
|
97
|
+
projectId: ctx.num("project_id"),
|
|
98
|
+
query: optionalString(ctx, "query"),
|
|
99
|
+
limit: optionalNumber(ctx, "limit"),
|
|
100
|
+
offset: optionalNumber(ctx, "offset")
|
|
101
|
+
})
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
// src/commands/te-analysis/meta/get-alert.ts
|
|
105
|
+
var getAlert = createMcpCommand({
|
|
106
|
+
command: "+get_alert",
|
|
107
|
+
description: "Get detailed information about a specific alert by alertId.",
|
|
108
|
+
flags: [
|
|
109
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
110
|
+
{ name: "alert_id", type: "number", required: true, alias: "a", desc: "Alert ID" }
|
|
111
|
+
],
|
|
112
|
+
risk: "read",
|
|
113
|
+
mcpService: "te_analysis_extend",
|
|
114
|
+
buildArgs: (ctx) => ({
|
|
115
|
+
projectId: ctx.num("project_id"),
|
|
116
|
+
alertId: ctx.num("alert_id")
|
|
117
|
+
})
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
// src/commands/te-analysis/meta/create-alert.ts
|
|
121
|
+
var createAlert = createMcpCommand({
|
|
122
|
+
command: "+create_alert",
|
|
123
|
+
description: "Create a new alert. After creation, use list_alerts or get_alert to retrieve the created alert.",
|
|
124
|
+
flags: [
|
|
125
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
126
|
+
{ name: "definition", type: "json", required: true, desc: "Alert definition JSON. See +get_alert_definition_schema for the complete structure." }
|
|
127
|
+
],
|
|
128
|
+
risk: "write",
|
|
129
|
+
mcpService: "te_analysis_extend",
|
|
130
|
+
buildArgs: (ctx) => ({
|
|
131
|
+
projectId: ctx.num("project_id"),
|
|
132
|
+
definition: requiredJsonString(ctx, "definition")
|
|
133
|
+
})
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
// src/commands/te-analysis/meta/update-alert.ts
|
|
137
|
+
var updateAlert = createMcpCommand({
|
|
138
|
+
command: "+update_alert",
|
|
139
|
+
description: "Update an existing alert. All fields in the definition will replace existing values.",
|
|
140
|
+
flags: [
|
|
141
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
142
|
+
{ name: "alert_id", type: "number", required: true, alias: "a", desc: "Alert ID" },
|
|
143
|
+
{ name: "definition", type: "json", required: true, desc: "Alert definition JSON with updated fields. See +get_alert_definition_schema for the complete structure." }
|
|
144
|
+
],
|
|
145
|
+
risk: "write",
|
|
146
|
+
mcpService: "te_analysis_extend",
|
|
147
|
+
buildArgs: (ctx) => ({
|
|
148
|
+
projectId: ctx.num("project_id"),
|
|
149
|
+
alertId: ctx.num("alert_id"),
|
|
150
|
+
definition: requiredJsonString(ctx, "definition")
|
|
151
|
+
})
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
// src/commands/te-analysis/meta/delete-alert.ts
|
|
155
|
+
var deleteAlert = createMcpCommand({
|
|
156
|
+
command: "+delete_alert",
|
|
157
|
+
description: "Delete an alert by alertId",
|
|
158
|
+
flags: [
|
|
159
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID", alias: "p" },
|
|
160
|
+
{ name: "alert_id", type: "number", required: true, desc: "Alert ID to delete" }
|
|
161
|
+
],
|
|
162
|
+
risk: "high-risk-write",
|
|
163
|
+
mcpService: "te_analysis_extend",
|
|
164
|
+
buildArgs: (ctx) => ({
|
|
165
|
+
projectId: ctx.num("project_id"),
|
|
166
|
+
alertId: ctx.num("alert_id")
|
|
167
|
+
})
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
// src/commands/te-analysis/capability-shared.ts
|
|
171
|
+
var analysisDataRunRoutingHelp = "Routing: use run only for analysis data that fits <=1000 inline rows and <=180s; use export for full, unknown-size, >1000-row, or long-running data.";
|
|
172
|
+
var analysisDataExportRoutingHelp = "Routing: use export for full, unknown-size, >1000-row, or long-running analysis data; inspect/download by run_id/artifact_id; use run only for <=1000-row inline previews.";
|
|
173
|
+
function createAnalysisCapabilityCommand(config) {
|
|
174
|
+
return createCapabilityCommand({
|
|
175
|
+
...config,
|
|
176
|
+
cliService: "analysis"
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
function createAnalysisMetaCapabilityCommand(config) {
|
|
180
|
+
return createCapabilityCommand({
|
|
181
|
+
...config,
|
|
182
|
+
cliService: "analysis-meta",
|
|
183
|
+
gatewayDomain: "analysis"
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
function createAnalysisGovernanceCapabilityCommand(config) {
|
|
187
|
+
return createCapabilityCommand({
|
|
188
|
+
...config,
|
|
189
|
+
cliService: "analysis-governance",
|
|
190
|
+
gatewayDomain: "analysis"
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
var projectIdFlag = {
|
|
194
|
+
name: "project-id",
|
|
195
|
+
type: "number",
|
|
196
|
+
required: true,
|
|
197
|
+
desc: "Numeric project ID.",
|
|
198
|
+
alias: "p"
|
|
199
|
+
};
|
|
200
|
+
var queryFlag = {
|
|
201
|
+
name: "query",
|
|
202
|
+
type: "string",
|
|
203
|
+
required: false,
|
|
204
|
+
desc: "Optional keyword filter.",
|
|
205
|
+
alias: "q"
|
|
206
|
+
};
|
|
207
|
+
var fieldsFlag = {
|
|
208
|
+
name: "fields",
|
|
209
|
+
type: "json",
|
|
210
|
+
required: false,
|
|
211
|
+
desc: "Optional result field projection JSON array.",
|
|
212
|
+
alias: "f"
|
|
213
|
+
};
|
|
214
|
+
var limitFlag = {
|
|
215
|
+
name: "limit",
|
|
216
|
+
type: "number",
|
|
217
|
+
required: false,
|
|
218
|
+
desc: "Optional inline result limit.",
|
|
219
|
+
alias: "l"
|
|
220
|
+
};
|
|
221
|
+
var directoryLimitFlag = {
|
|
222
|
+
name: "limit",
|
|
223
|
+
type: "number",
|
|
224
|
+
required: false,
|
|
225
|
+
desc: "Directory page size. Default: 50, max: 200. Values outside 1..200 are rejected.",
|
|
226
|
+
alias: "l",
|
|
227
|
+
min: 1,
|
|
228
|
+
max: 200
|
|
229
|
+
};
|
|
230
|
+
var memberLimitFlag = {
|
|
231
|
+
name: "limit",
|
|
232
|
+
type: "number",
|
|
233
|
+
required: false,
|
|
234
|
+
desc: "Bounded member row limit. Default: 50, max: 200. Values outside 1..200 are rejected.",
|
|
235
|
+
alias: "l",
|
|
236
|
+
min: 1,
|
|
237
|
+
max: 200
|
|
238
|
+
};
|
|
239
|
+
var sqlTableUsageFlag = {
|
|
240
|
+
name: "usage",
|
|
241
|
+
type: "string",
|
|
242
|
+
required: false,
|
|
243
|
+
desc: "Authorized table set: analysis (default) or tag_cluster. Use tag_cluster before creating SQL tags or clusters."
|
|
244
|
+
};
|
|
245
|
+
var reportListLimitFlag = {
|
|
246
|
+
name: "limit",
|
|
247
|
+
type: "number",
|
|
248
|
+
required: false,
|
|
249
|
+
desc: "Report page size. Default: 50, max: 200. Values outside 1..200 are rejected.",
|
|
250
|
+
alias: "l",
|
|
251
|
+
min: 1,
|
|
252
|
+
max: 200
|
|
253
|
+
};
|
|
254
|
+
var reportModelTypesFlag = {
|
|
255
|
+
name: "model-types",
|
|
256
|
+
type: "json",
|
|
257
|
+
required: false,
|
|
258
|
+
desc: 'Optional semantic report model JSON array, for example ["event","sql","tag","revenue"].'
|
|
259
|
+
};
|
|
260
|
+
var syncLimitFlag = {
|
|
261
|
+
name: "limit",
|
|
262
|
+
type: "number",
|
|
263
|
+
required: false,
|
|
264
|
+
desc: "Maximum inline rows for sync query results. Default: 100, max: 1000. Use export for full data.",
|
|
265
|
+
alias: "l",
|
|
266
|
+
min: 1,
|
|
267
|
+
max: 1e3
|
|
268
|
+
};
|
|
269
|
+
var detailPreviewLimitFlag = {
|
|
270
|
+
name: "limit",
|
|
271
|
+
type: "number",
|
|
272
|
+
required: false,
|
|
273
|
+
desc: "Maximum first preview rows. Default: 100, max: 1000. This is not a pagination window; use export for more rows.",
|
|
274
|
+
alias: "l",
|
|
275
|
+
min: 1,
|
|
276
|
+
max: 1e3
|
|
277
|
+
};
|
|
278
|
+
var offsetFlag = {
|
|
279
|
+
name: "offset",
|
|
280
|
+
type: "number",
|
|
281
|
+
required: false,
|
|
282
|
+
desc: "Optional zero-based result offset.",
|
|
283
|
+
alias: "o"
|
|
284
|
+
};
|
|
285
|
+
var payloadFlag = {
|
|
286
|
+
name: "payload",
|
|
287
|
+
type: "json",
|
|
288
|
+
required: false,
|
|
289
|
+
desc: "Optional snake_case object for complex capability payload fields."
|
|
290
|
+
};
|
|
291
|
+
var requiredPayloadFlag = {
|
|
292
|
+
...payloadFlag,
|
|
293
|
+
required: true,
|
|
294
|
+
desc: "Required snake_case capability payload. Read the dedicated command reference for its semantic shape; an empty object is not a generic valid payload."
|
|
295
|
+
};
|
|
296
|
+
var requestIdFlag = {
|
|
297
|
+
name: "request-id",
|
|
298
|
+
type: "string",
|
|
299
|
+
required: false,
|
|
300
|
+
desc: "Optional caller-supplied cli_<32 lowercase hex> lifecycle ID. ae-cli generates and prints one before dispatch when omitted."
|
|
301
|
+
};
|
|
302
|
+
var timeoutSecondsFlag = {
|
|
303
|
+
name: "timeout-seconds",
|
|
304
|
+
type: "number",
|
|
305
|
+
required: false,
|
|
306
|
+
desc: "Optional capability execution timeout in seconds."
|
|
307
|
+
};
|
|
308
|
+
var syncTimeoutSecondsFlag = {
|
|
309
|
+
name: "timeout-seconds",
|
|
310
|
+
type: "number",
|
|
311
|
+
required: false,
|
|
312
|
+
desc: "Sync timeout seconds. Default: 120, max: 180.",
|
|
313
|
+
min: 1,
|
|
314
|
+
max: 180
|
|
315
|
+
};
|
|
316
|
+
var dashboardSyncTimeoutSecondsFlag = {
|
|
317
|
+
...syncTimeoutSecondsFlag,
|
|
318
|
+
desc: "Sync timeout seconds. Default: 180, max: 180."
|
|
319
|
+
};
|
|
320
|
+
var asyncTimeoutSecondsFlag = {
|
|
321
|
+
name: "timeout-seconds",
|
|
322
|
+
type: "number",
|
|
323
|
+
required: false,
|
|
324
|
+
desc: "Async runtime in seconds. Default and max: 21600 (6 hours); cancel earlier with analysis query cancel --run-id <run_id>.",
|
|
325
|
+
min: 1,
|
|
326
|
+
max: 21600
|
|
327
|
+
};
|
|
328
|
+
var artifactFormatFlag = {
|
|
329
|
+
name: "artifact-format",
|
|
330
|
+
type: "string",
|
|
331
|
+
required: false,
|
|
332
|
+
desc: "Logical artifact format, usually jsonl or csv. This does not select compression; read format, compression, file_name, content_type, and content_encoding from the returned descriptor."
|
|
333
|
+
};
|
|
334
|
+
function projectInput(ctx) {
|
|
335
|
+
return { project_id: ctx.num("project-id") };
|
|
336
|
+
}
|
|
337
|
+
function listInput(ctx) {
|
|
338
|
+
return compactInput({
|
|
339
|
+
...projectInput(ctx),
|
|
340
|
+
query: optionalString2(ctx, "query"),
|
|
341
|
+
fields: optionalJson(ctx, "fields"),
|
|
342
|
+
limit: optionalNumber2(ctx, "limit"),
|
|
343
|
+
offset: optionalNumber2(ctx, "offset")
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
function reportListInput(ctx) {
|
|
347
|
+
return compactInput({
|
|
348
|
+
...listInput(ctx),
|
|
349
|
+
model_types: optionalJson(ctx, "model-types")
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
function dashboardReportDataInput(ctx) {
|
|
353
|
+
return compactInput({
|
|
354
|
+
...projectInput(ctx),
|
|
355
|
+
dashboard_id: ctx.num("dashboard-id"),
|
|
356
|
+
report_ids: optionalJsonArray(ctx, "report-ids"),
|
|
357
|
+
filters: optionalJson(ctx, "filters"),
|
|
358
|
+
start_time: optionalString2(ctx, "start-time"),
|
|
359
|
+
end_time: optionalString2(ctx, "end-time"),
|
|
360
|
+
use_cache: optionalBoolean2(ctx, "use-cache"),
|
|
361
|
+
request_id: optionalString2(ctx, "request-id"),
|
|
362
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds"),
|
|
363
|
+
limit: optionalNumber2(ctx, "limit"),
|
|
364
|
+
format: optionalString2(ctx, "artifact-format")
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
function exportLifecycleInput(ctx) {
|
|
368
|
+
return compactInput({
|
|
369
|
+
request_id: optionalString2(ctx, "request-id"),
|
|
370
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds"),
|
|
371
|
+
format: optionalString2(ctx, "artifact-format")
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
function biPanelPageDataInput(ctx) {
|
|
375
|
+
return compactInput({
|
|
376
|
+
...projectInput(ctx),
|
|
377
|
+
panel_id: ctx.num("panel-id"),
|
|
378
|
+
page_key: ctx.str("page-key"),
|
|
379
|
+
result_type: ctx.str("result-type"),
|
|
380
|
+
chart_ids: optionalJsonArray(ctx, "chart-ids"),
|
|
381
|
+
parameter_controls: optionalJson(ctx, "parameter-controls"),
|
|
382
|
+
permission_controls: optionalJson(ctx, "permission-controls"),
|
|
383
|
+
chart_filter_controls: optionalJson(ctx, "chart-filter-controls"),
|
|
384
|
+
columns: optionalJson(ctx, "columns"),
|
|
385
|
+
row_limit: optionalNumber2(ctx, "row-limit"),
|
|
386
|
+
row_offset: optionalNumber2(ctx, "row-offset"),
|
|
387
|
+
block_limit: optionalNumber2(ctx, "block-limit"),
|
|
388
|
+
block_offset: optionalNumber2(ctx, "block-offset"),
|
|
389
|
+
use_cache: optionalBoolean2(ctx, "use-cache"),
|
|
390
|
+
request_id: optionalString2(ctx, "request-id"),
|
|
391
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds"),
|
|
392
|
+
limit: optionalNumber2(ctx, "limit"),
|
|
393
|
+
format: optionalString2(ctx, "artifact-format")
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
function optionalString2(ctx, name) {
|
|
397
|
+
const value = ctx.str(name);
|
|
398
|
+
return value === "" ? void 0 : value;
|
|
399
|
+
}
|
|
400
|
+
function optionalNumber2(ctx, name) {
|
|
401
|
+
const value = ctx.str(name);
|
|
402
|
+
return value === "" ? void 0 : Number(value);
|
|
403
|
+
}
|
|
404
|
+
function optionalBoolean2(ctx, name) {
|
|
405
|
+
const value = ctx.str(name);
|
|
406
|
+
return value === "" ? void 0 : ctx.bool(name);
|
|
407
|
+
}
|
|
408
|
+
function stringWithDefault(ctx, name, defaultValue) {
|
|
409
|
+
const value = ctx.str(name);
|
|
410
|
+
return value === "" ? defaultValue : value;
|
|
411
|
+
}
|
|
412
|
+
function numberWithDefault(ctx, name, defaultValue) {
|
|
413
|
+
const value = ctx.str(name);
|
|
414
|
+
return value === "" ? defaultValue : Number(value);
|
|
415
|
+
}
|
|
416
|
+
function booleanWithDefault(ctx, name, defaultValue) {
|
|
417
|
+
const value = ctx.str(name);
|
|
418
|
+
return value === "" ? defaultValue : ctx.bool(name);
|
|
419
|
+
}
|
|
420
|
+
function optionalJson(ctx, name) {
|
|
421
|
+
const value = ctx.str(name);
|
|
422
|
+
return value === "" ? void 0 : ctx.json(name);
|
|
423
|
+
}
|
|
424
|
+
function jsonArray(ctx, name) {
|
|
425
|
+
const value = ctx.json(name);
|
|
426
|
+
return Array.isArray(value) ? value : [value];
|
|
427
|
+
}
|
|
428
|
+
function optionalJsonArray(ctx, name) {
|
|
429
|
+
const value = ctx.str(name);
|
|
430
|
+
if (value === "") {
|
|
431
|
+
return void 0;
|
|
432
|
+
}
|
|
433
|
+
const parsed = ctx.json(name);
|
|
434
|
+
return Array.isArray(parsed) ? parsed : [parsed];
|
|
435
|
+
}
|
|
436
|
+
function compactInput(input) {
|
|
437
|
+
const result = {};
|
|
438
|
+
for (const [key, value] of Object.entries(input)) {
|
|
439
|
+
if (value !== void 0) {
|
|
440
|
+
result[key] = value;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
return result;
|
|
444
|
+
}
|
|
445
|
+
function applyAnalysisInlineLimit(result, input) {
|
|
446
|
+
const limit = typeof input.limit === "number" && Number.isInteger(input.limit) && input.limit > 0 ? input.limit : void 0;
|
|
447
|
+
if (!limit) {
|
|
448
|
+
return result;
|
|
449
|
+
}
|
|
450
|
+
const cloned = cloneJsonLike(result);
|
|
451
|
+
const summary = {
|
|
452
|
+
truncated: false,
|
|
453
|
+
containers: 0,
|
|
454
|
+
originalRows: 0,
|
|
455
|
+
returnedRows: 0
|
|
456
|
+
};
|
|
457
|
+
trimRows(cloned, limit, summary);
|
|
458
|
+
if (summary.truncated && cloned && typeof cloned === "object" && !Array.isArray(cloned)) {
|
|
459
|
+
cloned._cli_inline_limit = {
|
|
460
|
+
requested_limit: limit,
|
|
461
|
+
containers_truncated: summary.containers,
|
|
462
|
+
original_rows: summary.originalRows,
|
|
463
|
+
returned_rows: summary.returnedRows,
|
|
464
|
+
note: "Rows were truncated by ae-cli to keep sync run output within the inline limit. Use export for full data."
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
return cloned;
|
|
468
|
+
}
|
|
469
|
+
function cloneJsonLike(value) {
|
|
470
|
+
if (value === void 0 || value === null) return value;
|
|
471
|
+
return JSON.parse(JSON.stringify(value));
|
|
472
|
+
}
|
|
473
|
+
function trimRows(value, limit, summary) {
|
|
474
|
+
if (!value || typeof value !== "object") return;
|
|
475
|
+
if (Array.isArray(value)) {
|
|
476
|
+
for (const item of value) trimRows(item, limit, summary);
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
const record = value;
|
|
480
|
+
const rows = record.rows;
|
|
481
|
+
if (Array.isArray(rows) && rows.length > limit) {
|
|
482
|
+
record.rows = rows.slice(0, limit);
|
|
483
|
+
record._cli_truncation = {
|
|
484
|
+
field: "rows",
|
|
485
|
+
requested_limit: limit,
|
|
486
|
+
original_row_count: rows.length,
|
|
487
|
+
returned_row_count: limit
|
|
488
|
+
};
|
|
489
|
+
summary.truncated = true;
|
|
490
|
+
summary.containers += 1;
|
|
491
|
+
summary.originalRows += rows.length;
|
|
492
|
+
summary.returnedRows += limit;
|
|
493
|
+
}
|
|
494
|
+
for (const child of Object.values(record)) {
|
|
495
|
+
trimRows(child, limit, summary);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
// src/commands/te-analysis/meta/event/list.ts
|
|
500
|
+
var metadataEventList = createAnalysisMetaCapabilityCommand({
|
|
501
|
+
resource: "event",
|
|
502
|
+
command: "list",
|
|
503
|
+
capabilityId: "metadata.event.list",
|
|
504
|
+
description: "List project super events.",
|
|
505
|
+
flags: [
|
|
506
|
+
projectIdFlag
|
|
507
|
+
],
|
|
508
|
+
risk: "read",
|
|
509
|
+
buildInput: projectInput
|
|
510
|
+
});
|
|
511
|
+
|
|
512
|
+
// src/commands/te-analysis/meta/event/get.ts
|
|
513
|
+
var metadataEventGet = createAnalysisMetaCapabilityCommand({
|
|
514
|
+
resource: "event",
|
|
515
|
+
command: "get",
|
|
516
|
+
capabilityId: "metadata.event.get",
|
|
517
|
+
description: "Get one super event metadata detail.",
|
|
518
|
+
flags: [
|
|
519
|
+
projectIdFlag,
|
|
520
|
+
{ name: "event-name", type: "string", required: true, desc: "Event name." }
|
|
521
|
+
],
|
|
522
|
+
risk: "read",
|
|
523
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), event_name: ctx.str("event-name") })
|
|
524
|
+
});
|
|
525
|
+
|
|
526
|
+
// src/commands/te-analysis/meta/event/create.ts
|
|
527
|
+
var metadataEventCreate = createAnalysisMetaCapabilityCommand({
|
|
528
|
+
resource: "event",
|
|
529
|
+
command: "create",
|
|
530
|
+
capabilityId: "metadata.event.create",
|
|
531
|
+
description: "Create super events and optionally associate event properties.",
|
|
532
|
+
flags: [
|
|
533
|
+
projectIdFlag,
|
|
534
|
+
requiredPayloadFlag
|
|
535
|
+
],
|
|
536
|
+
risk: "write",
|
|
537
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), payload: ctx.json("payload") })
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
// src/commands/te-analysis/meta/event/update.ts
|
|
541
|
+
var metadataEventUpdate = createAnalysisMetaCapabilityCommand({
|
|
542
|
+
resource: "event",
|
|
543
|
+
command: "update",
|
|
544
|
+
capabilityId: "metadata.event.update",
|
|
545
|
+
description: "Update event display names and remarks.",
|
|
546
|
+
flags: [
|
|
547
|
+
projectIdFlag,
|
|
548
|
+
{ name: "event-name", type: "string", required: true, desc: "Event name." },
|
|
549
|
+
{ name: "event-desc", type: "string", required: false, desc: "Event display name." },
|
|
550
|
+
{ name: "remark", type: "string", required: false, desc: "Event remark." }
|
|
551
|
+
],
|
|
552
|
+
risk: "write",
|
|
553
|
+
buildInput: (ctx) => compactInput({ ...projectInput(ctx), event_name: ctx.str("event-name"), event_desc: optionalString2(ctx, "event-desc"), remark: optionalString2(ctx, "remark") })
|
|
554
|
+
});
|
|
555
|
+
|
|
556
|
+
// src/commands/te-analysis/meta/event/relation-update.ts
|
|
557
|
+
var metadataEventRelationUpdate = createAnalysisMetaCapabilityCommand({
|
|
558
|
+
resource: "event",
|
|
559
|
+
command: "relation-update",
|
|
560
|
+
capabilityId: "metadata.event.relation_update",
|
|
561
|
+
description: "Update event-property connection or source relations.",
|
|
562
|
+
flags: [
|
|
563
|
+
projectIdFlag,
|
|
564
|
+
requiredPayloadFlag
|
|
565
|
+
],
|
|
566
|
+
risk: "write",
|
|
567
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), payload: ctx.json("payload") })
|
|
568
|
+
});
|
|
569
|
+
|
|
570
|
+
// src/commands/te-analysis/meta/event/hide-update.ts
|
|
571
|
+
var metadataEventHideUpdate = createAnalysisMetaCapabilityCommand({
|
|
572
|
+
resource: "event",
|
|
573
|
+
command: "hide-update",
|
|
574
|
+
capabilityId: "metadata.event.hide_update",
|
|
575
|
+
description: "Batch hide or show events.",
|
|
576
|
+
flags: [
|
|
577
|
+
projectIdFlag,
|
|
578
|
+
{ name: "event-names", type: "json", required: true, desc: "Event names JSON array, or a JSON string accepted by common-service." },
|
|
579
|
+
{ name: "is-hide", type: "boolean", required: true, desc: "Whether to hide the events." }
|
|
580
|
+
],
|
|
581
|
+
risk: "write",
|
|
582
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), event_names: ctx.json("event-names"), is_hide: ctx.bool("is-hide") })
|
|
583
|
+
});
|
|
584
|
+
|
|
585
|
+
// src/commands/te-analysis/meta/event/delete.ts
|
|
586
|
+
var metadataEventDelete = createAnalysisMetaCapabilityCommand({
|
|
587
|
+
resource: "event",
|
|
588
|
+
command: "delete",
|
|
589
|
+
capabilityId: "metadata.event.delete",
|
|
590
|
+
description: "Batch delete events or virtual events.",
|
|
591
|
+
flags: [
|
|
592
|
+
projectIdFlag,
|
|
593
|
+
{ name: "event-names", type: "json", required: true, desc: "Event names JSON array, or a JSON string accepted by common-service." }
|
|
594
|
+
],
|
|
595
|
+
risk: "high-risk-write",
|
|
596
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), event_names: ctx.json("event-names") })
|
|
597
|
+
});
|
|
598
|
+
|
|
599
|
+
// src/commands/te-analysis/meta/event/influence-list.ts
|
|
600
|
+
var metadataEventInfluenceList = createAnalysisMetaCapabilityCommand({
|
|
601
|
+
resource: "event",
|
|
602
|
+
command: "influence-list",
|
|
603
|
+
capabilityId: "metadata.event.influence_list",
|
|
604
|
+
description: "List assets affected by event delete, hide, or update.",
|
|
605
|
+
flags: [
|
|
606
|
+
projectIdFlag,
|
|
607
|
+
{ name: "event-name", type: "string", required: true, desc: "Event name." }
|
|
608
|
+
],
|
|
609
|
+
risk: "read",
|
|
610
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), event_name: ctx.str("event-name") })
|
|
611
|
+
});
|
|
612
|
+
|
|
613
|
+
// src/commands/te-analysis/meta/event/changelog-list.ts
|
|
614
|
+
var metadataEventChangelogList = createAnalysisMetaCapabilityCommand({
|
|
615
|
+
resource: "event",
|
|
616
|
+
command: "changelog-list",
|
|
617
|
+
capabilityId: "metadata.event.changelog_list",
|
|
618
|
+
description: "List event metadata change logs.",
|
|
619
|
+
flags: [
|
|
620
|
+
projectIdFlag,
|
|
621
|
+
{ name: "event-name", type: "string", required: true, desc: "Event name." }
|
|
622
|
+
],
|
|
623
|
+
risk: "read",
|
|
624
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), event_name: ctx.str("event-name") })
|
|
625
|
+
});
|
|
626
|
+
|
|
627
|
+
// src/commands/te-analysis/meta/event/index.ts
|
|
628
|
+
var commands = [
|
|
629
|
+
metadataEventList,
|
|
630
|
+
metadataEventGet,
|
|
631
|
+
metadataEventCreate,
|
|
632
|
+
metadataEventUpdate,
|
|
633
|
+
metadataEventRelationUpdate,
|
|
634
|
+
metadataEventHideUpdate,
|
|
635
|
+
metadataEventDelete,
|
|
636
|
+
metadataEventInfluenceList,
|
|
637
|
+
metadataEventChangelogList
|
|
638
|
+
];
|
|
639
|
+
var event_default = commands;
|
|
640
|
+
|
|
641
|
+
// src/commands/te-analysis/meta/property/list.ts
|
|
642
|
+
var metadataPropertyList = createAnalysisMetaCapabilityCommand({
|
|
643
|
+
resource: "property",
|
|
644
|
+
command: "list",
|
|
645
|
+
capabilityId: "metadata.property.list",
|
|
646
|
+
description: "List event or user properties.",
|
|
647
|
+
flags: [
|
|
648
|
+
projectIdFlag,
|
|
649
|
+
{ name: "table-type", type: "string", required: true, desc: "Property table type." }
|
|
650
|
+
],
|
|
651
|
+
risk: "read",
|
|
652
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), table_type: ctx.str("table-type") })
|
|
653
|
+
});
|
|
654
|
+
|
|
655
|
+
// src/commands/te-analysis/meta/property/get.ts
|
|
656
|
+
var metadataPropertyGet = createAnalysisMetaCapabilityCommand({
|
|
657
|
+
resource: "property",
|
|
658
|
+
command: "get",
|
|
659
|
+
capabilityId: "metadata.property.get",
|
|
660
|
+
description: "Get one event or user property metadata detail.",
|
|
661
|
+
flags: [
|
|
662
|
+
projectIdFlag,
|
|
663
|
+
{ name: "table-type", type: "string", required: true, desc: "Property table type." },
|
|
664
|
+
{ name: "prop-name", type: "string", required: true, desc: "Property column name." }
|
|
665
|
+
],
|
|
666
|
+
risk: "read",
|
|
667
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), table_type: ctx.str("table-type"), prop_name: ctx.str("prop-name") })
|
|
668
|
+
});
|
|
669
|
+
|
|
670
|
+
// src/commands/te-analysis/meta/property/create.ts
|
|
671
|
+
var metadataPropertyCreate = createAnalysisMetaCapabilityCommand({
|
|
672
|
+
resource: "property",
|
|
673
|
+
command: "create",
|
|
674
|
+
capabilityId: "metadata.property.create",
|
|
675
|
+
description: "Create event or user properties and optionally associate events.",
|
|
676
|
+
flags: [
|
|
677
|
+
projectIdFlag,
|
|
678
|
+
{ name: "table-type", type: "string", required: true, desc: "Property table type." },
|
|
679
|
+
requiredPayloadFlag
|
|
680
|
+
],
|
|
681
|
+
risk: "write",
|
|
682
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), table_type: ctx.str("table-type"), payload: ctx.json("payload") })
|
|
683
|
+
});
|
|
684
|
+
|
|
685
|
+
// src/commands/te-analysis/meta/property/update.ts
|
|
686
|
+
var metadataPropertyUpdate = createAnalysisMetaCapabilityCommand({
|
|
687
|
+
resource: "property",
|
|
688
|
+
command: "update",
|
|
689
|
+
capabilityId: "metadata.property.update",
|
|
690
|
+
description: "Update property display names and remarks.",
|
|
691
|
+
flags: [
|
|
692
|
+
projectIdFlag,
|
|
693
|
+
{ name: "table-type", type: "string", required: true, desc: "Property table type." },
|
|
694
|
+
{ name: "prop-name", type: "string", required: true, desc: "Property column name." },
|
|
695
|
+
{ name: "prop-desc", type: "string", required: false, desc: "Property display name." },
|
|
696
|
+
{ name: "prop-remark", type: "string", required: false, desc: "Property remark." }
|
|
697
|
+
],
|
|
698
|
+
risk: "write",
|
|
699
|
+
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") })
|
|
700
|
+
});
|
|
701
|
+
|
|
702
|
+
// src/commands/te-analysis/meta/property/relation-update.ts
|
|
703
|
+
var metadataPropertyRelationUpdate = createAnalysisMetaCapabilityCommand({
|
|
704
|
+
resource: "property",
|
|
705
|
+
command: "relation-update",
|
|
706
|
+
capabilityId: "metadata.property.relation_update",
|
|
707
|
+
description: "Update property type, connection relation, or event mapping.",
|
|
708
|
+
flags: [
|
|
709
|
+
projectIdFlag,
|
|
710
|
+
{ name: "table-type", type: "string", required: true, desc: "Property table type." },
|
|
711
|
+
requiredPayloadFlag
|
|
712
|
+
],
|
|
713
|
+
risk: "write",
|
|
714
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), table_type: ctx.str("table-type"), payload: ctx.json("payload") })
|
|
715
|
+
});
|
|
716
|
+
|
|
717
|
+
// src/commands/te-analysis/meta/property/hide-update.ts
|
|
718
|
+
var metadataPropertyHideUpdate = createAnalysisMetaCapabilityCommand({
|
|
719
|
+
resource: "property",
|
|
720
|
+
command: "hide-update",
|
|
721
|
+
capabilityId: "metadata.property.hide_update",
|
|
722
|
+
description: "Batch hide or show properties.",
|
|
723
|
+
flags: [
|
|
724
|
+
projectIdFlag,
|
|
725
|
+
{ name: "table-type", type: "string", required: true, desc: "Property table type." },
|
|
726
|
+
{ name: "prop-names", type: "json", required: true, desc: "Property names JSON array, or a JSON string accepted by common-service." },
|
|
727
|
+
{ name: "is-hide", type: "boolean", required: true, desc: "Whether to hide the properties." }
|
|
728
|
+
],
|
|
729
|
+
risk: "write",
|
|
730
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), table_type: ctx.str("table-type"), prop_names: ctx.json("prop-names"), is_hide: ctx.bool("is-hide") })
|
|
731
|
+
});
|
|
732
|
+
|
|
733
|
+
// src/commands/te-analysis/meta/property/delete.ts
|
|
734
|
+
var metadataPropertyDelete = createAnalysisMetaCapabilityCommand({
|
|
735
|
+
resource: "property",
|
|
736
|
+
command: "delete",
|
|
737
|
+
capabilityId: "metadata.property.delete",
|
|
738
|
+
description: "Batch delete properties or virtual properties.",
|
|
739
|
+
flags: [
|
|
740
|
+
projectIdFlag,
|
|
741
|
+
{ name: "table-type", type: "string", required: true, desc: "Property table type." },
|
|
742
|
+
{ name: "prop-names", type: "json", required: true, desc: "Property names JSON array, or a JSON string accepted by common-service." }
|
|
743
|
+
],
|
|
744
|
+
risk: "high-risk-write",
|
|
745
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), table_type: ctx.str("table-type"), prop_names: ctx.json("prop-names") })
|
|
746
|
+
});
|
|
747
|
+
|
|
748
|
+
// src/commands/te-analysis/meta/property/influence-list.ts
|
|
749
|
+
var metadataPropertyInfluenceList = createAnalysisMetaCapabilityCommand({
|
|
750
|
+
resource: "property",
|
|
751
|
+
command: "influence-list",
|
|
752
|
+
capabilityId: "metadata.property.influence_list",
|
|
753
|
+
description: "List assets affected by property changes.",
|
|
754
|
+
flags: [
|
|
755
|
+
projectIdFlag,
|
|
756
|
+
{ name: "table-type", type: "string", required: true, desc: "Property table type." },
|
|
757
|
+
{ name: "prop-name", type: "string", required: true, desc: "Property column name." }
|
|
758
|
+
],
|
|
759
|
+
risk: "read",
|
|
760
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), table_type: ctx.str("table-type"), prop_name: ctx.str("prop-name") })
|
|
761
|
+
});
|
|
762
|
+
|
|
763
|
+
// src/commands/te-analysis/meta/property/changelog-list.ts
|
|
764
|
+
var metadataPropertyChangelogList = createAnalysisMetaCapabilityCommand({
|
|
765
|
+
resource: "property",
|
|
766
|
+
command: "changelog-list",
|
|
767
|
+
capabilityId: "metadata.property.changelog_list",
|
|
768
|
+
description: "List property metadata change logs.",
|
|
769
|
+
flags: [
|
|
770
|
+
projectIdFlag,
|
|
771
|
+
{ name: "table-type", type: "string", required: true, desc: "Property table type." },
|
|
772
|
+
{ name: "prop-name", type: "string", required: true, desc: "Property column name." }
|
|
773
|
+
],
|
|
774
|
+
risk: "read",
|
|
775
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), table_type: ctx.str("table-type"), prop_name: ctx.str("prop-name") })
|
|
776
|
+
});
|
|
777
|
+
|
|
778
|
+
// src/commands/te-analysis/meta/property/related-events.ts
|
|
779
|
+
var metadataPropertyRelatedEvents = createAnalysisMetaCapabilityCommand({
|
|
780
|
+
resource: "property",
|
|
781
|
+
command: "related-events",
|
|
782
|
+
capabilityId: "metadata.property.related_events",
|
|
783
|
+
description: "List events related to one event property.",
|
|
784
|
+
flags: [
|
|
785
|
+
projectIdFlag,
|
|
786
|
+
{ name: "prop-name", type: "string", required: true, desc: "Event property column name." }
|
|
787
|
+
],
|
|
788
|
+
risk: "read",
|
|
789
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), prop_name: ctx.str("prop-name") })
|
|
790
|
+
});
|
|
791
|
+
|
|
792
|
+
// src/commands/te-analysis/meta/property/index.ts
|
|
793
|
+
var commands2 = [
|
|
794
|
+
metadataPropertyList,
|
|
795
|
+
metadataPropertyGet,
|
|
796
|
+
metadataPropertyCreate,
|
|
797
|
+
metadataPropertyUpdate,
|
|
798
|
+
metadataPropertyRelationUpdate,
|
|
799
|
+
metadataPropertyHideUpdate,
|
|
800
|
+
metadataPropertyDelete,
|
|
801
|
+
metadataPropertyInfluenceList,
|
|
802
|
+
metadataPropertyChangelogList,
|
|
803
|
+
metadataPropertyRelatedEvents
|
|
804
|
+
];
|
|
805
|
+
var property_default = commands2;
|
|
806
|
+
|
|
807
|
+
// src/commands/te-analysis/meta/virtual-event/create.ts
|
|
808
|
+
var metadataVirtualEventCreate = createAnalysisMetaCapabilityCommand({
|
|
809
|
+
resource: "virtual-event",
|
|
810
|
+
command: "create",
|
|
811
|
+
capabilityId: "metadata.virtual_event.create",
|
|
812
|
+
description: "Create a virtual event from events and filters.",
|
|
813
|
+
flags: [
|
|
814
|
+
projectIdFlag,
|
|
815
|
+
requiredPayloadFlag,
|
|
816
|
+
{ name: "override", type: "boolean", required: false, desc: "Whether to override an existing virtual event rule." }
|
|
817
|
+
],
|
|
818
|
+
risk: "write",
|
|
819
|
+
buildInput: (ctx) => compactInput({ ...projectInput(ctx), payload: ctx.json("payload"), override: optionalBoolean2(ctx, "override") })
|
|
820
|
+
});
|
|
821
|
+
|
|
822
|
+
// src/commands/te-analysis/meta/virtual-event/get.ts
|
|
823
|
+
var metadataVirtualEventGet = createAnalysisMetaCapabilityCommand({
|
|
824
|
+
resource: "virtual-event",
|
|
825
|
+
command: "get",
|
|
826
|
+
capabilityId: "metadata.virtual_event.get",
|
|
827
|
+
description: "Get virtual event rule.",
|
|
828
|
+
flags: [
|
|
829
|
+
projectIdFlag,
|
|
830
|
+
{ name: "v-event-id", type: "number", required: true, desc: "Virtual event ID." }
|
|
831
|
+
],
|
|
832
|
+
risk: "read",
|
|
833
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), v_event_id: ctx.num("v-event-id") })
|
|
834
|
+
});
|
|
835
|
+
|
|
836
|
+
// src/commands/te-analysis/meta/virtual-event/delete.ts
|
|
837
|
+
var metadataVirtualEventDelete = createAnalysisMetaCapabilityCommand({
|
|
838
|
+
resource: "virtual-event",
|
|
839
|
+
command: "delete",
|
|
840
|
+
capabilityId: "metadata.virtual_event.delete",
|
|
841
|
+
description: "Delete a virtual event rule.",
|
|
842
|
+
flags: [
|
|
843
|
+
projectIdFlag,
|
|
844
|
+
{ name: "v-event-id", type: "number", required: true, desc: "Virtual event ID." }
|
|
845
|
+
],
|
|
846
|
+
risk: "high-risk-write",
|
|
847
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), v_event_id: ctx.num("v-event-id") })
|
|
848
|
+
});
|
|
849
|
+
|
|
850
|
+
// src/commands/te-analysis/meta/virtual-event/index.ts
|
|
851
|
+
var commands3 = [
|
|
852
|
+
metadataVirtualEventCreate,
|
|
853
|
+
metadataVirtualEventGet,
|
|
854
|
+
metadataVirtualEventDelete
|
|
855
|
+
];
|
|
856
|
+
var virtual_event_default = commands3;
|
|
857
|
+
|
|
858
|
+
// src/commands/te-analysis/meta/virtual-property/create.ts
|
|
859
|
+
var metadataVirtualPropertyCreate = createAnalysisMetaCapabilityCommand({
|
|
860
|
+
resource: "virtual-property",
|
|
861
|
+
command: "create",
|
|
862
|
+
capabilityId: "metadata.virtual_property.create",
|
|
863
|
+
description: "Create a SQL virtual event or user property.",
|
|
864
|
+
flags: [
|
|
865
|
+
projectIdFlag,
|
|
866
|
+
{ name: "sql-expression", type: "string", required: true, desc: "SQL expression used to calculate the virtual property." },
|
|
867
|
+
{ name: "v-prop", type: "json", required: true, desc: "Virtual property JSON object with property.column_name/table_type/select_type fields." },
|
|
868
|
+
{ name: "properties", type: "json", required: false, desc: "Dependent property JSON array." },
|
|
869
|
+
{ name: "sql-event-relation-type", type: "string", required: false, desc: "relation_default, relation_always, or relation_by_setting." },
|
|
870
|
+
{ name: "related-events", type: "json", required: false, desc: "Related events JSON array when using relation_by_setting." },
|
|
871
|
+
{ name: "tag-date-policies", type: "json", required: false, desc: "Optional tag date policies JSON array." },
|
|
872
|
+
{ name: "replace-remark", type: "string", required: false, desc: "Replacement remark." },
|
|
873
|
+
{ name: "replace-suggestion", type: "string", required: false, desc: "Replacement suggestion." }
|
|
874
|
+
],
|
|
875
|
+
risk: "write",
|
|
876
|
+
buildInput: (ctx) => compactInput({
|
|
877
|
+
...projectInput(ctx),
|
|
878
|
+
sql_expression: ctx.str("sql-expression"),
|
|
879
|
+
v_prop: ctx.json("v-prop"),
|
|
880
|
+
properties: optionalJson(ctx, "properties"),
|
|
881
|
+
sql_event_relation_type: optionalString2(ctx, "sql-event-relation-type"),
|
|
882
|
+
related_events: optionalJson(ctx, "related-events"),
|
|
883
|
+
tag_date_policies: optionalJson(ctx, "tag-date-policies"),
|
|
884
|
+
replace_remark: optionalString2(ctx, "replace-remark"),
|
|
885
|
+
replace_suggestion: optionalString2(ctx, "replace-suggestion")
|
|
886
|
+
})
|
|
887
|
+
});
|
|
888
|
+
|
|
889
|
+
// src/commands/te-analysis/meta/virtual-property/sql-rule-update.ts
|
|
890
|
+
var metadataVirtualPropertySqlRuleUpdate = createAnalysisMetaCapabilityCommand({
|
|
891
|
+
resource: "virtual-property",
|
|
892
|
+
command: "sql-rule-update",
|
|
893
|
+
capabilityId: "metadata.virtual_property.sql_rule_update",
|
|
894
|
+
description: "Update SQL virtual property rule.",
|
|
895
|
+
flags: [
|
|
896
|
+
projectIdFlag,
|
|
897
|
+
{ name: "sql-expression", type: "string", required: true, desc: "SQL expression used to calculate the virtual property." },
|
|
898
|
+
{ name: "v-prop", type: "json", required: true, desc: "Virtual property JSON object with prop_id/property fields." },
|
|
899
|
+
{ name: "properties", type: "json", required: false, desc: "Dependent property JSON array." },
|
|
900
|
+
{ name: "sql-event-relation-type", type: "string", required: false, desc: "relation_default, relation_always, or relation_by_setting." },
|
|
901
|
+
{ name: "related-events", type: "json", required: false, desc: "Related events JSON array when using relation_by_setting." },
|
|
902
|
+
{ name: "tag-date-policies", type: "json", required: false, desc: "Optional tag date policies JSON array." },
|
|
903
|
+
{ name: "replace-remark", type: "string", required: false, desc: "Replacement remark." },
|
|
904
|
+
{ name: "replace-suggestion", type: "string", required: false, desc: "Replacement suggestion." }
|
|
905
|
+
],
|
|
906
|
+
risk: "write",
|
|
907
|
+
buildInput: (ctx) => compactInput({
|
|
908
|
+
...projectInput(ctx),
|
|
909
|
+
sql_expression: ctx.str("sql-expression"),
|
|
910
|
+
v_prop: ctx.json("v-prop"),
|
|
911
|
+
properties: optionalJson(ctx, "properties"),
|
|
912
|
+
sql_event_relation_type: optionalString2(ctx, "sql-event-relation-type"),
|
|
913
|
+
related_events: optionalJson(ctx, "related-events"),
|
|
914
|
+
tag_date_policies: optionalJson(ctx, "tag-date-policies"),
|
|
915
|
+
replace_remark: optionalString2(ctx, "replace-remark"),
|
|
916
|
+
replace_suggestion: optionalString2(ctx, "replace-suggestion")
|
|
917
|
+
})
|
|
918
|
+
});
|
|
919
|
+
|
|
920
|
+
// src/commands/te-analysis/meta/virtual-property/sql-rule-delete.ts
|
|
921
|
+
var metadataVirtualPropertySqlRuleDelete = createAnalysisMetaCapabilityCommand({
|
|
922
|
+
resource: "virtual-property",
|
|
923
|
+
command: "sql-rule-delete",
|
|
924
|
+
capabilityId: "metadata.virtual_property.sql_rule_delete",
|
|
925
|
+
description: "Delete or revoke SQL virtual property rule.",
|
|
926
|
+
flags: [
|
|
927
|
+
projectIdFlag,
|
|
928
|
+
{ name: "v-prop-id", type: "number", required: true, desc: "Virtual property ID." },
|
|
929
|
+
{ name: "operation", type: "string", required: false, desc: "Delete operation. Use revoke to revoke instead of delete." }
|
|
930
|
+
],
|
|
931
|
+
risk: "high-risk-write",
|
|
932
|
+
buildInput: (ctx) => compactInput({ ...projectInput(ctx), v_prop_id: ctx.num("v-prop-id"), operation: optionalString2(ctx, "operation") })
|
|
933
|
+
});
|
|
934
|
+
|
|
935
|
+
// src/commands/te-analysis/meta/virtual-property/index.ts
|
|
936
|
+
var commands4 = [
|
|
937
|
+
metadataVirtualPropertyCreate,
|
|
938
|
+
metadataVirtualPropertySqlRuleUpdate,
|
|
939
|
+
metadataVirtualPropertySqlRuleDelete
|
|
940
|
+
];
|
|
941
|
+
var virtual_property_default = commands4;
|
|
942
|
+
|
|
943
|
+
// src/commands/te-analysis/meta/metric/list.ts
|
|
944
|
+
var metadataMetricList = createAnalysisMetaCapabilityCommand({
|
|
945
|
+
resource: "metric",
|
|
946
|
+
command: "list",
|
|
947
|
+
capabilityId: "metadata.metric.list",
|
|
948
|
+
description: "List project metrics.",
|
|
949
|
+
flags: [
|
|
950
|
+
projectIdFlag,
|
|
951
|
+
{ name: "ignore-authentication", type: "boolean", required: false, desc: "Whether to skip asset authentication status decoration." }
|
|
952
|
+
],
|
|
953
|
+
risk: "read",
|
|
954
|
+
buildInput: (ctx) => compactInput({ ...projectInput(ctx), ignore_authentication: optionalBoolean2(ctx, "ignore-authentication") })
|
|
955
|
+
});
|
|
956
|
+
|
|
957
|
+
// src/commands/te-analysis/meta/metric/get.ts
|
|
958
|
+
var metadataMetricGet = createAnalysisMetaCapabilityCommand({
|
|
959
|
+
resource: "metric",
|
|
960
|
+
command: "get",
|
|
961
|
+
capabilityId: "metadata.metric.get",
|
|
962
|
+
description: "Get metric definition, events, and params.",
|
|
963
|
+
flags: [
|
|
964
|
+
projectIdFlag,
|
|
965
|
+
{ name: "metric-id", type: "number", required: true, desc: "Metric ID." }
|
|
966
|
+
],
|
|
967
|
+
risk: "read",
|
|
968
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), metric_id: ctx.num("metric-id") })
|
|
969
|
+
});
|
|
970
|
+
|
|
971
|
+
// src/commands/te-analysis/meta/metric/create.ts
|
|
972
|
+
var metadataMetricCreate = createAnalysisMetaCapabilityCommand({
|
|
973
|
+
resource: "metric",
|
|
974
|
+
command: "create",
|
|
975
|
+
capabilityId: "metadata.metric.create",
|
|
976
|
+
description: "Create a metric from event or retention analysis configuration.",
|
|
977
|
+
flags: [
|
|
978
|
+
projectIdFlag,
|
|
979
|
+
{ name: "metric-name", type: "string", required: true, desc: "Metric technical name, for example pay_count." },
|
|
980
|
+
{ name: "metric-desc", type: "string", required: true, desc: "Metric display name." },
|
|
981
|
+
{ name: "metric-remark", type: "string", required: false, desc: "Metric remark." },
|
|
982
|
+
{ name: "metric-mode", type: "number", required: true, desc: "Metric model mode, for example 0 for event analysis." },
|
|
983
|
+
{ name: "metric-events", type: "json", required: true, desc: "Metric event-analysis QP JSON array." },
|
|
984
|
+
{ name: "metric-params", type: "json", required: false, desc: "Metric params JSON object. Defaults to {} in common when omitted." }
|
|
985
|
+
],
|
|
986
|
+
risk: "write",
|
|
987
|
+
buildInput: (ctx) => compactInput({
|
|
988
|
+
...projectInput(ctx),
|
|
989
|
+
metric_name: ctx.str("metric-name"),
|
|
990
|
+
metric_desc: ctx.str("metric-desc"),
|
|
991
|
+
metric_remark: optionalString2(ctx, "metric-remark"),
|
|
992
|
+
metric_mode: ctx.num("metric-mode"),
|
|
993
|
+
metric_events: ctx.json("metric-events"),
|
|
994
|
+
metric_params: optionalJson(ctx, "metric-params")
|
|
995
|
+
})
|
|
996
|
+
});
|
|
997
|
+
|
|
998
|
+
// src/commands/te-analysis/meta/metric/update.ts
|
|
999
|
+
var metadataMetricUpdate = createAnalysisMetaCapabilityCommand({
|
|
1000
|
+
resource: "metric",
|
|
1001
|
+
command: "update",
|
|
1002
|
+
capabilityId: "metadata.metric.update",
|
|
1003
|
+
description: "Update metric definition, name, and remark.",
|
|
1004
|
+
flags: [
|
|
1005
|
+
projectIdFlag,
|
|
1006
|
+
{ name: "metric-id", type: "number", required: true, desc: "Metric ID." },
|
|
1007
|
+
{ name: "metric-name", type: "string", required: false, desc: "Metric technical name for full-definition update." },
|
|
1008
|
+
{ name: "metric-desc", type: "string", required: false, desc: "Metric display name." },
|
|
1009
|
+
{ name: "metric-remark", type: "string", required: false, desc: "Metric remark." },
|
|
1010
|
+
{ name: "metric-mode", type: "number", required: false, desc: "Metric model mode for full-definition update." },
|
|
1011
|
+
{ name: "metric-events", type: "json", required: false, desc: "Metric event-analysis QP JSON array for full-definition update." },
|
|
1012
|
+
{ name: "metric-params", type: "json", required: false, desc: "Metric params JSON object." }
|
|
1013
|
+
],
|
|
1014
|
+
risk: "write",
|
|
1015
|
+
buildInput: (ctx) => compactInput({
|
|
1016
|
+
...projectInput(ctx),
|
|
1017
|
+
metric_id: ctx.num("metric-id"),
|
|
1018
|
+
metric_name: optionalString2(ctx, "metric-name"),
|
|
1019
|
+
metric_desc: optionalString2(ctx, "metric-desc"),
|
|
1020
|
+
metric_remark: optionalString2(ctx, "metric-remark"),
|
|
1021
|
+
metric_mode: optionalNumber2(ctx, "metric-mode"),
|
|
1022
|
+
metric_events: optionalJson(ctx, "metric-events"),
|
|
1023
|
+
metric_params: optionalJson(ctx, "metric-params")
|
|
1024
|
+
})
|
|
1025
|
+
});
|
|
1026
|
+
|
|
1027
|
+
// src/commands/te-analysis/meta/metric/delete.ts
|
|
1028
|
+
var metadataMetricDelete = createAnalysisMetaCapabilityCommand({
|
|
1029
|
+
resource: "metric",
|
|
1030
|
+
command: "delete",
|
|
1031
|
+
capabilityId: "metadata.metric.delete",
|
|
1032
|
+
description: "Delete a metric.",
|
|
1033
|
+
flags: [
|
|
1034
|
+
projectIdFlag,
|
|
1035
|
+
{ name: "metric-id", type: "number", required: true, desc: "Metric ID." }
|
|
1036
|
+
],
|
|
1037
|
+
risk: "high-risk-write",
|
|
1038
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), metric_id: ctx.num("metric-id") })
|
|
1039
|
+
});
|
|
1040
|
+
|
|
1041
|
+
// src/commands/te-analysis/meta/metric/index.ts
|
|
1042
|
+
var commands5 = [
|
|
1043
|
+
metadataMetricList,
|
|
1044
|
+
metadataMetricGet,
|
|
1045
|
+
metadataMetricCreate,
|
|
1046
|
+
metadataMetricUpdate,
|
|
1047
|
+
metadataMetricDelete
|
|
1048
|
+
];
|
|
1049
|
+
var metric_default = commands5;
|
|
1050
|
+
|
|
1051
|
+
// src/commands/te-analysis/meta/asset/search.ts
|
|
1052
|
+
var metadataAssetSearch = createAnalysisMetaCapabilityCommand({
|
|
1053
|
+
resource: "asset",
|
|
1054
|
+
command: "search",
|
|
1055
|
+
capabilityId: "metadata.asset.search",
|
|
1056
|
+
description: "Search project assets by keyword.",
|
|
1057
|
+
flags: [
|
|
1058
|
+
projectIdFlag,
|
|
1059
|
+
requiredPayloadFlag
|
|
1060
|
+
],
|
|
1061
|
+
risk: "read",
|
|
1062
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), payload: ctx.json("payload") })
|
|
1063
|
+
});
|
|
1064
|
+
|
|
1065
|
+
// src/commands/te-analysis/meta/asset/recent-list.ts
|
|
1066
|
+
var metadataAssetRecentList = createAnalysisMetaCapabilityCommand({
|
|
1067
|
+
resource: "asset",
|
|
1068
|
+
command: "recent-list",
|
|
1069
|
+
capabilityId: "metadata.asset.recent_list",
|
|
1070
|
+
description: "List recently visited assets for the current user.",
|
|
1071
|
+
flags: [
|
|
1072
|
+
projectIdFlag,
|
|
1073
|
+
requiredPayloadFlag
|
|
1074
|
+
],
|
|
1075
|
+
risk: "read",
|
|
1076
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), payload: ctx.json("payload") })
|
|
1077
|
+
});
|
|
1078
|
+
|
|
1079
|
+
// src/commands/te-analysis/meta/asset/authentication-list.ts
|
|
1080
|
+
var metadataAssetAuthenticationList = createAnalysisMetaCapabilityCommand({
|
|
1081
|
+
resource: "asset-authentication",
|
|
1082
|
+
command: "list",
|
|
1083
|
+
capabilityId: "metadata.asset_authentication.list",
|
|
1084
|
+
description: "List authenticatable project assets and authentication status.",
|
|
1085
|
+
flags: [
|
|
1086
|
+
projectIdFlag
|
|
1087
|
+
],
|
|
1088
|
+
risk: "read",
|
|
1089
|
+
buildInput: projectInput
|
|
1090
|
+
});
|
|
1091
|
+
|
|
1092
|
+
// src/commands/te-analysis/meta/asset/authentication-update.ts
|
|
1093
|
+
var metadataAssetAuthenticationUpdate = createAnalysisMetaCapabilityCommand({
|
|
1094
|
+
resource: "asset-authentication",
|
|
1095
|
+
command: "update",
|
|
1096
|
+
capabilityId: "metadata.asset_authentication.update",
|
|
1097
|
+
description: "Batch authenticate or unauthenticate assets.",
|
|
1098
|
+
flags: [
|
|
1099
|
+
projectIdFlag,
|
|
1100
|
+
requiredPayloadFlag
|
|
1101
|
+
],
|
|
1102
|
+
risk: "write",
|
|
1103
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), payload: ctx.json("payload") })
|
|
1104
|
+
});
|
|
1105
|
+
|
|
1106
|
+
// src/commands/te-analysis/meta/asset/abnormal-list.ts
|
|
1107
|
+
var metadataAssetAbnormalList = createAnalysisMetaCapabilityCommand({
|
|
1108
|
+
resource: "asset-abnormal",
|
|
1109
|
+
command: "list",
|
|
1110
|
+
capabilityId: "metadata.asset_abnormal.list",
|
|
1111
|
+
description: "List abnormal assets by resource type.",
|
|
1112
|
+
flags: [
|
|
1113
|
+
projectIdFlag,
|
|
1114
|
+
{ name: "resource-types", type: "string", required: true, desc: "Resource types to query." }
|
|
1115
|
+
],
|
|
1116
|
+
risk: "read",
|
|
1117
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), resource_types: ctx.str("resource-types") })
|
|
1118
|
+
});
|
|
1119
|
+
|
|
1120
|
+
// src/commands/te-analysis/meta/asset/abnormal-get.ts
|
|
1121
|
+
var metadataAssetAbnormalGet = createAnalysisMetaCapabilityCommand({
|
|
1122
|
+
resource: "asset-abnormal",
|
|
1123
|
+
command: "get",
|
|
1124
|
+
capabilityId: "metadata.asset_abnormal.get",
|
|
1125
|
+
description: "Get abnormal reason for one asset.",
|
|
1126
|
+
flags: [
|
|
1127
|
+
projectIdFlag,
|
|
1128
|
+
{ name: "resource-type", type: "string", required: true, desc: "Resource type." },
|
|
1129
|
+
{ name: "resource-id", type: "string", required: false, desc: "Resource ID." },
|
|
1130
|
+
{ name: "resource-name", type: "string", required: false, desc: "Resource name." },
|
|
1131
|
+
{ name: "table-type", type: "number", required: false, desc: "Property table type when the resource is a property." }
|
|
1132
|
+
],
|
|
1133
|
+
risk: "read",
|
|
1134
|
+
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") })
|
|
1135
|
+
});
|
|
1136
|
+
|
|
1137
|
+
// src/commands/te-analysis/meta/asset/shared.ts
|
|
1138
|
+
var nodeIdFlag = { name: "node-id", type: "string", required: false, desc: "Poseidon asset node ID." };
|
|
1139
|
+
var resourceIdFlag = { name: "resource-id", type: "string", required: false, desc: "Asset business resource ID." };
|
|
1140
|
+
var resourceTypeFlag = { name: "resource-type", type: "string", required: false, desc: "Asset resource type." };
|
|
1141
|
+
var linkInfoFlag = { name: "link-info", type: "json", required: false, desc: "Asset link_info JSON." };
|
|
1142
|
+
var searchsFlag = { name: "searchs", type: "json", required: false, desc: "Quick filter JSON array." };
|
|
1143
|
+
var ruleFlag = { name: "rule", type: "json", required: false, desc: "Governance Filter JSON object." };
|
|
1144
|
+
var operationTypeFlag = { name: "operation-type", type: "string", required: false, desc: "Batch operation type." };
|
|
1145
|
+
var ruleIdFlag = { name: "rule-id", type: "number", required: false, desc: "Governance rule ID." };
|
|
1146
|
+
var ruleNameFlag = { name: "rule-name", type: "string", required: false, desc: "Governance rule name." };
|
|
1147
|
+
var commentFlag = { name: "comment", type: "string", required: false, desc: "Governance rule comment." };
|
|
1148
|
+
var nodeIdsFlag = { name: "node-ids", type: "json", required: false, desc: "Asset node ID JSON array." };
|
|
1149
|
+
var reportsVersionFlag = { name: "reports-version", type: "number", required: false, desc: "Dashboard reports version." };
|
|
1150
|
+
var zoneOffsetFlag = { name: "zone-offset", type: "number", required: false, desc: "Dashboard zone offset." };
|
|
1151
|
+
var scheduleUiConfigFlag = { name: "schedule-ui-config", type: "json", required: false, desc: "Dashboard schedule UI config JSON." };
|
|
1152
|
+
var dashboardStatusFlag = { name: "dashboard-status", type: "string", required: false, desc: "Dashboard status." };
|
|
1153
|
+
var refreshTypeFlag = { name: "refresh-type", type: "number", required: false, desc: "Dashboard refresh type: 1 enabled, 0 disabled." };
|
|
1154
|
+
var cacheConfigFlag = { name: "cache-config", type: "json", required: false, desc: "Dashboard cache config JSON." };
|
|
1155
|
+
var toUserIdFlag = { name: "to-user-id", type: "number", required: true, desc: "Target user ID for handover." };
|
|
1156
|
+
var clearHistoryTagFlag = { name: "clear-history-tag", type: "number", required: false, desc: "Whether to clear tag history: 1 yes, 0 no." };
|
|
1157
|
+
var typeFlag = { name: "type", type: "string", required: false, desc: "Batch operation type." };
|
|
1158
|
+
var statusFlag = { name: "status", type: "json", required: false, desc: "Operation status JSON array." };
|
|
1159
|
+
var sortFieldFlag = { name: "sort-field", type: "string", required: false, desc: "Sort field." };
|
|
1160
|
+
var sortOrderFlag = { name: "sort-order", type: "string", required: false, desc: "Sort order: asc or desc." };
|
|
1161
|
+
var recordIdFlag = { name: "record-id", type: "number", required: false, desc: "Operation record ID." };
|
|
1162
|
+
var readers = {
|
|
1163
|
+
node_id: (ctx) => optionalString2(ctx, "node-id"),
|
|
1164
|
+
resource_id: (ctx) => optionalString2(ctx, "resource-id"),
|
|
1165
|
+
resource_type: (ctx) => optionalString2(ctx, "resource-type"),
|
|
1166
|
+
link_info: (ctx) => optionalJson(ctx, "link-info"),
|
|
1167
|
+
query: (ctx) => optionalString2(ctx, "query"),
|
|
1168
|
+
searchs: (ctx) => optionalJson(ctx, "searchs"),
|
|
1169
|
+
rule: (ctx) => optionalJson(ctx, "rule"),
|
|
1170
|
+
operation_type: (ctx) => optionalString2(ctx, "operation-type"),
|
|
1171
|
+
rule_id: (ctx) => optionalNumber2(ctx, "rule-id"),
|
|
1172
|
+
rule_name: (ctx) => optionalString2(ctx, "rule-name"),
|
|
1173
|
+
comment: (ctx) => optionalString2(ctx, "comment"),
|
|
1174
|
+
node_ids: (ctx) => optionalJsonArray(ctx, "node-ids"),
|
|
1175
|
+
reports_version: (ctx) => optionalNumber2(ctx, "reports-version"),
|
|
1176
|
+
zone_offset: (ctx) => optionalNumber2(ctx, "zone-offset"),
|
|
1177
|
+
schedule_ui_config: (ctx) => optionalJson(ctx, "schedule-ui-config"),
|
|
1178
|
+
dashboard_status: (ctx) => optionalString2(ctx, "dashboard-status"),
|
|
1179
|
+
refresh_type: (ctx) => optionalNumber2(ctx, "refresh-type"),
|
|
1180
|
+
cache_config: (ctx) => optionalJson(ctx, "cache-config"),
|
|
1181
|
+
to_user_id: (ctx) => optionalNumber2(ctx, "to-user-id"),
|
|
1182
|
+
clear_history_tag: (ctx) => optionalNumber2(ctx, "clear-history-tag"),
|
|
1183
|
+
type: (ctx) => optionalString2(ctx, "type"),
|
|
1184
|
+
status: (ctx) => optionalJson(ctx, "status"),
|
|
1185
|
+
sort_field: (ctx) => optionalString2(ctx, "sort-field"),
|
|
1186
|
+
sort_order: (ctx) => optionalString2(ctx, "sort-order"),
|
|
1187
|
+
record_id: (ctx) => optionalNumber2(ctx, "record-id"),
|
|
1188
|
+
limit: (ctx) => optionalNumber2(ctx, "limit"),
|
|
1189
|
+
offset: (ctx) => optionalNumber2(ctx, "offset")
|
|
1190
|
+
};
|
|
1191
|
+
function assetGovernanceInput(ctx, fields) {
|
|
1192
|
+
const input = {
|
|
1193
|
+
...projectInput(ctx),
|
|
1194
|
+
payload: optionalJson(ctx, "payload")
|
|
1195
|
+
};
|
|
1196
|
+
for (const field of fields) {
|
|
1197
|
+
input[field] = readers[field]?.(ctx);
|
|
1198
|
+
}
|
|
1199
|
+
return compactInput(input);
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
// src/commands/te-analysis/meta/asset/url-get.ts
|
|
1203
|
+
var analysisMetaAssetUrlGet = createAnalysisMetaCapabilityCommand({
|
|
1204
|
+
resource: "asset",
|
|
1205
|
+
command: "url-get",
|
|
1206
|
+
capabilityId: "analysis_meta.asset_url.get",
|
|
1207
|
+
description: "Get or normalize an asset governance resource link payload.",
|
|
1208
|
+
flags: [projectIdFlag, nodeIdFlag, resourceIdFlag, resourceTypeFlag, linkInfoFlag, payloadFlag],
|
|
1209
|
+
risk: "read",
|
|
1210
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["node_id", "resource_id", "resource_type", "link_info"])
|
|
1211
|
+
});
|
|
1212
|
+
|
|
1213
|
+
// src/commands/te-analysis/meta/asset/index.ts
|
|
1214
|
+
var commands6 = [
|
|
1215
|
+
metadataAssetSearch,
|
|
1216
|
+
metadataAssetRecentList,
|
|
1217
|
+
metadataAssetAuthenticationList,
|
|
1218
|
+
metadataAssetAuthenticationUpdate,
|
|
1219
|
+
metadataAssetAbnormalList,
|
|
1220
|
+
metadataAssetAbnormalGet,
|
|
1221
|
+
analysisMetaAssetUrlGet
|
|
1222
|
+
];
|
|
1223
|
+
var asset_default = commands6;
|
|
1224
|
+
|
|
1225
|
+
// src/commands/te-analysis/meta/exchange/config-update.ts
|
|
1226
|
+
var metadataExchangeConfigUpdate = createAnalysisMetaCapabilityCommand({
|
|
1227
|
+
resource: "exchange",
|
|
1228
|
+
command: "config-update",
|
|
1229
|
+
capabilityId: "metadata.exchange_config.update",
|
|
1230
|
+
description: "Update exchange-rate configuration switch or value.",
|
|
1231
|
+
flags: [
|
|
1232
|
+
projectIdFlag,
|
|
1233
|
+
{ name: "config-val", type: "string", required: true, desc: "Exchange-rate configuration value." }
|
|
1234
|
+
],
|
|
1235
|
+
risk: "write",
|
|
1236
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), config_val: ctx.str("config-val") })
|
|
1237
|
+
});
|
|
1238
|
+
|
|
1239
|
+
// src/commands/te-analysis/meta/exchange/rule-list.ts
|
|
1240
|
+
var metadataExchangeRuleList = createAnalysisMetaCapabilityCommand({
|
|
1241
|
+
resource: "exchange",
|
|
1242
|
+
command: "rule-list",
|
|
1243
|
+
capabilityId: "metadata.exchange_rule.list",
|
|
1244
|
+
description: "List exchange-rate conversion rules.",
|
|
1245
|
+
flags: [
|
|
1246
|
+
projectIdFlag
|
|
1247
|
+
],
|
|
1248
|
+
risk: "read",
|
|
1249
|
+
buildInput: projectInput
|
|
1250
|
+
});
|
|
1251
|
+
|
|
1252
|
+
// src/commands/te-analysis/meta/exchange/rule-validate.ts
|
|
1253
|
+
var metadataExchangeRuleValidate = createAnalysisMetaCapabilityCommand({
|
|
1254
|
+
resource: "exchange",
|
|
1255
|
+
command: "rule-validate",
|
|
1256
|
+
capabilityId: "metadata.exchange_rule.validate",
|
|
1257
|
+
description: "Validate affected range before saving exchange-rate rules.",
|
|
1258
|
+
flags: [
|
|
1259
|
+
projectIdFlag,
|
|
1260
|
+
requiredPayloadFlag
|
|
1261
|
+
],
|
|
1262
|
+
risk: "read",
|
|
1263
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), payload: ctx.json("payload") })
|
|
1264
|
+
});
|
|
1265
|
+
|
|
1266
|
+
// src/commands/te-analysis/meta/exchange/rule-update.ts
|
|
1267
|
+
var metadataExchangeRuleUpdate = createAnalysisMetaCapabilityCommand({
|
|
1268
|
+
resource: "exchange",
|
|
1269
|
+
command: "rule-update",
|
|
1270
|
+
capabilityId: "metadata.exchange_rule.update",
|
|
1271
|
+
description: "Save currency field, amount field, and target currency rules.",
|
|
1272
|
+
flags: [
|
|
1273
|
+
projectIdFlag,
|
|
1274
|
+
requiredPayloadFlag
|
|
1275
|
+
],
|
|
1276
|
+
risk: "write",
|
|
1277
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), payload: ctx.json("payload") })
|
|
1278
|
+
});
|
|
1279
|
+
|
|
1280
|
+
// src/commands/te-analysis/meta/exchange/rate-refresh.ts
|
|
1281
|
+
var metadataExchangeRateRefresh = createAnalysisMetaCapabilityCommand({
|
|
1282
|
+
resource: "exchange",
|
|
1283
|
+
command: "rate-refresh",
|
|
1284
|
+
capabilityId: "metadata.exchange_rate.refresh",
|
|
1285
|
+
description: "Refresh exchange-rate data manually.",
|
|
1286
|
+
flags: [
|
|
1287
|
+
projectIdFlag
|
|
1288
|
+
],
|
|
1289
|
+
risk: "write",
|
|
1290
|
+
buildInput: projectInput
|
|
1291
|
+
});
|
|
1292
|
+
|
|
1293
|
+
// src/commands/te-analysis/meta/exchange/index.ts
|
|
1294
|
+
var commands7 = [
|
|
1295
|
+
metadataExchangeConfigUpdate,
|
|
1296
|
+
metadataExchangeRuleList,
|
|
1297
|
+
metadataExchangeRuleValidate,
|
|
1298
|
+
metadataExchangeRuleUpdate,
|
|
1299
|
+
metadataExchangeRateRefresh
|
|
1300
|
+
];
|
|
1301
|
+
var exchange_default = commands7;
|
|
1302
|
+
|
|
1303
|
+
// src/commands/te-analysis/meta/super-metadata/export.ts
|
|
1304
|
+
var metadataSuperMetadataExport = createAnalysisMetaCapabilityCommand({
|
|
1305
|
+
resource: "event-property-bundle",
|
|
1306
|
+
command: "export",
|
|
1307
|
+
capabilityId: "metadata.event_property_bundle.export",
|
|
1308
|
+
description: "Export super event and super property configuration as an asynchronous XLSX artifact.",
|
|
1309
|
+
flags: [
|
|
1310
|
+
projectIdFlag,
|
|
1311
|
+
{ name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
|
|
1312
|
+
{ name: "timeout-seconds", type: "number", required: false, desc: "Export timeout seconds. Default and max: 21600 (6 hours).", min: 1, max: 21600 }
|
|
1313
|
+
],
|
|
1314
|
+
risk: "read",
|
|
1315
|
+
buildInput: (ctx) => compactInput({
|
|
1316
|
+
...projectInput(ctx),
|
|
1317
|
+
request_id: optionalString2(ctx, "request-id"),
|
|
1318
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
|
|
1319
|
+
})
|
|
1320
|
+
});
|
|
1321
|
+
|
|
1322
|
+
// src/commands/te-analysis/meta/super-metadata/import.ts
|
|
1323
|
+
var metadataSuperMetadataImport = createAnalysisMetaCapabilityCommand({
|
|
1324
|
+
resource: "event-property-bundle",
|
|
1325
|
+
command: "import",
|
|
1326
|
+
capabilityId: "metadata.event_property_bundle.import",
|
|
1327
|
+
description: "Pre-import and confirm-import super event and super property configuration.",
|
|
1328
|
+
flags: [
|
|
1329
|
+
projectIdFlag,
|
|
1330
|
+
{ name: "operation", type: "string", required: true, desc: "Import step: pre_import or ensure_import." },
|
|
1331
|
+
{ name: "input-file-id", type: "string", required: false, desc: "Uploaded XLSX input file ID for pre_import. Upload with purpose=event_property_bundle.import.xlsx." },
|
|
1332
|
+
{ name: "pre-import-meta-uuid", type: "string", required: false, desc: "UUID returned by pre_import, required for ensure_import." }
|
|
1333
|
+
],
|
|
1334
|
+
risk: "write",
|
|
1335
|
+
buildInput: (ctx) => compactInput({
|
|
1336
|
+
...projectInput(ctx),
|
|
1337
|
+
operation: ctx.str("operation"),
|
|
1338
|
+
input_file_id: optionalString2(ctx, "input-file-id"),
|
|
1339
|
+
pre_import_meta_uuid: optionalString2(ctx, "pre-import-meta-uuid")
|
|
1340
|
+
})
|
|
1341
|
+
});
|
|
1342
|
+
|
|
1343
|
+
// src/commands/te-analysis/meta/super-metadata/index.ts
|
|
1344
|
+
var commands8 = [
|
|
1345
|
+
metadataSuperMetadataExport,
|
|
1346
|
+
metadataSuperMetadataImport
|
|
1347
|
+
];
|
|
1348
|
+
var super_metadata_default = commands8;
|
|
1349
|
+
|
|
1350
|
+
// src/commands/te-analysis/meta/datatable/columns-get.ts
|
|
1351
|
+
var metadataDataTableColumnsGet = createAnalysisMetaCapabilityCommand({
|
|
1352
|
+
resource: "datatable",
|
|
1353
|
+
command: "columns-get",
|
|
1354
|
+
capabilityId: "metadata.data_table.columns_get",
|
|
1355
|
+
description: "Get columns for a project table reference.",
|
|
1356
|
+
flags: [
|
|
1357
|
+
projectIdFlag,
|
|
1358
|
+
{ name: "table-ref", type: "string", required: true, desc: "Project table reference." }
|
|
1359
|
+
],
|
|
1360
|
+
risk: "read",
|
|
1361
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), table_ref: ctx.str("table-ref") })
|
|
1362
|
+
});
|
|
1363
|
+
|
|
1364
|
+
// src/commands/te-analysis/meta/datatable/influence-list.ts
|
|
1365
|
+
var metadataDataTableInfluenceList = createAnalysisMetaCapabilityCommand({
|
|
1366
|
+
resource: "datatable",
|
|
1367
|
+
command: "influence-list",
|
|
1368
|
+
capabilityId: "metadata.data_table.influence_list",
|
|
1369
|
+
description: "List metadata and assets affected by data table deletion or column changes.",
|
|
1370
|
+
flags: [
|
|
1371
|
+
projectIdFlag,
|
|
1372
|
+
{ name: "datatable-id", type: "number", required: true, desc: "Data table ID." }
|
|
1373
|
+
],
|
|
1374
|
+
risk: "read",
|
|
1375
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), datatable_id: ctx.num("datatable-id") })
|
|
1376
|
+
});
|
|
1377
|
+
|
|
1378
|
+
// src/commands/te-analysis/meta/datatable/version-list.ts
|
|
1379
|
+
var metadataDataTableVersionList = createAnalysisMetaCapabilityCommand({
|
|
1380
|
+
resource: "datatable",
|
|
1381
|
+
command: "version-list",
|
|
1382
|
+
capabilityId: "metadata.data_table_version.list",
|
|
1383
|
+
description: "List data table historical versions.",
|
|
1384
|
+
flags: [
|
|
1385
|
+
projectIdFlag,
|
|
1386
|
+
{ name: "datatable-id", type: "number", required: true, desc: "Data table ID." }
|
|
1387
|
+
],
|
|
1388
|
+
risk: "read",
|
|
1389
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), datatable_id: ctx.num("datatable-id") })
|
|
1390
|
+
});
|
|
1391
|
+
|
|
1392
|
+
// src/commands/te-analysis/meta/datatable/version-get.ts
|
|
1393
|
+
var metadataDataTableVersionGet = createAnalysisMetaCapabilityCommand({
|
|
1394
|
+
resource: "datatable",
|
|
1395
|
+
command: "version-get",
|
|
1396
|
+
capabilityId: "metadata.data_table_version.get",
|
|
1397
|
+
description: "Get data table version detail.",
|
|
1398
|
+
flags: [
|
|
1399
|
+
projectIdFlag,
|
|
1400
|
+
{ name: "version-id", type: "number", required: true, desc: "Data table version ID." }
|
|
1401
|
+
],
|
|
1402
|
+
risk: "read",
|
|
1403
|
+
buildInput: (ctx) => ({ ...projectInput(ctx), version_id: ctx.num("version-id") })
|
|
1404
|
+
});
|
|
1405
|
+
|
|
1406
|
+
// src/commands/te-analysis/meta/datatable/index.ts
|
|
1407
|
+
var commands9 = [
|
|
1408
|
+
metadataDataTableColumnsGet,
|
|
1409
|
+
metadataDataTableInfluenceList,
|
|
1410
|
+
metadataDataTableVersionList,
|
|
1411
|
+
metadataDataTableVersionGet
|
|
1412
|
+
];
|
|
1413
|
+
var datatable_default = commands9;
|
|
1414
|
+
|
|
1415
|
+
// src/commands/te-analysis/meta/index.ts
|
|
1416
|
+
var commands10 = [
|
|
1417
|
+
getAlertDefinitionSchema,
|
|
1418
|
+
listAlerts,
|
|
1419
|
+
getAlert,
|
|
1420
|
+
createAlert,
|
|
1421
|
+
updateAlert,
|
|
1422
|
+
deleteAlert,
|
|
1423
|
+
...event_default,
|
|
1424
|
+
...property_default,
|
|
1425
|
+
...virtual_event_default,
|
|
1426
|
+
...virtual_property_default,
|
|
1427
|
+
...metric_default,
|
|
1428
|
+
...asset_default,
|
|
1429
|
+
...exchange_default,
|
|
1430
|
+
...super_metadata_default,
|
|
1431
|
+
...datatable_default
|
|
1432
|
+
];
|
|
1433
|
+
var meta_default = commands10;
|
|
1434
|
+
|
|
1435
|
+
// src/commands/te-analysis/meta/asset/usage-list.ts
|
|
1436
|
+
var analysisMetaAssetUsageList = createAnalysisGovernanceCapabilityCommand({
|
|
1437
|
+
resource: "asset",
|
|
1438
|
+
command: "list",
|
|
1439
|
+
capabilityId: "governance.asset.list",
|
|
1440
|
+
description: "List assets for usage governance.",
|
|
1441
|
+
flags: [projectIdFlag, queryFlag, searchsFlag, ruleFlag, operationTypeFlag, directoryLimitFlag, offsetFlag, payloadFlag],
|
|
1442
|
+
risk: "read",
|
|
1443
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["query", "searchs", "rule", "operation_type", "limit", "offset"])
|
|
1444
|
+
});
|
|
1445
|
+
|
|
1446
|
+
// src/commands/te-analysis/meta/asset/usage-export.ts
|
|
1447
|
+
var analysisMetaAssetUsageExport = createAnalysisGovernanceCapabilityCommand({
|
|
1448
|
+
resource: "asset",
|
|
1449
|
+
command: "export",
|
|
1450
|
+
capabilityId: "governance.asset.export",
|
|
1451
|
+
description: "Export asset usage governance rows as an inline gateway result.",
|
|
1452
|
+
flags: [projectIdFlag, queryFlag, searchsFlag, ruleFlag, operationTypeFlag, limitFlag, offsetFlag, payloadFlag],
|
|
1453
|
+
risk: "read",
|
|
1454
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["query", "searchs", "rule", "operation_type", "limit", "offset"])
|
|
1455
|
+
});
|
|
1456
|
+
|
|
1457
|
+
// src/commands/te-analysis/meta/asset/lineage-get.ts
|
|
1458
|
+
var analysisMetaAssetLineageGet = createAnalysisGovernanceCapabilityCommand({
|
|
1459
|
+
resource: "asset-lineage",
|
|
1460
|
+
command: "get",
|
|
1461
|
+
capabilityId: "governance.asset_lineage.get",
|
|
1462
|
+
description: "Get an asset lineage tree.",
|
|
1463
|
+
flags: [projectIdFlag, nodeIdFlag, payloadFlag],
|
|
1464
|
+
risk: "read",
|
|
1465
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["node_id"])
|
|
1466
|
+
});
|
|
1467
|
+
|
|
1468
|
+
// src/commands/te-analysis/meta/asset/dependency-list.ts
|
|
1469
|
+
var analysisMetaAssetDependencyList = createAnalysisGovernanceCapabilityCommand({
|
|
1470
|
+
resource: "asset-dependency",
|
|
1471
|
+
command: "list",
|
|
1472
|
+
capabilityId: "governance.asset_dependency.list",
|
|
1473
|
+
description: "List upstream dependencies for one asset.",
|
|
1474
|
+
flags: [projectIdFlag, nodeIdFlag, queryFlag, searchsFlag, ruleFlag, directoryLimitFlag, offsetFlag, payloadFlag],
|
|
1475
|
+
risk: "read",
|
|
1476
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["node_id", "query", "searchs", "rule", "limit", "offset"])
|
|
1477
|
+
});
|
|
1478
|
+
|
|
1479
|
+
// src/commands/te-analysis/meta/asset/impact-list.ts
|
|
1480
|
+
var analysisMetaAssetImpactList = createAnalysisGovernanceCapabilityCommand({
|
|
1481
|
+
resource: "asset-impact",
|
|
1482
|
+
command: "list",
|
|
1483
|
+
capabilityId: "governance.asset_impact.list",
|
|
1484
|
+
description: "List downstream impacts for one asset.",
|
|
1485
|
+
flags: [projectIdFlag, nodeIdFlag, queryFlag, searchsFlag, ruleFlag, directoryLimitFlag, offsetFlag, payloadFlag],
|
|
1486
|
+
risk: "read",
|
|
1487
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["node_id", "query", "searchs", "rule", "limit", "offset"])
|
|
1488
|
+
});
|
|
1489
|
+
|
|
1490
|
+
// src/commands/te-analysis/meta/asset/query-history-list.ts
|
|
1491
|
+
var analysisMetaAssetQueryHistoryList = createAnalysisGovernanceCapabilityCommand({
|
|
1492
|
+
resource: "asset-query-history",
|
|
1493
|
+
command: "list",
|
|
1494
|
+
capabilityId: "governance.asset_query_history.list",
|
|
1495
|
+
description: "List query history for one asset.",
|
|
1496
|
+
flags: [projectIdFlag, nodeIdFlag, queryFlag, searchsFlag, ruleFlag, directoryLimitFlag, offsetFlag, payloadFlag],
|
|
1497
|
+
risk: "read",
|
|
1498
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["node_id", "query", "searchs", "rule", "limit", "offset"])
|
|
1499
|
+
});
|
|
1500
|
+
|
|
1501
|
+
// src/commands/te-analysis/meta/asset/rule-schema.ts
|
|
1502
|
+
var analysisMetaAssetRuleSchema = createAnalysisGovernanceCapabilityCommand({
|
|
1503
|
+
resource: "rule",
|
|
1504
|
+
command: "schema",
|
|
1505
|
+
capabilityId: "governance.rule.schema",
|
|
1506
|
+
description: "Get asset governance rule field schema.",
|
|
1507
|
+
flags: [projectIdFlag, payloadFlag],
|
|
1508
|
+
risk: "read",
|
|
1509
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, [])
|
|
1510
|
+
});
|
|
1511
|
+
|
|
1512
|
+
// src/commands/te-analysis/meta/asset/rule-list.ts
|
|
1513
|
+
var analysisMetaAssetRuleList = createAnalysisGovernanceCapabilityCommand({
|
|
1514
|
+
resource: "rule",
|
|
1515
|
+
command: "list",
|
|
1516
|
+
capabilityId: "governance.rule.list",
|
|
1517
|
+
description: "List asset governance rules.",
|
|
1518
|
+
flags: [projectIdFlag, payloadFlag],
|
|
1519
|
+
risk: "read",
|
|
1520
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, [])
|
|
1521
|
+
});
|
|
1522
|
+
|
|
1523
|
+
// src/commands/te-analysis/meta/asset/rule-create.ts
|
|
1524
|
+
var analysisMetaAssetRuleCreate = createAnalysisGovernanceCapabilityCommand({
|
|
1525
|
+
resource: "rule",
|
|
1526
|
+
command: "create",
|
|
1527
|
+
capabilityId: "governance.rule.create",
|
|
1528
|
+
description: "Create an asset governance rule.",
|
|
1529
|
+
flags: [projectIdFlag, ruleNameFlag, commentFlag, ruleFlag, payloadFlag],
|
|
1530
|
+
risk: "write",
|
|
1531
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["rule_name", "comment", "rule"])
|
|
1532
|
+
});
|
|
1533
|
+
|
|
1534
|
+
// src/commands/te-analysis/meta/asset/rule-update.ts
|
|
1535
|
+
var analysisMetaAssetRuleUpdate = createAnalysisGovernanceCapabilityCommand({
|
|
1536
|
+
resource: "rule",
|
|
1537
|
+
command: "update",
|
|
1538
|
+
capabilityId: "governance.rule.update",
|
|
1539
|
+
description: "Update an asset governance rule.",
|
|
1540
|
+
flags: [projectIdFlag, ruleIdFlag, ruleNameFlag, commentFlag, ruleFlag, payloadFlag],
|
|
1541
|
+
risk: "write",
|
|
1542
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["rule_id", "rule_name", "comment", "rule"])
|
|
1543
|
+
});
|
|
1544
|
+
|
|
1545
|
+
// src/commands/te-analysis/meta/asset/rule-delete.ts
|
|
1546
|
+
var analysisMetaAssetRuleDelete = createAnalysisGovernanceCapabilityCommand({
|
|
1547
|
+
resource: "rule",
|
|
1548
|
+
command: "delete",
|
|
1549
|
+
capabilityId: "governance.rule.delete",
|
|
1550
|
+
description: "Delete an asset governance rule.",
|
|
1551
|
+
flags: [projectIdFlag, ruleIdFlag, payloadFlag],
|
|
1552
|
+
risk: "high-risk-write",
|
|
1553
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["rule_id"])
|
|
1554
|
+
});
|
|
1555
|
+
|
|
1556
|
+
// src/commands/te-analysis/meta/asset/batch-info-export.ts
|
|
1557
|
+
var analysisMetaAssetBatchInfoExport = createAnalysisGovernanceCapabilityCommand({
|
|
1558
|
+
resource: "asset",
|
|
1559
|
+
command: "batch-info-export",
|
|
1560
|
+
capabilityId: "governance.asset.batch_export_info",
|
|
1561
|
+
description: "Batch export asset information.",
|
|
1562
|
+
flags: [projectIdFlag, nodeIdsFlag, reportsVersionFlag, zoneOffsetFlag, scheduleUiConfigFlag, dashboardStatusFlag, refreshTypeFlag, cacheConfigFlag, clearHistoryTagFlag, payloadFlag],
|
|
1563
|
+
risk: "read",
|
|
1564
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["node_ids", "reports_version", "zone_offset", "schedule_ui_config", "dashboard_status", "refresh_type", "cache_config", "clear_history_tag"])
|
|
1565
|
+
});
|
|
1566
|
+
|
|
1567
|
+
// src/commands/te-analysis/meta/asset/batch-sql-export.ts
|
|
1568
|
+
var analysisMetaAssetBatchSqlExport = createAnalysisGovernanceCapabilityCommand({
|
|
1569
|
+
resource: "asset",
|
|
1570
|
+
command: "batch-sql-export",
|
|
1571
|
+
capabilityId: "governance.asset.batch_export_sql",
|
|
1572
|
+
description: "Batch export asset SQL definitions.",
|
|
1573
|
+
flags: [projectIdFlag, nodeIdsFlag, reportsVersionFlag, zoneOffsetFlag, scheduleUiConfigFlag, dashboardStatusFlag, refreshTypeFlag, cacheConfigFlag, clearHistoryTagFlag, payloadFlag],
|
|
1574
|
+
risk: "read",
|
|
1575
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["node_ids", "reports_version", "zone_offset", "schedule_ui_config", "dashboard_status", "refresh_type", "cache_config", "clear_history_tag"])
|
|
1576
|
+
});
|
|
1577
|
+
|
|
1578
|
+
// src/commands/te-analysis/meta/asset/batch-delete.ts
|
|
1579
|
+
var analysisMetaAssetBatchDelete = createAnalysisGovernanceCapabilityCommand({
|
|
1580
|
+
resource: "asset",
|
|
1581
|
+
command: "batch-delete",
|
|
1582
|
+
capabilityId: "governance.asset.batch_delete",
|
|
1583
|
+
description: "Batch delete governed assets.",
|
|
1584
|
+
flags: [projectIdFlag, nodeIdsFlag, payloadFlag],
|
|
1585
|
+
risk: "high-risk-write",
|
|
1586
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["node_ids"])
|
|
1587
|
+
});
|
|
1588
|
+
|
|
1589
|
+
// src/commands/te-analysis/meta/asset/batch-disable-auto-update.ts
|
|
1590
|
+
var analysisMetaAssetBatchDisableAutoUpdate = createAnalysisGovernanceCapabilityCommand({
|
|
1591
|
+
resource: "asset",
|
|
1592
|
+
command: "batch-disable-auto-update",
|
|
1593
|
+
capabilityId: "governance.asset.batch_disable_auto_update",
|
|
1594
|
+
description: "Batch disable auto update for assets.",
|
|
1595
|
+
flags: [projectIdFlag, nodeIdsFlag, refreshTypeFlag, payloadFlag],
|
|
1596
|
+
risk: "write",
|
|
1597
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["node_ids", "refresh_type"])
|
|
1598
|
+
});
|
|
1599
|
+
|
|
1600
|
+
// src/commands/te-analysis/meta/asset/batch-disable-auto-backup.ts
|
|
1601
|
+
var analysisMetaAssetBatchDisableAutoBackup = createAnalysisGovernanceCapabilityCommand({
|
|
1602
|
+
resource: "asset",
|
|
1603
|
+
command: "batch-disable-auto-backup",
|
|
1604
|
+
capabilityId: "governance.asset.batch_disable_auto_backup",
|
|
1605
|
+
description: "Batch disable auto backup for assets.",
|
|
1606
|
+
flags: [projectIdFlag, nodeIdsFlag, clearHistoryTagFlag, payloadFlag],
|
|
1607
|
+
risk: "write",
|
|
1608
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["node_ids", "clear_history_tag"])
|
|
1609
|
+
});
|
|
1610
|
+
|
|
1611
|
+
// src/commands/te-analysis/meta/asset/batch-dashboard-schedule-freeze.ts
|
|
1612
|
+
var analysisMetaAssetBatchDashboardScheduleFreeze = createAnalysisGovernanceCapabilityCommand({
|
|
1613
|
+
resource: "asset",
|
|
1614
|
+
command: "batch-dashboard-schedule-freeze",
|
|
1615
|
+
capabilityId: "governance.asset.batch_dashboard_schedule_freeze",
|
|
1616
|
+
description: "Batch freeze dashboard schedules for governed assets.",
|
|
1617
|
+
flags: [projectIdFlag, nodeIdsFlag, reportsVersionFlag, zoneOffsetFlag, scheduleUiConfigFlag, dashboardStatusFlag, refreshTypeFlag, cacheConfigFlag, payloadFlag],
|
|
1618
|
+
risk: "write",
|
|
1619
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["node_ids", "reports_version", "zone_offset", "schedule_ui_config", "dashboard_status", "refresh_type", "cache_config"])
|
|
1620
|
+
});
|
|
1621
|
+
|
|
1622
|
+
// src/commands/te-analysis/meta/asset/batch-handover.ts
|
|
1623
|
+
var analysisMetaAssetBatchHandover = createAnalysisGovernanceCapabilityCommand({
|
|
1624
|
+
resource: "asset",
|
|
1625
|
+
command: "batch-handover",
|
|
1626
|
+
capabilityId: "governance.asset.batch_handover",
|
|
1627
|
+
description: "Batch hand over governed assets to another user.",
|
|
1628
|
+
flags: [projectIdFlag, nodeIdsFlag, toUserIdFlag, payloadFlag],
|
|
1629
|
+
risk: "write",
|
|
1630
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["node_ids", "to_user_id"])
|
|
1631
|
+
});
|
|
1632
|
+
|
|
1633
|
+
// src/commands/te-analysis/meta/asset/operation-record-list.ts
|
|
1634
|
+
var analysisMetaAssetOperationRecordList = createAnalysisGovernanceCapabilityCommand({
|
|
1635
|
+
resource: "operation-record",
|
|
1636
|
+
command: "list",
|
|
1637
|
+
capabilityId: "governance.operation_record.list",
|
|
1638
|
+
description: "List asset batch operation records.",
|
|
1639
|
+
flags: [projectIdFlag, typeFlag, statusFlag, queryFlag, sortFieldFlag, sortOrderFlag, directoryLimitFlag, offsetFlag, payloadFlag],
|
|
1640
|
+
risk: "read",
|
|
1641
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["type", "status", "query", "sort_field", "sort_order", "limit", "offset"])
|
|
1642
|
+
});
|
|
1643
|
+
|
|
1644
|
+
// src/commands/te-analysis/meta/asset/operation-record-export.ts
|
|
1645
|
+
var analysisMetaAssetOperationRecordExport = createAnalysisGovernanceCapabilityCommand({
|
|
1646
|
+
resource: "operation-record",
|
|
1647
|
+
command: "export",
|
|
1648
|
+
capabilityId: "governance.operation_record.export",
|
|
1649
|
+
description: "Export one asset batch operation record result.",
|
|
1650
|
+
flags: [projectIdFlag, recordIdFlag, payloadFlag],
|
|
1651
|
+
risk: "read",
|
|
1652
|
+
buildInput: (ctx) => assetGovernanceInput(ctx, ["record_id"])
|
|
1653
|
+
});
|
|
1654
|
+
|
|
1655
|
+
// src/commands/te-analysis/governance/index.ts
|
|
1656
|
+
var commands11 = [
|
|
1657
|
+
analysisMetaAssetUsageList,
|
|
1658
|
+
analysisMetaAssetUsageExport,
|
|
1659
|
+
analysisMetaAssetBatchInfoExport,
|
|
1660
|
+
analysisMetaAssetBatchSqlExport,
|
|
1661
|
+
analysisMetaAssetBatchDelete,
|
|
1662
|
+
analysisMetaAssetBatchDisableAutoUpdate,
|
|
1663
|
+
analysisMetaAssetBatchDisableAutoBackup,
|
|
1664
|
+
analysisMetaAssetBatchDashboardScheduleFreeze,
|
|
1665
|
+
analysisMetaAssetBatchHandover,
|
|
1666
|
+
analysisMetaAssetLineageGet,
|
|
1667
|
+
analysisMetaAssetDependencyList,
|
|
1668
|
+
analysisMetaAssetImpactList,
|
|
1669
|
+
analysisMetaAssetQueryHistoryList,
|
|
1670
|
+
analysisMetaAssetRuleSchema,
|
|
1671
|
+
analysisMetaAssetRuleList,
|
|
1672
|
+
analysisMetaAssetRuleCreate,
|
|
1673
|
+
analysisMetaAssetRuleUpdate,
|
|
1674
|
+
analysisMetaAssetRuleDelete,
|
|
1675
|
+
analysisMetaAssetOperationRecordList,
|
|
1676
|
+
analysisMetaAssetOperationRecordExport
|
|
1677
|
+
];
|
|
1678
|
+
var governance_default = commands11;
|
|
1679
|
+
|
|
1680
|
+
// src/commands/te-analysis/report/list.ts
|
|
1681
|
+
var reportList = createAnalysisCapabilityCommand({
|
|
1682
|
+
resource: "report",
|
|
1683
|
+
command: "list",
|
|
1684
|
+
capabilityId: "analysis.report.list",
|
|
1685
|
+
description: "List analysis reports visible to the current user through the capability gateway.",
|
|
1686
|
+
flags: [projectIdFlag, queryFlag, fieldsFlag, reportModelTypesFlag, reportListLimitFlag, offsetFlag],
|
|
1687
|
+
risk: "read",
|
|
1688
|
+
buildInput: reportListInput
|
|
1689
|
+
});
|
|
1690
|
+
|
|
1691
|
+
// src/commands/te-analysis/report/list-export.ts
|
|
1692
|
+
var reportListExport = createAnalysisCapabilityCommand({
|
|
1693
|
+
resource: "report",
|
|
1694
|
+
command: "list-export",
|
|
1695
|
+
capabilityId: "analysis.report.list_export",
|
|
1696
|
+
description: "Export the accessible report catalog as a gzip artifact.",
|
|
1697
|
+
flags: [
|
|
1698
|
+
projectIdFlag,
|
|
1699
|
+
queryFlag,
|
|
1700
|
+
fieldsFlag,
|
|
1701
|
+
reportModelTypesFlag,
|
|
1702
|
+
requestIdFlag,
|
|
1703
|
+
artifactFormatFlag,
|
|
1704
|
+
asyncTimeoutSecondsFlag
|
|
1705
|
+
],
|
|
1706
|
+
risk: "read",
|
|
1707
|
+
buildInput: (ctx) => compactInput({
|
|
1708
|
+
...projectInput(ctx),
|
|
1709
|
+
query: optionalString2(ctx, "query"),
|
|
1710
|
+
fields: optionalJson(ctx, "fields"),
|
|
1711
|
+
model_types: optionalJson(ctx, "model-types"),
|
|
1712
|
+
...exportLifecycleInput(ctx)
|
|
1713
|
+
})
|
|
1714
|
+
});
|
|
1715
|
+
|
|
1716
|
+
// src/commands/te-analysis/report/get.ts
|
|
1717
|
+
var reportGet = createAnalysisCapabilityCommand({
|
|
1718
|
+
resource: "report",
|
|
1719
|
+
command: "get",
|
|
1720
|
+
capabilityId: "analysis.report.get",
|
|
1721
|
+
description: "Get one analysis report definition as AI QP without executing report data.",
|
|
1722
|
+
flags: [projectIdFlag, { name: "report-id", type: "number", required: true, desc: "Report ID." }],
|
|
1723
|
+
risk: "read",
|
|
1724
|
+
buildInput: (ctx) => ({
|
|
1725
|
+
...projectInput(ctx),
|
|
1726
|
+
report_id: ctx.num("report-id")
|
|
1727
|
+
})
|
|
1728
|
+
});
|
|
1729
|
+
|
|
1730
|
+
// src/commands/te-analysis/ai-models.ts
|
|
1731
|
+
var AI_MODEL_TYPE_VALUES = [
|
|
1732
|
+
"event",
|
|
1733
|
+
"retention",
|
|
1734
|
+
"funnel",
|
|
1735
|
+
"distribution",
|
|
1736
|
+
"attribution",
|
|
1737
|
+
"interval",
|
|
1738
|
+
"path",
|
|
1739
|
+
"prop_analysis",
|
|
1740
|
+
"sql",
|
|
1741
|
+
"heat_map",
|
|
1742
|
+
"rank_list",
|
|
1743
|
+
"revenue"
|
|
1744
|
+
];
|
|
1745
|
+
var AI_MODEL_DESCRIPTION = "Supported AI-facing model_type values, 12 total. 9 common models: event (event analysis), retention (retention analysis), funnel (funnel conversion), distribution (distribution analysis), attribution (attribution analysis), interval (interval analysis), path (path analysis), prop_analysis (property analysis), sql (SQL analysis). 3 scenario models: heat_map (heat map analysis), rank_list (ranking analysis), revenue (revenue analysis). Tags and cohorts/clusters are separate capabilities and are not ad-hoc model_type values.";
|
|
1746
|
+
var REPORT_WRITE_MODEL_TYPE_VALUES = [
|
|
1747
|
+
...AI_MODEL_TYPE_VALUES,
|
|
1748
|
+
"tag"
|
|
1749
|
+
];
|
|
1750
|
+
var REPORT_WRITE_MODEL_DESCRIPTION = `${AI_MODEL_DESCRIPTION} Report create/update also supports tag for saved tag report data; use tag as the AI-facing spelling.`;
|
|
1751
|
+
var AI_DEFINITION_DESCRIPTION = 'AI-facing model definition JSON. Do not pass raw QP, events, event_view, visual_view, or analysis_query. For SQL, a simple query is {"sql":"select ..."}; raw variables use ${name}, while typed params use ${Text:name}, ${Selector:name}, or ${PartDate:name}. PartDate expands to a complete predicate, so write WHERE ${PartDate:d}, not a column followed by the placeholder. Selector value must match one options[].value. Trino identifiers containing #, $, @, spaces, or punctuation must be delimited with double quotes, for example SELECT "#user_id", "$part_event" FROM ...; single quotes are string literals. Queries against an event table must include a date-partition predicate on the quoted "$part_date" column, for example WHERE "$part_date" BETWEEN \'2026-07-01\' AND \'2026-07-07\'; the backend rejects event-table SQL without it. The CLI preserves SQL text and never auto-quotes identifiers.';
|
|
1752
|
+
var REPORT_WRITE_DEFINITION_DESCRIPTION = `${AI_DEFINITION_DESCRIPTION} For model_type=tag, pass a tag report intent such as {"tag":{"tag_name":"vip_users","time_range":{"mode":"recent","unit":"day","value":7}}}. Tags are supported for report create/update and report data, not ad-hoc analysis.`;
|
|
1753
|
+
function aiModelTypeFlag(required) {
|
|
1754
|
+
return {
|
|
1755
|
+
name: "model-type",
|
|
1756
|
+
type: "string",
|
|
1757
|
+
required,
|
|
1758
|
+
desc: AI_MODEL_DESCRIPTION
|
|
1759
|
+
};
|
|
1760
|
+
}
|
|
1761
|
+
function reportWriteModelTypeFlag(required) {
|
|
1762
|
+
return {
|
|
1763
|
+
name: "model-type",
|
|
1764
|
+
type: "string",
|
|
1765
|
+
required,
|
|
1766
|
+
desc: REPORT_WRITE_MODEL_DESCRIPTION
|
|
1767
|
+
};
|
|
1768
|
+
}
|
|
1769
|
+
function aiDefinitionFlag(required) {
|
|
1770
|
+
return {
|
|
1771
|
+
name: "definition",
|
|
1772
|
+
type: "json",
|
|
1773
|
+
required,
|
|
1774
|
+
desc: AI_DEFINITION_DESCRIPTION
|
|
1775
|
+
};
|
|
1776
|
+
}
|
|
1777
|
+
function reportWriteDefinitionFlag(required) {
|
|
1778
|
+
return {
|
|
1779
|
+
name: "definition",
|
|
1780
|
+
type: "json",
|
|
1781
|
+
required,
|
|
1782
|
+
desc: REPORT_WRITE_DEFINITION_DESCRIPTION
|
|
1783
|
+
};
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
// src/commands/te-analysis/report/create.ts
|
|
1787
|
+
var reportCreate = createAnalysisCapabilityCommand({
|
|
1788
|
+
resource: "report",
|
|
1789
|
+
command: "create",
|
|
1790
|
+
capabilityId: "analysis.report.create",
|
|
1791
|
+
description: "Create an analysis report from an AI QP model_type and definition.",
|
|
1792
|
+
flags: [
|
|
1793
|
+
projectIdFlag,
|
|
1794
|
+
{ name: "report-name", type: "string", required: true, desc: "Report display name." },
|
|
1795
|
+
reportWriteModelTypeFlag(true),
|
|
1796
|
+
reportWriteDefinitionFlag(true),
|
|
1797
|
+
{ name: "report-desc", type: "string", required: false, desc: "Optional report description." },
|
|
1798
|
+
{ name: "cache-seconds", type: "number", required: false, desc: "Optional cache duration in seconds." },
|
|
1799
|
+
{ name: "query-duration-ms", type: "number", required: false, desc: "Optional last query duration in milliseconds." },
|
|
1800
|
+
{ name: "dashboard-ids", type: "json", required: false, desc: "Optional dashboard ID array to associate after creation." }
|
|
1801
|
+
],
|
|
1802
|
+
risk: "write",
|
|
1803
|
+
buildInput: (ctx) => compactInput({
|
|
1804
|
+
...projectInput(ctx),
|
|
1805
|
+
report_name: ctx.str("report-name"),
|
|
1806
|
+
model_type: ctx.str("model-type"),
|
|
1807
|
+
definition: ctx.json("definition"),
|
|
1808
|
+
report_desc: optionalString2(ctx, "report-desc"),
|
|
1809
|
+
cache_seconds: optionalNumber2(ctx, "cache-seconds"),
|
|
1810
|
+
query_duration_ms: optionalNumber2(ctx, "query-duration-ms"),
|
|
1811
|
+
dashboard_ids: optionalJsonArray(ctx, "dashboard-ids")
|
|
1812
|
+
})
|
|
1813
|
+
});
|
|
1814
|
+
|
|
1815
|
+
// src/commands/te-analysis/report/update.ts
|
|
1816
|
+
function validateReportUpdate(ctx) {
|
|
1817
|
+
const hasDefinition = ctx.str("definition") !== "";
|
|
1818
|
+
const hasMetadataUpdate = ctx.str("report-name") !== "" || ctx.str("report-desc") !== "";
|
|
1819
|
+
if (!hasDefinition && !hasMetadataUpdate) {
|
|
1820
|
+
throw new Error("At least one of --report-name, --report-desc, or --definition is required.");
|
|
1821
|
+
}
|
|
1822
|
+
if (hasDefinition && ctx.str("model-type") === "") {
|
|
1823
|
+
throw new Error("--model-type is required when --definition is provided.");
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
var reportUpdate = createAnalysisCapabilityCommand({
|
|
1827
|
+
resource: "report",
|
|
1828
|
+
command: "update",
|
|
1829
|
+
capabilityId: "analysis.report.update",
|
|
1830
|
+
description: "Update report metadata or AI QP definition through the capability gateway.",
|
|
1831
|
+
flags: [
|
|
1832
|
+
projectIdFlag,
|
|
1833
|
+
{ name: "report-id", type: "number", required: true, desc: "Report ID to update." },
|
|
1834
|
+
{ name: "report-version", type: "number", required: true, desc: "Current report version from report get." },
|
|
1835
|
+
{ name: "report-name", type: "string", required: false, desc: "New report display name." },
|
|
1836
|
+
{ name: "report-desc", type: "string", required: false, desc: "New report description." },
|
|
1837
|
+
reportWriteModelTypeFlag(false),
|
|
1838
|
+
reportWriteDefinitionFlag(false),
|
|
1839
|
+
{ name: "cache-seconds", type: "number", required: false, desc: "Optional cache duration in seconds." },
|
|
1840
|
+
{ name: "query-duration-ms", type: "number", required: false, desc: "Optional last query duration in milliseconds." }
|
|
1841
|
+
],
|
|
1842
|
+
risk: "write",
|
|
1843
|
+
validate: validateReportUpdate,
|
|
1844
|
+
buildInput: (ctx) => compactInput({
|
|
1845
|
+
...projectInput(ctx),
|
|
1846
|
+
report_id: ctx.num("report-id"),
|
|
1847
|
+
version: ctx.num("report-version"),
|
|
1848
|
+
report_name: optionalString2(ctx, "report-name"),
|
|
1849
|
+
report_desc: optionalString2(ctx, "report-desc"),
|
|
1850
|
+
model_type: optionalString2(ctx, "model-type"),
|
|
1851
|
+
definition: optionalJson(ctx, "definition"),
|
|
1852
|
+
cache_seconds: optionalNumber2(ctx, "cache-seconds"),
|
|
1853
|
+
query_duration_ms: optionalNumber2(ctx, "query-duration-ms")
|
|
1854
|
+
})
|
|
1855
|
+
});
|
|
1856
|
+
|
|
1857
|
+
// src/commands/te-analysis/report/delete.ts
|
|
1858
|
+
var reportDelete = createAnalysisCapabilityCommand({
|
|
1859
|
+
resource: "report",
|
|
1860
|
+
command: "delete",
|
|
1861
|
+
capabilityId: "analysis.report.delete",
|
|
1862
|
+
description: "Delete one or more analysis reports.",
|
|
1863
|
+
flags: [projectIdFlag, { name: "report-ids", type: "json", required: true, desc: "Report ID array." }],
|
|
1864
|
+
risk: "high-risk-write",
|
|
1865
|
+
buildInput: (ctx) => ({
|
|
1866
|
+
...projectInput(ctx),
|
|
1867
|
+
report_ids: jsonArray(ctx, "report-ids")
|
|
1868
|
+
})
|
|
1869
|
+
});
|
|
1870
|
+
|
|
1871
|
+
// src/commands/te-analysis/report/index.ts
|
|
1872
|
+
var commands12 = [
|
|
1873
|
+
reportList,
|
|
1874
|
+
reportListExport,
|
|
1875
|
+
reportGet,
|
|
1876
|
+
reportCreate,
|
|
1877
|
+
reportUpdate,
|
|
1878
|
+
reportDelete
|
|
1879
|
+
];
|
|
1880
|
+
var report_default = commands12;
|
|
1881
|
+
|
|
1882
|
+
// src/commands/te-analysis/report-data/shared.ts
|
|
1883
|
+
function reportDataInput(ctx) {
|
|
1884
|
+
return compactInput({
|
|
1885
|
+
...projectInput(ctx),
|
|
1886
|
+
report_ids: jsonArray(ctx, "report-ids"),
|
|
1887
|
+
request_id: optionalString2(ctx, "request-id"),
|
|
1888
|
+
filters: optionalJson(ctx, "filters"),
|
|
1889
|
+
group_by: optionalJson(ctx, "group-by"),
|
|
1890
|
+
sql_params: optionalJson(ctx, "sql-params"),
|
|
1891
|
+
start_time: optionalString2(ctx, "start-time"),
|
|
1892
|
+
end_time: optionalString2(ctx, "end-time"),
|
|
1893
|
+
time_granularity: optionalString2(ctx, "time-granularity"),
|
|
1894
|
+
zone_offset: optionalNumber2(ctx, "zone-offset"),
|
|
1895
|
+
use_cache: optionalBoolean2(ctx, "use-cache"),
|
|
1896
|
+
limit: optionalNumber2(ctx, "limit"),
|
|
1897
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
|
|
1898
|
+
});
|
|
1899
|
+
}
|
|
1900
|
+
function reportDataExportInput(ctx) {
|
|
1901
|
+
return compactInput({
|
|
1902
|
+
...reportDataInput(ctx),
|
|
1903
|
+
limit: void 0,
|
|
1904
|
+
...exportLifecycleInput(ctx)
|
|
1905
|
+
});
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
// src/commands/te-analysis/report-data/run.ts
|
|
1909
|
+
var reportDataRun = createAnalysisCapabilityCommand({
|
|
1910
|
+
resource: "report-data",
|
|
1911
|
+
command: "run",
|
|
1912
|
+
capabilityId: "analysis.report_data.run",
|
|
1913
|
+
description: `Run a bounded report data query. Override contract: SQL uses only --sql-params; non-SQL analysis models use filters/group/time; tag uses its saved tag definition. Mixed-model batches continue with structured warnings for ignored fields. ${analysisDataRunRoutingHelp}`,
|
|
1914
|
+
flags: [
|
|
1915
|
+
projectIdFlag,
|
|
1916
|
+
{ name: "report-ids", type: "json", required: true, desc: "Report ID array. With overrides, prefer one model per batch; mixed models still return data and meta.warnings identifies report_ids and ignored_fields." },
|
|
1917
|
+
requestIdFlag,
|
|
1918
|
+
{ name: "filters", type: "json", required: false, desc: 'Non-SQL analysis models only. SQL-only requests reject this field; mixed batches warn for SQL report_ids that ignore it. AI-facing shape: {"relation":"and","items":[{"field":{"name":"country","type":"user_property"},"operator":"eq","values":["US"]}]}. Never pass QP taFilters.' },
|
|
1919
|
+
{ name: "group-by", type: "json", required: false, desc: 'Non-SQL analysis models only. SQL-only requests reject this field; mixed batches warn. AI-facing shape: [{"field":{"name":"country","type":"user_property"}}]. Time granularity uses --time-granularity.' },
|
|
1920
|
+
{ name: "sql-params", type: "json", required: false, desc: 'SQL reports only. First run analysis report get for every target SQL report; each name must exist in every definition.params. Send value overrides only, for example [{"name":"platform","value":"ios"}] or saved part_date/time parameters with start_time/end_time. Do not send definition fields such as paramType or selectorItems.' },
|
|
1921
|
+
{ name: "start-time", type: "string", required: false, desc: "Non-SQL analysis-model date override start, yyyy-MM-dd. SQL dates must be saved parameters overridden through --sql-params." },
|
|
1922
|
+
{ name: "end-time", type: "string", required: false, desc: "Non-SQL analysis-model date override end, yyyy-MM-dd. SQL dates must be saved parameters overridden through --sql-params." },
|
|
1923
|
+
{ name: "time-granularity", type: "string", required: false, desc: "Non-SQL analysis-model time granularity override. SQL accepts only --sql-params." },
|
|
1924
|
+
{ name: "zone-offset", type: "number", required: false, desc: "Query execution timezone offset in hours. This is not persisted in the report definition." },
|
|
1925
|
+
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
|
|
1926
|
+
syncLimitFlag,
|
|
1927
|
+
syncTimeoutSecondsFlag
|
|
1928
|
+
],
|
|
1929
|
+
risk: "read",
|
|
1930
|
+
buildInput: reportDataInput,
|
|
1931
|
+
postProcess: applyAnalysisInlineLimit
|
|
1932
|
+
});
|
|
1933
|
+
|
|
1934
|
+
// src/commands/te-analysis/report-data/export.ts
|
|
1935
|
+
var reportDataExport = createAnalysisCapabilityCommand({
|
|
1936
|
+
resource: "report-data",
|
|
1937
|
+
command: "export",
|
|
1938
|
+
capabilityId: "analysis.report_data.export",
|
|
1939
|
+
description: `Submit report data as an asynchronous gzip artifact. Override contract: SQL uses only --sql-params; non-SQL analysis models use filters/group/time; tag uses its saved tag definition. Mixed-model batches are best-effort. The submit response and artifact metadata line contain query_context_id when Redis context creation succeeds. ${analysisDataExportRoutingHelp}`,
|
|
1940
|
+
flags: [
|
|
1941
|
+
projectIdFlag,
|
|
1942
|
+
{ name: "report-ids", type: "json", required: true, desc: "Report ID array. With overrides, prefer one model per batch so every field has the same meaning." },
|
|
1943
|
+
requestIdFlag,
|
|
1944
|
+
{ name: "filters", type: "json", required: false, desc: "Non-SQL analysis models only. SQL-only requests reject this field; mixed batches are best-effort. Use AI-facing field intent, never QP taFilters." },
|
|
1945
|
+
{ name: "group-by", type: "json", required: false, desc: 'Non-SQL analysis models only. SQL-only requests reject this field. Shape: [{"field":{"name":"country","type":"user_property"}}].' },
|
|
1946
|
+
{ name: "sql-params", type: "json", required: false, desc: "SQL reports only. First run analysis report get for every target SQL report; each name must exist in every definition.params. Send value overrides only, including saved part_date/time parameters for date changes. Do not send definition fields such as paramType or selectorItems." },
|
|
1947
|
+
{ name: "start-time", type: "string", required: false, desc: "Non-SQL analysis-model date override start, yyyy-MM-dd. SQL dates use --sql-params." },
|
|
1948
|
+
{ name: "end-time", type: "string", required: false, desc: "Non-SQL analysis-model date override end, yyyy-MM-dd. SQL dates use --sql-params." },
|
|
1949
|
+
{ name: "time-granularity", type: "string", required: false, desc: "Non-SQL analysis-model time granularity override. SQL accepts only --sql-params." },
|
|
1950
|
+
{ name: "zone-offset", type: "number", required: false, desc: "Query execution timezone offset in hours. This is not persisted in the report definition." },
|
|
1951
|
+
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
|
|
1952
|
+
artifactFormatFlag,
|
|
1953
|
+
asyncTimeoutSecondsFlag
|
|
1954
|
+
],
|
|
1955
|
+
risk: "read",
|
|
1956
|
+
buildInput: reportDataExportInput
|
|
1957
|
+
});
|
|
1958
|
+
|
|
1959
|
+
// src/commands/te-analysis/report-data/index.ts
|
|
1960
|
+
var commands13 = [
|
|
1961
|
+
reportDataRun,
|
|
1962
|
+
reportDataExport
|
|
1963
|
+
];
|
|
1964
|
+
var report_data_default = commands13;
|
|
1965
|
+
|
|
1966
|
+
// src/commands/te-analysis/report-change-log/list.ts
|
|
1967
|
+
var reportChangeLogList = createAnalysisCapabilityCommand({
|
|
1968
|
+
resource: "report-change-log",
|
|
1969
|
+
command: "list",
|
|
1970
|
+
capabilityId: "analysis.report_change_log.list",
|
|
1971
|
+
description: "List change logs for one analysis report.",
|
|
1972
|
+
flags: [projectIdFlag, { name: "report-id", type: "number", required: true, desc: "Report ID." }],
|
|
1973
|
+
risk: "read",
|
|
1974
|
+
buildInput: (ctx) => ({
|
|
1975
|
+
...projectInput(ctx),
|
|
1976
|
+
report_id: ctx.num("report-id")
|
|
1977
|
+
})
|
|
1978
|
+
});
|
|
1979
|
+
|
|
1980
|
+
// src/commands/te-analysis/report-change-log/get.ts
|
|
1981
|
+
var reportChangeLogGet = createAnalysisCapabilityCommand({
|
|
1982
|
+
resource: "report-change-log",
|
|
1983
|
+
command: "get",
|
|
1984
|
+
capabilityId: "analysis.report_change_log.get",
|
|
1985
|
+
description: "Get one report change log detail as an AI QP definition when available.",
|
|
1986
|
+
flags: [
|
|
1987
|
+
projectIdFlag,
|
|
1988
|
+
{ name: "report-id", type: "number", required: true, desc: "Report ID." },
|
|
1989
|
+
{ name: "history-version", type: "number", required: false, desc: "Optional history version. Omit for latest." }
|
|
1990
|
+
],
|
|
1991
|
+
risk: "read",
|
|
1992
|
+
buildInput: (ctx) => compactInput({
|
|
1993
|
+
...projectInput(ctx),
|
|
1994
|
+
report_id: ctx.num("report-id"),
|
|
1995
|
+
version: optionalNumber2(ctx, "history-version")
|
|
1996
|
+
})
|
|
1997
|
+
});
|
|
1998
|
+
|
|
1999
|
+
// src/commands/te-analysis/report-change-log/index.ts
|
|
2000
|
+
var commands14 = [
|
|
2001
|
+
reportChangeLogList,
|
|
2002
|
+
reportChangeLogGet
|
|
2003
|
+
];
|
|
2004
|
+
var report_change_log_default = commands14;
|
|
2005
|
+
|
|
2006
|
+
// src/commands/te-analysis/report-version/rollback.ts
|
|
2007
|
+
var reportVersionRollback = createAnalysisCapabilityCommand({
|
|
2008
|
+
resource: "report-version",
|
|
2009
|
+
command: "rollback",
|
|
2010
|
+
capabilityId: "analysis.report_version.rollback",
|
|
2011
|
+
description: "Rollback an analysis report to a previous history version.",
|
|
2012
|
+
flags: [
|
|
2013
|
+
projectIdFlag,
|
|
2014
|
+
{ name: "report-id", type: "number", required: true, desc: "Report ID." },
|
|
2015
|
+
{ name: "target-version", type: "number", required: true, desc: "History version to rollback to." }
|
|
2016
|
+
],
|
|
2017
|
+
risk: "write",
|
|
2018
|
+
buildInput: (ctx) => ({
|
|
2019
|
+
...projectInput(ctx),
|
|
2020
|
+
report_id: ctx.num("report-id"),
|
|
2021
|
+
version: ctx.num("target-version")
|
|
2022
|
+
})
|
|
2023
|
+
});
|
|
2024
|
+
|
|
2025
|
+
// src/commands/te-analysis/report-version/index.ts
|
|
2026
|
+
var commands15 = [
|
|
2027
|
+
reportVersionRollback
|
|
2028
|
+
];
|
|
2029
|
+
var report_version_default = commands15;
|
|
2030
|
+
|
|
2031
|
+
// src/commands/te-analysis/report-abnormal/get.ts
|
|
2032
|
+
var reportAbnormalGet = createAnalysisCapabilityCommand({
|
|
2033
|
+
resource: "report-abnormal",
|
|
2034
|
+
command: "get",
|
|
2035
|
+
capabilityId: "analysis.report_abnormal.get",
|
|
2036
|
+
description: "Get abnormal asset information for one analysis report.",
|
|
2037
|
+
flags: [projectIdFlag, { name: "report-id", type: "number", required: true, desc: "Report ID." }],
|
|
2038
|
+
risk: "read",
|
|
2039
|
+
buildInput: (ctx) => ({
|
|
2040
|
+
...projectInput(ctx),
|
|
2041
|
+
report_id: ctx.num("report-id")
|
|
2042
|
+
})
|
|
2043
|
+
});
|
|
2044
|
+
|
|
2045
|
+
// src/commands/te-analysis/report-abnormal/index.ts
|
|
2046
|
+
var commands16 = [
|
|
2047
|
+
reportAbnormalGet
|
|
2048
|
+
];
|
|
2049
|
+
var report_abnormal_default = commands16;
|
|
2050
|
+
|
|
2051
|
+
// src/commands/te-analysis/dashboard/list.ts
|
|
2052
|
+
var dashboardList = createAnalysisCapabilityCommand({
|
|
2053
|
+
resource: "dashboard",
|
|
2054
|
+
command: "list",
|
|
2055
|
+
capabilityId: "analysis.dashboard.list",
|
|
2056
|
+
description: "List dashboards visible to the current user through the capability gateway.",
|
|
2057
|
+
flags: [
|
|
2058
|
+
projectIdFlag,
|
|
2059
|
+
queryFlag,
|
|
2060
|
+
{
|
|
2061
|
+
name: "fields",
|
|
2062
|
+
type: "json",
|
|
2063
|
+
required: false,
|
|
2064
|
+
desc: "Optional projection field array. Supported fields: dashboard_id, dashboard_name, remark.",
|
|
2065
|
+
alias: "f"
|
|
2066
|
+
},
|
|
2067
|
+
directoryLimitFlag,
|
|
2068
|
+
offsetFlag
|
|
2069
|
+
],
|
|
2070
|
+
risk: "read",
|
|
2071
|
+
buildInput: listInput
|
|
2072
|
+
});
|
|
2073
|
+
|
|
2074
|
+
// src/commands/te-analysis/dashboard/create.ts
|
|
2075
|
+
var dashboardCreate = createAnalysisCapabilityCommand({
|
|
2076
|
+
resource: "dashboard",
|
|
2077
|
+
command: "create",
|
|
2078
|
+
capabilityId: "analysis.dashboard.create",
|
|
2079
|
+
description: "Create a dashboard in personal space, project space, or a folder.",
|
|
2080
|
+
flags: [
|
|
2081
|
+
projectIdFlag,
|
|
2082
|
+
{ name: "dashboard-name", type: "string", required: true, desc: "Dashboard name." },
|
|
2083
|
+
{ name: "space-id", type: "number", required: false, desc: "Target project space ID. Omit for personal space." },
|
|
2084
|
+
{ name: "folder-id", type: "number", required: false, desc: "Target folder ID." },
|
|
2085
|
+
{ name: "initial-report-id", type: "number", required: false, desc: "Optional report ID to add when creating the dashboard." },
|
|
2086
|
+
payloadFlag
|
|
2087
|
+
],
|
|
2088
|
+
risk: "write",
|
|
2089
|
+
buildInput: (ctx) => compactInput({
|
|
2090
|
+
...projectInput(ctx),
|
|
2091
|
+
dashboard_name: ctx.str("dashboard-name"),
|
|
2092
|
+
space_id: optionalNumber2(ctx, "space-id"),
|
|
2093
|
+
folder_id: optionalNumber2(ctx, "folder-id"),
|
|
2094
|
+
initial_report_id: optionalNumber2(ctx, "initial-report-id"),
|
|
2095
|
+
payload: optionalJson(ctx, "payload")
|
|
2096
|
+
})
|
|
2097
|
+
});
|
|
2098
|
+
|
|
2099
|
+
// src/commands/te-analysis/dashboard/get.ts
|
|
2100
|
+
var dashboardGet = createAnalysisCapabilityCommand({
|
|
2101
|
+
resource: "dashboard",
|
|
2102
|
+
command: "get",
|
|
2103
|
+
capabilityId: "analysis.dashboard.get",
|
|
2104
|
+
description: "Get one dashboard detail, including creator, create/update time, settings, reports, notes, and share information.",
|
|
2105
|
+
flags: [
|
|
2106
|
+
projectIdFlag,
|
|
2107
|
+
{ name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
|
|
2108
|
+
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use cached dashboard detail. Default: true." }
|
|
2109
|
+
],
|
|
2110
|
+
risk: "read",
|
|
2111
|
+
buildInput: (ctx) => compactInput({
|
|
2112
|
+
...projectInput(ctx),
|
|
2113
|
+
dashboard_id: ctx.num("dashboard-id"),
|
|
2114
|
+
use_cache: optionalBoolean2(ctx, "use-cache")
|
|
2115
|
+
})
|
|
2116
|
+
});
|
|
2117
|
+
|
|
2118
|
+
// src/commands/te-analysis/dashboard/update.ts
|
|
2119
|
+
var dashboardUpdate = createAnalysisCapabilityCommand({
|
|
2120
|
+
resource: "dashboard",
|
|
2121
|
+
command: "update",
|
|
2122
|
+
capabilityId: "analysis.dashboard.update",
|
|
2123
|
+
description: "Update dashboard settings or create/update a dashboard note. Use --operation settings or note-upsert.",
|
|
2124
|
+
flags: [
|
|
2125
|
+
projectIdFlag,
|
|
2126
|
+
{ name: "operation", type: "string", required: true, desc: "Update operation: settings or note-upsert." },
|
|
2127
|
+
{ name: "dashboard-id", type: "number", required: false, desc: "Dashboard ID for a single-dashboard update." },
|
|
2128
|
+
{ name: "dashboard-ids", type: "json", required: false, desc: "Dashboard ID array for batch settings updates." },
|
|
2129
|
+
{ name: "dashboard-name", type: "string", required: false, desc: "Dashboard name for single rename." },
|
|
2130
|
+
{ 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." },
|
|
2131
|
+
{ name: "refresh-type", type: "number", required: false, desc: "Dashboard refresh type: 0 real-time, 1 scheduled.", min: 0, max: 1 },
|
|
2132
|
+
{ name: "dashboard-status", type: "string", required: false, desc: "Dashboard status: normal or freeze." },
|
|
2133
|
+
{ name: "note-id", type: "number", required: false, desc: "Dashboard note ID. Omit to create a new note." },
|
|
2134
|
+
{ name: "note-title", type: "string", required: false, desc: "Dashboard note title." },
|
|
2135
|
+
{ name: "description", type: "string", required: false, desc: "Dashboard note description." },
|
|
2136
|
+
{ name: "ui-config", type: "string", required: false, desc: "Dashboard or note UI config string." },
|
|
2137
|
+
payloadFlag
|
|
2138
|
+
],
|
|
2139
|
+
risk: "write",
|
|
2140
|
+
buildInput: (ctx) => compactInput({
|
|
2141
|
+
...projectInput(ctx),
|
|
2142
|
+
operation: ctx.str("operation"),
|
|
2143
|
+
dashboard_id: optionalNumber2(ctx, "dashboard-id"),
|
|
2144
|
+
dashboard_ids: optionalJsonArray(ctx, "dashboard-ids"),
|
|
2145
|
+
dashboard_name: optionalString2(ctx, "dashboard-name"),
|
|
2146
|
+
zone_offset: optionalNumber2(ctx, "zone-offset"),
|
|
2147
|
+
refresh_type: optionalNumber2(ctx, "refresh-type"),
|
|
2148
|
+
dashboard_status: optionalString2(ctx, "dashboard-status"),
|
|
2149
|
+
note_id: optionalNumber2(ctx, "note-id"),
|
|
2150
|
+
note_title: optionalString2(ctx, "note-title"),
|
|
2151
|
+
description: optionalString2(ctx, "description"),
|
|
2152
|
+
ui_config: optionalString2(ctx, "ui-config"),
|
|
2153
|
+
payload: optionalJson(ctx, "payload")
|
|
2154
|
+
})
|
|
2155
|
+
});
|
|
2156
|
+
|
|
2157
|
+
// src/commands/te-analysis/dashboard/share-info.ts
|
|
2158
|
+
var dashboardShareInfo = createAnalysisCapabilityCommand({
|
|
2159
|
+
resource: "dashboard",
|
|
2160
|
+
command: "share-info",
|
|
2161
|
+
capabilityId: "analysis.dashboard.share_info",
|
|
2162
|
+
description: "Get dashboard sharing information.",
|
|
2163
|
+
flags: [projectIdFlag, { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." }],
|
|
2164
|
+
risk: "read",
|
|
2165
|
+
buildInput: (ctx) => ({
|
|
2166
|
+
...projectInput(ctx),
|
|
2167
|
+
dashboard_id: ctx.num("dashboard-id")
|
|
2168
|
+
})
|
|
2169
|
+
});
|
|
2170
|
+
|
|
2171
|
+
// src/commands/te-analysis/dashboard/share.ts
|
|
2172
|
+
var dashboardShare = createAnalysisCapabilityCommand({
|
|
2173
|
+
resource: "dashboard",
|
|
2174
|
+
command: "share",
|
|
2175
|
+
capabilityId: "analysis.dashboard.share",
|
|
2176
|
+
description: "Modify dashboard sharing members through the capability gateway.",
|
|
2177
|
+
flags: [
|
|
2178
|
+
projectIdFlag,
|
|
2179
|
+
{ name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
|
|
2180
|
+
{ name: "member-authorities", type: "json", required: false, desc: 'Complete user authority map: {"<numeric_user_id>":"READ|EDIT|CREATOR|MAINTAIN"}. An empty object removes all directly shared users.' },
|
|
2181
|
+
payloadFlag
|
|
2182
|
+
],
|
|
2183
|
+
risk: "write",
|
|
2184
|
+
buildInput: (ctx) => compactInput({
|
|
2185
|
+
...projectInput(ctx),
|
|
2186
|
+
dashboard_id: ctx.num("dashboard-id"),
|
|
2187
|
+
member_authorities: optionalJson(ctx, "member-authorities"),
|
|
2188
|
+
payload: optionalJson(ctx, "payload")
|
|
2189
|
+
})
|
|
2190
|
+
});
|
|
2191
|
+
|
|
2192
|
+
// src/commands/te-analysis/dashboard/delete.ts
|
|
2193
|
+
var dashboardDelete = createAnalysisCapabilityCommand({
|
|
2194
|
+
resource: "dashboard",
|
|
2195
|
+
command: "delete",
|
|
2196
|
+
capabilityId: "analysis.dashboard.delete",
|
|
2197
|
+
description: "Delete one or more dashboards.",
|
|
2198
|
+
flags: [projectIdFlag, { name: "dashboard-ids", type: "json", required: true, desc: "Dashboard ID array." }],
|
|
2199
|
+
risk: "high-risk-write",
|
|
2200
|
+
buildInput: (ctx) => ({
|
|
2201
|
+
...projectInput(ctx),
|
|
2202
|
+
dashboard_ids: jsonArray(ctx, "dashboard-ids")
|
|
2203
|
+
})
|
|
2204
|
+
});
|
|
2205
|
+
|
|
2206
|
+
// src/commands/te-analysis/dashboard/handover.ts
|
|
2207
|
+
var dashboardHandover = createAnalysisCapabilityCommand({
|
|
2208
|
+
resource: "dashboard",
|
|
2209
|
+
command: "handover",
|
|
2210
|
+
capabilityId: "analysis.dashboard.handover",
|
|
2211
|
+
description: "Handover one or more dashboards to another project user.",
|
|
2212
|
+
flags: [
|
|
2213
|
+
projectIdFlag,
|
|
2214
|
+
{ name: "dashboard-ids", type: "json", required: true, desc: "Dashboard ID array." },
|
|
2215
|
+
{ name: "to-user-id", type: "number", required: true, desc: "Target user ID." }
|
|
2216
|
+
],
|
|
2217
|
+
risk: "write",
|
|
2218
|
+
buildInput: (ctx) => ({
|
|
2219
|
+
...projectInput(ctx),
|
|
2220
|
+
dashboard_ids: jsonArray(ctx, "dashboard-ids"),
|
|
2221
|
+
to_user_id: ctx.num("to-user-id")
|
|
2222
|
+
})
|
|
2223
|
+
});
|
|
2224
|
+
|
|
2225
|
+
// src/commands/te-analysis/dashboard/copy.ts
|
|
2226
|
+
var dashboardCopy = createAnalysisCapabilityCommand({
|
|
2227
|
+
resource: "dashboard",
|
|
2228
|
+
command: "copy",
|
|
2229
|
+
capabilityId: "analysis.dashboard.copy",
|
|
2230
|
+
description: "Copy a dashboard, optionally copying reports and targeting a project space or folder.",
|
|
2231
|
+
flags: [
|
|
2232
|
+
projectIdFlag,
|
|
2233
|
+
{ name: "dashboard-id", type: "number", required: true, desc: "Source dashboard ID." },
|
|
2234
|
+
{ name: "dashboard-name", type: "string", required: true, desc: "New dashboard name." },
|
|
2235
|
+
{ name: "report-copy", type: "boolean", required: false, desc: "Whether to copy reports. Default: false." },
|
|
2236
|
+
{ 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." },
|
|
2237
|
+
{ name: "to-folder-id", type: "number", required: false, desc: "Target folder ID. If both target IDs are omitted, copy to the source dashboard location." }
|
|
2238
|
+
],
|
|
2239
|
+
risk: "write",
|
|
2240
|
+
buildInput: (ctx) => compactInput({
|
|
2241
|
+
...projectInput(ctx),
|
|
2242
|
+
dashboard_id: ctx.num("dashboard-id"),
|
|
2243
|
+
dashboard_name: ctx.str("dashboard-name"),
|
|
2244
|
+
report_copy: booleanWithDefault(ctx, "report-copy", false),
|
|
2245
|
+
to_space_id: optionalNumber2(ctx, "to-space-id"),
|
|
2246
|
+
to_folder_id: optionalNumber2(ctx, "to-folder-id")
|
|
2247
|
+
})
|
|
2248
|
+
});
|
|
2249
|
+
|
|
2250
|
+
// src/commands/te-analysis/dashboard/freeze.ts
|
|
2251
|
+
var dashboardFreeze = createAnalysisCapabilityCommand({
|
|
2252
|
+
resource: "dashboard",
|
|
2253
|
+
command: "freeze",
|
|
2254
|
+
capabilityId: "analysis.dashboard.freeze",
|
|
2255
|
+
description: "Freeze or unfreeze one or more dashboards.",
|
|
2256
|
+
flags: [
|
|
2257
|
+
projectIdFlag,
|
|
2258
|
+
{ name: "dashboard-ids", type: "json", required: true, desc: "Dashboard ID array." },
|
|
2259
|
+
{ name: "freeze", type: "boolean", required: false, desc: "true to freeze, false to unfreeze. Default: true." }
|
|
2260
|
+
],
|
|
2261
|
+
risk: "write",
|
|
2262
|
+
buildInput: (ctx) => compactInput({
|
|
2263
|
+
...projectInput(ctx),
|
|
2264
|
+
dashboard_ids: jsonArray(ctx, "dashboard-ids"),
|
|
2265
|
+
freeze: optionalBoolean2(ctx, "freeze")
|
|
2266
|
+
})
|
|
2267
|
+
});
|
|
2268
|
+
|
|
2269
|
+
// src/commands/te-analysis/dashboard/abnormal-get.ts
|
|
2270
|
+
var dashboardAbnormalGet = createAnalysisCapabilityCommand({
|
|
2271
|
+
resource: "dashboard",
|
|
2272
|
+
command: "abnormal-get",
|
|
2273
|
+
capabilityId: "analysis.dashboard.abnormal_get",
|
|
2274
|
+
description: "Get abnormal dependency information for a dashboard.",
|
|
2275
|
+
flags: [projectIdFlag, { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." }],
|
|
2276
|
+
risk: "read",
|
|
2277
|
+
buildInput: (ctx) => ({
|
|
2278
|
+
...projectInput(ctx),
|
|
2279
|
+
dashboard_id: ctx.num("dashboard-id")
|
|
2280
|
+
})
|
|
2281
|
+
});
|
|
2282
|
+
|
|
2283
|
+
// src/commands/te-analysis/dashboard/task-status.ts
|
|
2284
|
+
var dashboardTaskStatus = createAnalysisCapabilityCommand({
|
|
2285
|
+
resource: "dashboard",
|
|
2286
|
+
command: "task-status",
|
|
2287
|
+
capabilityId: "analysis.dashboard.task_status",
|
|
2288
|
+
description: "Get dashboard scheduled task status.",
|
|
2289
|
+
flags: [projectIdFlag, { name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." }],
|
|
2290
|
+
risk: "read",
|
|
2291
|
+
buildInput: (ctx) => ({
|
|
2292
|
+
...projectInput(ctx),
|
|
2293
|
+
dashboard_id: ctx.num("dashboard-id")
|
|
2294
|
+
})
|
|
2295
|
+
});
|
|
2296
|
+
|
|
2297
|
+
// src/commands/te-analysis/dashboard/index.ts
|
|
2298
|
+
var commands17 = [
|
|
2299
|
+
dashboardList,
|
|
2300
|
+
dashboardCreate,
|
|
2301
|
+
dashboardGet,
|
|
2302
|
+
dashboardUpdate,
|
|
2303
|
+
dashboardShareInfo,
|
|
2304
|
+
dashboardShare,
|
|
2305
|
+
dashboardDelete,
|
|
2306
|
+
dashboardHandover,
|
|
2307
|
+
dashboardCopy,
|
|
2308
|
+
dashboardFreeze,
|
|
2309
|
+
dashboardAbnormalGet,
|
|
2310
|
+
dashboardTaskStatus
|
|
2311
|
+
];
|
|
2312
|
+
var dashboard_default = commands17;
|
|
2313
|
+
|
|
2314
|
+
// src/commands/te-analysis/dashboard-report/add.ts
|
|
2315
|
+
var dashboardReportAdd = createAnalysisCapabilityCommand({
|
|
2316
|
+
resource: "dashboard-report",
|
|
2317
|
+
command: "add",
|
|
2318
|
+
capabilityId: "analysis.dashboard_report.add",
|
|
2319
|
+
description: "Add existing analysis reports to a dashboard.",
|
|
2320
|
+
flags: [
|
|
2321
|
+
projectIdFlag,
|
|
2322
|
+
{ name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
|
|
2323
|
+
{ name: "report-ids", type: "json", required: true, desc: "Report ID array to add." }
|
|
2324
|
+
],
|
|
2325
|
+
risk: "write",
|
|
2326
|
+
buildInput: (ctx) => ({
|
|
2327
|
+
...projectInput(ctx),
|
|
2328
|
+
dashboard_id: ctx.num("dashboard-id"),
|
|
2329
|
+
report_ids: jsonArray(ctx, "report-ids")
|
|
2330
|
+
})
|
|
2331
|
+
});
|
|
2332
|
+
|
|
2333
|
+
// src/commands/te-analysis/dashboard-report/index.ts
|
|
2334
|
+
var commands18 = [
|
|
2335
|
+
dashboardReportAdd
|
|
2336
|
+
];
|
|
2337
|
+
var dashboard_report_default = commands18;
|
|
2338
|
+
|
|
2339
|
+
// src/commands/te-analysis/dashboard-report-data/run.ts
|
|
2340
|
+
var dashboardReportDataRun = createAnalysisCapabilityCommand({
|
|
2341
|
+
resource: "dashboard-report-data",
|
|
2342
|
+
command: "run",
|
|
2343
|
+
capabilityId: "analysis.dashboard_report_data.run",
|
|
2344
|
+
description: `Run a bounded dashboard report data query. Filters and time overrides do not apply to SQL reports; data still returns with data.warnings listing SQL report_ids and ignored_fields. ${analysisDataRunRoutingHelp}`,
|
|
2345
|
+
flags: [
|
|
2346
|
+
projectIdFlag,
|
|
2347
|
+
{ name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
|
|
2348
|
+
{ name: "report-ids", type: "json", required: false, desc: "Optional report ID array. Omit to query all dashboard reports." },
|
|
2349
|
+
{ name: "filters", type: "json", required: false, desc: "Optional AI-facing filter {relation,items:[{field:{name,type?},operator,values?}]}. SQL reports ignore it and produce data.warnings; raw taFilters/junctionKind/filts are rejected." },
|
|
2350
|
+
{ name: "start-time", type: "string", required: false, desc: "Optional start date/time. SQL reports ignore it and produce data.warnings." },
|
|
2351
|
+
{ name: "end-time", type: "string", required: false, desc: "Optional end date/time. SQL reports ignore it and produce data.warnings." },
|
|
2352
|
+
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
|
|
2353
|
+
{ name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
|
|
2354
|
+
dashboardSyncTimeoutSecondsFlag,
|
|
2355
|
+
syncLimitFlag
|
|
2356
|
+
],
|
|
2357
|
+
risk: "read",
|
|
2358
|
+
buildInput: dashboardReportDataInput,
|
|
2359
|
+
postProcess: applyAnalysisInlineLimit
|
|
2360
|
+
});
|
|
2361
|
+
|
|
2362
|
+
// src/commands/te-analysis/dashboard-report-data/export.ts
|
|
2363
|
+
var dashboardReportDataExport = createAnalysisCapabilityCommand({
|
|
2364
|
+
resource: "dashboard-report-data",
|
|
2365
|
+
command: "export",
|
|
2366
|
+
capabilityId: "analysis.dashboard_report_data.export",
|
|
2367
|
+
description: `Submit dashboard report data as an asynchronous gzip JSONL artifact. Filters and time overrides do not apply to SQL reports; the artifact still contains data plus structured warnings. The submit response and artifact metadata line contain query_context_id when Redis context creation succeeds. ${analysisDataExportRoutingHelp}`,
|
|
2368
|
+
flags: [
|
|
2369
|
+
projectIdFlag,
|
|
2370
|
+
{ name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
|
|
2371
|
+
{ name: "report-ids", type: "json", required: false, desc: "Optional report ID array. Omit to query all dashboard reports." },
|
|
2372
|
+
{ name: "filters", type: "json", required: false, desc: "Optional AI-facing filter {relation,items:[{field:{name,type?},operator,values?}]}. SQL reports ignore it and the artifact includes warnings; raw taFilters/junctionKind/filts are rejected." },
|
|
2373
|
+
{ name: "start-time", type: "string", required: false, desc: "Optional start date/time. SQL reports ignore it and the artifact includes warnings." },
|
|
2374
|
+
{ name: "end-time", type: "string", required: false, desc: "Optional end date/time. SQL reports ignore it and the artifact includes warnings." },
|
|
2375
|
+
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
|
|
2376
|
+
{ name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
|
|
2377
|
+
asyncTimeoutSecondsFlag,
|
|
2378
|
+
{ name: "artifact-format", type: "string", required: false, desc: "Artifact format. Only jsonl is supported." }
|
|
2379
|
+
],
|
|
2380
|
+
risk: "read",
|
|
2381
|
+
buildInput: dashboardReportDataInput
|
|
2382
|
+
});
|
|
2383
|
+
|
|
2384
|
+
// src/commands/te-analysis/dashboard-report-data/index.ts
|
|
2385
|
+
var commands19 = [
|
|
2386
|
+
dashboardReportDataRun,
|
|
2387
|
+
dashboardReportDataExport
|
|
2388
|
+
];
|
|
2389
|
+
var dashboard_report_data_default = commands19;
|
|
2390
|
+
|
|
2391
|
+
// src/commands/te-analysis/query/cancel.ts
|
|
2392
|
+
var queryCancel = createAnalysisCapabilityCommand({
|
|
2393
|
+
resource: "query",
|
|
2394
|
+
command: "cancel",
|
|
2395
|
+
capabilityId: "analysis.query.cancel",
|
|
2396
|
+
description: "Cancel an analysis capability-gateway query/export by run_id.",
|
|
2397
|
+
flags: [
|
|
2398
|
+
{ name: "run-id", type: "string", required: true, desc: "Async run ID returned by an export capability." },
|
|
2399
|
+
{ name: "reason", type: "string", required: false, desc: "Optional cancellation reason." }
|
|
2400
|
+
],
|
|
2401
|
+
risk: "write",
|
|
2402
|
+
buildInput: (ctx) => compactInput({
|
|
2403
|
+
run_id: ctx.str("run-id"),
|
|
2404
|
+
reason: optionalString2(ctx, "reason")
|
|
2405
|
+
})
|
|
2406
|
+
});
|
|
2407
|
+
|
|
2408
|
+
// src/commands/te-analysis/query/shared.ts
|
|
2409
|
+
var targetFlag = {
|
|
2410
|
+
name: "target",
|
|
2411
|
+
type: "json",
|
|
2412
|
+
required: true,
|
|
2413
|
+
desc: "Use only when the upstream availability flag is true. Pass sources[].target_contract.default_target directly, or copy it and replace only named machine fields for a specific result; never infer from display text or raw QP."
|
|
2414
|
+
};
|
|
2415
|
+
var propertiesFlag = {
|
|
2416
|
+
name: "properties",
|
|
2417
|
+
type: "json",
|
|
2418
|
+
required: false,
|
|
2419
|
+
desc: "Optional backend property request object array. Omit for defaults; do not pass string-name arrays."
|
|
2420
|
+
};
|
|
2421
|
+
var useCacheFlag = {
|
|
2422
|
+
name: "use-cache",
|
|
2423
|
+
type: "boolean",
|
|
2424
|
+
required: false,
|
|
2425
|
+
desc: "Whether to use query cache. Default: true."
|
|
2426
|
+
};
|
|
2427
|
+
function createResultClusterInput(ctx) {
|
|
2428
|
+
return compactInput({
|
|
2429
|
+
query_context_id: ctx.str("query-context-id"),
|
|
2430
|
+
target: ctx.json("target"),
|
|
2431
|
+
cluster_name: ctx.str("cluster-name"),
|
|
2432
|
+
display_name: optionalString2(ctx, "display-name"),
|
|
2433
|
+
zone_offset: optionalNumber2(ctx, "zone-offset"),
|
|
2434
|
+
request_id: optionalString2(ctx, "request-id"),
|
|
2435
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
|
|
2436
|
+
});
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2439
|
+
// src/commands/te-analysis/query/create-result-cluster.ts
|
|
2440
|
+
var queryCreateResultCluster = createAnalysisCapabilityCommand({
|
|
2441
|
+
resource: "query",
|
|
2442
|
+
command: "create-result-cluster",
|
|
2443
|
+
capabilityId: "analysis.query.create_result_cluster",
|
|
2444
|
+
description: "Create a reusable result cluster from users matched by a target in a previous analysis data query context. Works after adhoc, report-data, and dashboard-report-data run/export. Do not pass raw QP.",
|
|
2445
|
+
flags: [
|
|
2446
|
+
{ name: "query-context-id", type: "string", required: true, desc: "query_context_id returned by an analysis data run/export." },
|
|
2447
|
+
targetFlag,
|
|
2448
|
+
{ name: "cluster-name", type: "string", required: true, desc: "Unique result cluster name. Use letters, digits, and underscores." },
|
|
2449
|
+
{ name: "display-name", type: "string", required: false, desc: "Optional result cluster display name." },
|
|
2450
|
+
{ name: "zone-offset", type: "number", required: false, desc: "Optional timezone offset. UTC+8 is 8; UTC-5 is -5." },
|
|
2451
|
+
requestIdFlag,
|
|
2452
|
+
timeoutSecondsFlag
|
|
2453
|
+
],
|
|
2454
|
+
risk: "write",
|
|
2455
|
+
buildInput: createResultClusterInput
|
|
2456
|
+
});
|
|
2457
|
+
|
|
2458
|
+
// src/commands/te-analysis/query/index.ts
|
|
2459
|
+
var commands20 = [
|
|
2460
|
+
queryCancel,
|
|
2461
|
+
queryCreateResultCluster
|
|
2462
|
+
];
|
|
2463
|
+
var query_default = commands20;
|
|
2464
|
+
|
|
2465
|
+
// src/commands/te-analysis/run/inspect.ts
|
|
2466
|
+
var runInspect = {
|
|
2467
|
+
service: "analysis",
|
|
2468
|
+
resource: "run",
|
|
2469
|
+
command: "inspect",
|
|
2470
|
+
description: "Inspect an analysis capability-gateway async run by run_id. Use after adhoc/report-data/dashboard/BI export returns run_id.",
|
|
2471
|
+
flags: [
|
|
2472
|
+
{ name: "run-id", type: "string", required: true, desc: "Async run ID returned by an export capability." }
|
|
2473
|
+
],
|
|
2474
|
+
risk: "read",
|
|
2475
|
+
dryRun: (ctx) => ({
|
|
2476
|
+
method: "GET",
|
|
2477
|
+
url: buildCapabilityGatewayUrl(
|
|
2478
|
+
ctx.host(),
|
|
2479
|
+
resolveGatewayDomain("analysis"),
|
|
2480
|
+
`runs/${encodeURIComponent(ctx.str("run-id"))}`
|
|
2481
|
+
)
|
|
2482
|
+
}),
|
|
2483
|
+
execute: async (ctx) => {
|
|
2484
|
+
const result = await requestCapabilityGatewayWithEnvelope(
|
|
2485
|
+
ctx.host(),
|
|
2486
|
+
resolveGatewayDomain("analysis"),
|
|
2487
|
+
`runs/${encodeURIComponent(ctx.str("run-id"))}`
|
|
2488
|
+
);
|
|
2489
|
+
return withOutputMetadata(result.data, result.meta);
|
|
2490
|
+
}
|
|
2491
|
+
};
|
|
2492
|
+
|
|
2493
|
+
// src/commands/te-analysis/run/index.ts
|
|
2494
|
+
var commands21 = [
|
|
2495
|
+
runInspect
|
|
2496
|
+
];
|
|
2497
|
+
var run_default = commands21;
|
|
2498
|
+
|
|
2499
|
+
// src/commands/te-analysis/artifact/download.ts
|
|
2500
|
+
import { mkdir, writeFile } from "fs/promises";
|
|
2501
|
+
import { dirname, resolve } from "path";
|
|
2502
|
+
function artifactPath(runId, artifactId) {
|
|
2503
|
+
return `runs/${encodeURIComponent(runId)}/artifacts/${encodeURIComponent(artifactId)}/download`;
|
|
2504
|
+
}
|
|
2505
|
+
var artifactDownload = {
|
|
2506
|
+
service: "analysis",
|
|
2507
|
+
resource: "artifact",
|
|
2508
|
+
command: "download",
|
|
2509
|
+
description: "Download an analysis capability-gateway artifact by run_id and artifact_id. Keep run_id bound to artifact_id from the export result.",
|
|
2510
|
+
flags: [
|
|
2511
|
+
{ name: "run-id", type: "string", required: true, desc: "Async run ID returned by an export capability." },
|
|
2512
|
+
{ name: "artifact-id", type: "string", required: true, desc: "Artifact ID returned by the same export capability." },
|
|
2513
|
+
{ name: "output", type: "string", required: true, desc: "Local output file path. Use a file path, not a directory." }
|
|
2514
|
+
],
|
|
2515
|
+
risk: "read",
|
|
2516
|
+
dryRun: (ctx) => ({
|
|
2517
|
+
method: "GET",
|
|
2518
|
+
url: buildCapabilityGatewayUrl(
|
|
2519
|
+
ctx.host(),
|
|
2520
|
+
resolveGatewayDomain("analysis"),
|
|
2521
|
+
artifactPath(ctx.str("run-id"), ctx.str("artifact-id"))
|
|
2522
|
+
),
|
|
2523
|
+
output_path: resolve(ctx.str("output"))
|
|
2524
|
+
}),
|
|
2525
|
+
execute: async (ctx) => {
|
|
2526
|
+
const runId = ctx.str("run-id");
|
|
2527
|
+
const artifactId = ctx.str("artifact-id");
|
|
2528
|
+
const outputPath = resolve(ctx.str("output"));
|
|
2529
|
+
await ensureArtifactReady(ctx.host(), runId, artifactId);
|
|
2530
|
+
const resp = await fetchArtifact(ctx.host(), runId, artifactId);
|
|
2531
|
+
const bytes = Buffer.from(await resp.arrayBuffer());
|
|
2532
|
+
await mkdir(dirname(outputPath), { recursive: true });
|
|
2533
|
+
await writeFile(outputPath, bytes);
|
|
2534
|
+
return {
|
|
2535
|
+
run_id: runId,
|
|
2536
|
+
artifact_id: artifactId,
|
|
2537
|
+
output_path: outputPath,
|
|
2538
|
+
bytes: bytes.length,
|
|
2539
|
+
content_type: resp.headers.get("content-type") ?? void 0,
|
|
2540
|
+
content_encoding: resp.headers.get("content-encoding") ?? void 0,
|
|
2541
|
+
content_disposition: resp.headers.get("content-disposition") ?? void 0
|
|
2542
|
+
};
|
|
2543
|
+
}
|
|
2544
|
+
};
|
|
2545
|
+
async function ensureArtifactReady(host, runId, artifactId) {
|
|
2546
|
+
const descriptor = await inspectRun(host, runId);
|
|
2547
|
+
if (descriptor.artifact_id && descriptor.artifact_id !== artifactId) {
|
|
2548
|
+
throw new CapabilityGatewayError(
|
|
2549
|
+
`artifact_id ${artifactId} does not belong to run_id ${runId}`,
|
|
2550
|
+
"ARTIFACT_RUN_MISMATCH",
|
|
2551
|
+
400,
|
|
2552
|
+
"Use the run_id and artifact_id pair from the same export response."
|
|
2553
|
+
);
|
|
2554
|
+
}
|
|
2555
|
+
if (descriptor.status === "SUCCEEDED" && descriptor.artifact_status === "COMPLETED") {
|
|
2556
|
+
return;
|
|
2557
|
+
}
|
|
2558
|
+
const reason = descriptor.error_message ? `; error=${descriptor.error_message}` : "";
|
|
2559
|
+
throw new CapabilityGatewayError(
|
|
2560
|
+
`Artifact is not ready: run_status=${descriptor.status ?? "UNKNOWN"}, artifact_status=${descriptor.artifact_status ?? "UNKNOWN"}${reason}`,
|
|
2561
|
+
"ARTIFACT_NOT_READY",
|
|
2562
|
+
409,
|
|
2563
|
+
"Run ae-cli analysis run inspect --run-id <run_id> until status=SUCCEEDED and artifact_status=COMPLETED, then retry artifact download. If status is FAILED or CANCELED, do not retry download."
|
|
2564
|
+
);
|
|
2565
|
+
}
|
|
2566
|
+
async function inspectRun(host, runId) {
|
|
2567
|
+
return await requestCapabilityGateway(
|
|
2568
|
+
host,
|
|
2569
|
+
resolveGatewayDomain("analysis"),
|
|
2570
|
+
`runs/${encodeURIComponent(runId)}`
|
|
2571
|
+
);
|
|
2572
|
+
}
|
|
2573
|
+
async function fetchArtifact(host, runId, artifactId) {
|
|
2574
|
+
return fetchCapabilityGateway(
|
|
2575
|
+
host,
|
|
2576
|
+
resolveGatewayDomain("analysis"),
|
|
2577
|
+
artifactPath(runId, artifactId),
|
|
2578
|
+
"GET",
|
|
2579
|
+
void 0,
|
|
2580
|
+
"application/octet-stream"
|
|
2581
|
+
);
|
|
2582
|
+
}
|
|
2583
|
+
|
|
2584
|
+
// src/commands/te-analysis/artifact/index.ts
|
|
2585
|
+
var commands22 = [
|
|
2586
|
+
artifactDownload
|
|
2587
|
+
];
|
|
2588
|
+
var artifact_default = commands22;
|
|
2589
|
+
|
|
2590
|
+
// src/commands/te-analysis/adhoc/shared.ts
|
|
2591
|
+
var useCacheFlag2 = {
|
|
2592
|
+
name: "use-cache",
|
|
2593
|
+
type: "boolean",
|
|
2594
|
+
required: false,
|
|
2595
|
+
desc: "Whether to use query cache. Default: true."
|
|
2596
|
+
};
|
|
2597
|
+
var zoneOffsetFlag2 = {
|
|
2598
|
+
name: "zone-offset",
|
|
2599
|
+
type: "number",
|
|
2600
|
+
required: false,
|
|
2601
|
+
desc: "Optional timezone offset. UTC+8 is 8; UTC-5 is -5."
|
|
2602
|
+
};
|
|
2603
|
+
function adhocRunInput(ctx) {
|
|
2604
|
+
return compactInput({
|
|
2605
|
+
project_id: ctx.num("project-id"),
|
|
2606
|
+
model_type: ctx.str("model-type"),
|
|
2607
|
+
definition: ctx.json("definition"),
|
|
2608
|
+
request_id: optionalString2(ctx, "request-id"),
|
|
2609
|
+
use_cache: optionalBoolean2(ctx, "use-cache"),
|
|
2610
|
+
zone_offset: optionalNumber2(ctx, "zone-offset"),
|
|
2611
|
+
fields: optionalJsonArray(ctx, "fields"),
|
|
2612
|
+
limit: optionalNumber2(ctx, "limit"),
|
|
2613
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
|
|
2614
|
+
});
|
|
2615
|
+
}
|
|
2616
|
+
function adhocExportInput(ctx) {
|
|
2617
|
+
return compactInput({
|
|
2618
|
+
project_id: ctx.num("project-id"),
|
|
2619
|
+
model_type: ctx.str("model-type"),
|
|
2620
|
+
definition: ctx.json("definition"),
|
|
2621
|
+
request_id: optionalString2(ctx, "request-id"),
|
|
2622
|
+
use_cache: optionalBoolean2(ctx, "use-cache"),
|
|
2623
|
+
zone_offset: optionalNumber2(ctx, "zone-offset"),
|
|
2624
|
+
fields: optionalJsonArray(ctx, "fields"),
|
|
2625
|
+
format: optionalString2(ctx, "artifact-format"),
|
|
2626
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
|
|
2627
|
+
});
|
|
2628
|
+
}
|
|
2629
|
+
var adhocBaseFlags = [
|
|
2630
|
+
projectIdFlag,
|
|
2631
|
+
aiModelTypeFlag(true),
|
|
2632
|
+
aiDefinitionFlag(true),
|
|
2633
|
+
requestIdFlag,
|
|
2634
|
+
useCacheFlag2,
|
|
2635
|
+
zoneOffsetFlag2,
|
|
2636
|
+
fieldsFlag
|
|
2637
|
+
];
|
|
2638
|
+
var adhocExportFlags = [
|
|
2639
|
+
...adhocBaseFlags,
|
|
2640
|
+
artifactFormatFlag,
|
|
2641
|
+
asyncTimeoutSecondsFlag
|
|
2642
|
+
];
|
|
2643
|
+
|
|
2644
|
+
// src/commands/te-analysis/adhoc/run.ts
|
|
2645
|
+
var adhocRun = createAnalysisCapabilityCommand({
|
|
2646
|
+
resource: "adhoc",
|
|
2647
|
+
command: "run",
|
|
2648
|
+
capabilityId: "analysis.adhoc.run",
|
|
2649
|
+
description: `Run one unified ad-hoc analysis from an AI-facing model definition. Supports 12 AI-facing models: 9 common models plus 3 scenario models. Tags and cohorts/clusters are separate capabilities, not ad-hoc model_type values. Returns query_context_id for Redis-backed query follow-ups. ${analysisDataRunRoutingHelp}`,
|
|
2650
|
+
flags: [
|
|
2651
|
+
...adhocBaseFlags,
|
|
2652
|
+
syncLimitFlag,
|
|
2653
|
+
syncTimeoutSecondsFlag
|
|
2654
|
+
],
|
|
2655
|
+
risk: "read",
|
|
2656
|
+
buildInput: adhocRunInput,
|
|
2657
|
+
postProcess: applyAnalysisInlineLimit
|
|
2658
|
+
});
|
|
2659
|
+
|
|
2660
|
+
// src/commands/te-analysis/adhoc/export.ts
|
|
2661
|
+
var adhocExport = createAnalysisCapabilityCommand({
|
|
2662
|
+
resource: "adhoc",
|
|
2663
|
+
command: "export",
|
|
2664
|
+
capabilityId: "analysis.adhoc.export",
|
|
2665
|
+
description: `Submit one unified ad-hoc analysis export from an AI-facing model definition. Returns run_id/artifact_id plus the actual format, compression, file_name, content_type, and content_encoding; the artifact-format flag selects logical rows, not compression. The submit response and artifact metadata line contain query_context_id when Redis context creation succeeds. ${analysisDataExportRoutingHelp}`,
|
|
2666
|
+
flags: [
|
|
2667
|
+
...adhocExportFlags
|
|
2668
|
+
],
|
|
2669
|
+
risk: "read",
|
|
2670
|
+
buildInput: adhocExportInput
|
|
2671
|
+
});
|
|
2672
|
+
|
|
2673
|
+
// src/commands/te-analysis/adhoc/index.ts
|
|
2674
|
+
var commands23 = [
|
|
2675
|
+
adhocRun,
|
|
2676
|
+
adhocExport
|
|
2677
|
+
];
|
|
2678
|
+
var adhoc_default = commands23;
|
|
2679
|
+
|
|
2680
|
+
// src/commands/te-analysis/dashboard-definition/export.ts
|
|
2681
|
+
var dashboardDefinitionExport = createAnalysisCapabilityCommand({
|
|
2682
|
+
resource: "dashboard-definition",
|
|
2683
|
+
command: "export",
|
|
2684
|
+
capabilityId: "analysis.dashboard_definition.export",
|
|
2685
|
+
description: "Export dashboard definition JSON.",
|
|
2686
|
+
flags: [
|
|
2687
|
+
projectIdFlag,
|
|
2688
|
+
{ name: "dashboard-id", type: "number", required: false, desc: "Single dashboard ID to export. The gateway resolves folder or project-space context." },
|
|
2689
|
+
{ name: "dashboard-ids", type: "json", required: false, desc: "Dashboard ID array to export. The gateway resolves folder or project-space context." },
|
|
2690
|
+
{ name: "dashboard-folder-ids", type: "json", required: false, desc: 'Private folder ID array, or advanced descriptor array: [{"dashboard_folder_id":1,"dashboard_ids":[2]}].' },
|
|
2691
|
+
{ name: "shared-spaces", type: "json", required: false, desc: "Shared space export descriptor array." },
|
|
2692
|
+
{ name: "export-file-name", type: "string", required: false, desc: "Optional export file name." },
|
|
2693
|
+
payloadFlag
|
|
2694
|
+
],
|
|
2695
|
+
risk: "read",
|
|
2696
|
+
buildInput: (ctx) => compactInput({
|
|
2697
|
+
...projectInput(ctx),
|
|
2698
|
+
dashboard_id: optionalNumber2(ctx, "dashboard-id"),
|
|
2699
|
+
dashboard_ids: optionalJsonArray(ctx, "dashboard-ids"),
|
|
2700
|
+
dashboard_folder_ids: optionalJsonArray(ctx, "dashboard-folder-ids"),
|
|
2701
|
+
shared_spaces: optionalJson(ctx, "shared-spaces"),
|
|
2702
|
+
export_file_name: optionalString2(ctx, "export-file-name"),
|
|
2703
|
+
payload: optionalJson(ctx, "payload")
|
|
2704
|
+
})
|
|
2705
|
+
});
|
|
2706
|
+
|
|
2707
|
+
// src/commands/te-analysis/dashboard-definition/import.ts
|
|
2708
|
+
var dashboardDefinitionImport = createAnalysisCapabilityCommand({
|
|
2709
|
+
resource: "dashboard-definition",
|
|
2710
|
+
command: "import",
|
|
2711
|
+
capabilityId: "analysis.dashboard_definition.import",
|
|
2712
|
+
description: "Validate or import dashboard definition JSON. Use --validate-only for import pre-check.",
|
|
2713
|
+
flags: [
|
|
2714
|
+
projectIdFlag,
|
|
2715
|
+
{ name: "definition", type: "json", required: true, desc: "Dashboard definition JSON object." },
|
|
2716
|
+
{ name: "validate-only", type: "boolean", required: false, desc: "Only validate import conflicts and importable state." },
|
|
2717
|
+
{ name: "dashboard-name-conflict-policy", type: "string", required: false, desc: "Optional dashboard name conflict policy." },
|
|
2718
|
+
{ name: "space-dashboard-policy", type: "string", required: false, desc: "Optional space/dashboard import policy." },
|
|
2719
|
+
payloadFlag
|
|
2720
|
+
],
|
|
2721
|
+
risk: "write",
|
|
2722
|
+
buildInput: (ctx) => compactInput({
|
|
2723
|
+
...projectInput(ctx),
|
|
2724
|
+
definition: ctx.json("definition"),
|
|
2725
|
+
validate_only: optionalBoolean2(ctx, "validate-only"),
|
|
2726
|
+
dashboard_name_conflict_policy: optionalString2(ctx, "dashboard-name-conflict-policy"),
|
|
2727
|
+
space_dashboard_policy: optionalString2(ctx, "space-dashboard-policy"),
|
|
2728
|
+
payload: optionalJson(ctx, "payload")
|
|
2729
|
+
})
|
|
2730
|
+
});
|
|
2731
|
+
|
|
2732
|
+
// src/commands/te-analysis/dashboard-definition/index.ts
|
|
2733
|
+
var commands24 = [
|
|
2734
|
+
dashboardDefinitionExport,
|
|
2735
|
+
dashboardDefinitionImport
|
|
2736
|
+
];
|
|
2737
|
+
var dashboard_definition_default = commands24;
|
|
2738
|
+
|
|
2739
|
+
// src/commands/te-analysis/dashboard-daily-report/shared.ts
|
|
2740
|
+
function dailyReportFlags(update) {
|
|
2741
|
+
const falseDefault = update ? " Default: false." : "";
|
|
2742
|
+
const emptyDefault = update ? " Default: empty." : "";
|
|
2743
|
+
const weekdayDefault = update ? " Default: 1,2,3,4,5,6,7." : "";
|
|
2744
|
+
const timeDefault = update ? " Default: 09:00." : "";
|
|
2745
|
+
const langDefault = update ? " Default: zh-CN." : "";
|
|
2746
|
+
const screenDefault = update ? " Default: normal." : "";
|
|
2747
|
+
const zoneDefault = update ? " Default: 0." : "";
|
|
2748
|
+
return [
|
|
2749
|
+
{ name: "need-csv", type: "boolean", required: false, desc: `Whether to include CSV attachment.${falseDefault}` },
|
|
2750
|
+
{ name: "host-url", type: "string", required: false, desc: `Public host URL used in report links.${emptyDefault}` },
|
|
2751
|
+
{ name: "enable-smtp", type: "boolean", required: false, desc: `Whether to use configured SMTP for email.${falseDefault}` },
|
|
2752
|
+
{ name: "enable-email", type: "boolean", required: false, desc: `Whether to send by email.${falseDefault}` },
|
|
2753
|
+
{ name: "enable-dd", type: "boolean", required: false, desc: `Whether to send by DingTalk webhook.${falseDefault}` },
|
|
2754
|
+
{ name: "dd-url", type: "json", required: false, desc: 'DingTalk webhook URL array, e.g. ["https://..."].' },
|
|
2755
|
+
{ name: "enable-wx", type: "boolean", required: false, desc: `Whether to send by WeCom webhook.${falseDefault}` },
|
|
2756
|
+
{ name: "wx-url", type: "json", required: false, desc: 'WeCom webhook URL array, e.g. ["https://..."].' },
|
|
2757
|
+
{ name: "enable-feishu", type: "boolean", required: false, desc: `Whether to send by Feishu webhook.${falseDefault}` },
|
|
2758
|
+
{ name: "feishu-info", type: "json", required: false, desc: 'Feishu config object, e.g. {"webhook":["https://..."]}.' },
|
|
2759
|
+
{ name: "enable-kim", type: "boolean", required: false, desc: `Whether to send by KIM/custom webhook.${falseDefault}` },
|
|
2760
|
+
{ name: "kim-url", type: "json", required: false, desc: 'KIM/custom webhook URL array, e.g. ["https://..."].' },
|
|
2761
|
+
{ name: "enable-slack", type: "boolean", required: false, desc: `Whether to send by Slack webhook.${falseDefault}` },
|
|
2762
|
+
{ name: "slack-url", type: "json", required: false, desc: 'Slack webhook URL array, e.g. ["https://..."].' },
|
|
2763
|
+
{ name: "email-login-users", type: "string", required: false, desc: "Comma-separated login users for email channel." },
|
|
2764
|
+
{ name: "email-new", type: "string", required: false, desc: "Comma-separated external emails when SMTP is enabled." },
|
|
2765
|
+
{ name: "send-title", type: "string", required: false, desc: "Daily report title." },
|
|
2766
|
+
{ name: "send-content", type: "string", required: false, desc: "Daily report content." },
|
|
2767
|
+
{ name: "send-date", type: "string", required: false, desc: `Scheduled weekdays, comma-separated 1..7.${weekdayDefault}` },
|
|
2768
|
+
{ name: "send-time", type: "string", required: false, desc: `Scheduled send time, HH:mm.${timeDefault}` },
|
|
2769
|
+
{ name: "lang", type: "string", required: false, desc: `Report language.${langDefault}` },
|
|
2770
|
+
{ name: "screen-type", type: "string", required: false, desc: `Screenshot screen type.${screenDefault}` },
|
|
2771
|
+
{ name: "zone-offset", type: "number", required: false, desc: `Time zone offset.${zoneDefault}` },
|
|
2772
|
+
...update ? [
|
|
2773
|
+
{ name: "enable-send", type: "boolean", required: false, desc: "Whether to enable scheduled sending. Default: false." }
|
|
2774
|
+
] : []
|
|
2775
|
+
];
|
|
2776
|
+
}
|
|
2777
|
+
function dailyReportInput(ctx, update) {
|
|
2778
|
+
const payload = optionalJson(ctx, "payload");
|
|
2779
|
+
const useDefaults = update && payload === void 0;
|
|
2780
|
+
return compactInput({
|
|
2781
|
+
...projectInput(ctx),
|
|
2782
|
+
dashboard_id: ctx.num("dashboard-id"),
|
|
2783
|
+
need_csv: useDefaults ? booleanWithDefault(ctx, "need-csv", false) : optionalBoolean2(ctx, "need-csv"),
|
|
2784
|
+
host_url: useDefaults ? stringWithDefault(ctx, "host-url", "") : optionalString2(ctx, "host-url"),
|
|
2785
|
+
enable_smtp: useDefaults ? booleanWithDefault(ctx, "enable-smtp", false) : optionalBoolean2(ctx, "enable-smtp"),
|
|
2786
|
+
enable_email: useDefaults ? booleanWithDefault(ctx, "enable-email", false) : optionalBoolean2(ctx, "enable-email"),
|
|
2787
|
+
enable_dd: useDefaults ? booleanWithDefault(ctx, "enable-dd", false) : optionalBoolean2(ctx, "enable-dd"),
|
|
2788
|
+
dd_url: optionalJson(ctx, "dd-url"),
|
|
2789
|
+
enable_wx: useDefaults ? booleanWithDefault(ctx, "enable-wx", false) : optionalBoolean2(ctx, "enable-wx"),
|
|
2790
|
+
wx_url: optionalJson(ctx, "wx-url"),
|
|
2791
|
+
enable_feishu: useDefaults ? booleanWithDefault(ctx, "enable-feishu", false) : optionalBoolean2(ctx, "enable-feishu"),
|
|
2792
|
+
feishu_info: optionalJson(ctx, "feishu-info"),
|
|
2793
|
+
enable_kim: useDefaults ? booleanWithDefault(ctx, "enable-kim", false) : optionalBoolean2(ctx, "enable-kim"),
|
|
2794
|
+
kim_url: optionalJson(ctx, "kim-url"),
|
|
2795
|
+
enable_slack: useDefaults ? booleanWithDefault(ctx, "enable-slack", false) : optionalBoolean2(ctx, "enable-slack"),
|
|
2796
|
+
slack_url: optionalJson(ctx, "slack-url"),
|
|
2797
|
+
email_login_users: optionalString2(ctx, "email-login-users"),
|
|
2798
|
+
email_new: optionalString2(ctx, "email-new"),
|
|
2799
|
+
send_title: optionalString2(ctx, "send-title"),
|
|
2800
|
+
send_content: optionalString2(ctx, "send-content"),
|
|
2801
|
+
send_date: useDefaults ? stringWithDefault(ctx, "send-date", "1,2,3,4,5,6,7") : optionalString2(ctx, "send-date"),
|
|
2802
|
+
send_time: useDefaults ? stringWithDefault(ctx, "send-time", "09:00") : optionalString2(ctx, "send-time"),
|
|
2803
|
+
lang: useDefaults ? stringWithDefault(ctx, "lang", "zh-CN") : optionalString2(ctx, "lang"),
|
|
2804
|
+
screen_type: useDefaults ? stringWithDefault(ctx, "screen-type", "normal") : optionalString2(ctx, "screen-type"),
|
|
2805
|
+
zone_offset: useDefaults ? numberWithDefault(ctx, "zone-offset", 0) : optionalNumber2(ctx, "zone-offset"),
|
|
2806
|
+
enable_send: update ? useDefaults ? booleanWithDefault(ctx, "enable-send", false) : optionalBoolean2(ctx, "enable-send") : void 0,
|
|
2807
|
+
payload
|
|
2808
|
+
});
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2811
|
+
// src/commands/te-analysis/dashboard-daily-report/update.ts
|
|
2812
|
+
var dashboardDailyReportUpdate = createAnalysisCapabilityCommand({
|
|
2813
|
+
resource: "dashboard-daily-report",
|
|
2814
|
+
command: "update",
|
|
2815
|
+
capabilityId: "analysis.dashboard_daily_report.update",
|
|
2816
|
+
description: "Update dashboard daily report configuration.",
|
|
2817
|
+
flags: [
|
|
2818
|
+
projectIdFlag,
|
|
2819
|
+
{ name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
|
|
2820
|
+
...dailyReportFlags(true),
|
|
2821
|
+
payloadFlag
|
|
2822
|
+
],
|
|
2823
|
+
risk: "write",
|
|
2824
|
+
buildInput: (ctx) => dailyReportInput(ctx, true)
|
|
2825
|
+
});
|
|
2826
|
+
|
|
2827
|
+
// src/commands/te-analysis/dashboard-daily-report/send.ts
|
|
2828
|
+
var dashboardDailyReportSend = createAnalysisCapabilityCommand({
|
|
2829
|
+
resource: "dashboard-daily-report",
|
|
2830
|
+
command: "send",
|
|
2831
|
+
capabilityId: "analysis.dashboard_daily_report.send",
|
|
2832
|
+
description: "Send dashboard daily report immediately. Omit config to use saved config; pass channel flags for an ad hoc send.",
|
|
2833
|
+
flags: [
|
|
2834
|
+
projectIdFlag,
|
|
2835
|
+
{ name: "dashboard-id", type: "number", required: true, desc: "Dashboard ID." },
|
|
2836
|
+
...dailyReportFlags(false),
|
|
2837
|
+
payloadFlag
|
|
2838
|
+
],
|
|
2839
|
+
risk: "write",
|
|
2840
|
+
buildInput: (ctx) => dailyReportInput(ctx, false)
|
|
2841
|
+
});
|
|
2842
|
+
|
|
2843
|
+
// src/commands/te-analysis/dashboard-daily-report/index.ts
|
|
2844
|
+
var commands25 = [
|
|
2845
|
+
dashboardDailyReportUpdate,
|
|
2846
|
+
dashboardDailyReportSend
|
|
2847
|
+
];
|
|
2848
|
+
var dashboard_daily_report_default = commands25;
|
|
2849
|
+
|
|
2850
|
+
// src/commands/te-analysis/bi-panel/list.ts
|
|
2851
|
+
var biPanelList = createAnalysisCapabilityCommand({
|
|
2852
|
+
resource: "bi-panel",
|
|
2853
|
+
command: "list",
|
|
2854
|
+
capabilityId: "analysis.bi_panel.list",
|
|
2855
|
+
description: "List BI panels visible to the current user through the capability gateway.",
|
|
2856
|
+
flags: [projectIdFlag, queryFlag, fieldsFlag, directoryLimitFlag, offsetFlag],
|
|
2857
|
+
risk: "read",
|
|
2858
|
+
buildInput: listInput
|
|
2859
|
+
});
|
|
2860
|
+
|
|
2861
|
+
// src/commands/te-analysis/bi-panel/get.ts
|
|
2862
|
+
var biPanelGet = createAnalysisCapabilityCommand({
|
|
2863
|
+
resource: "bi-panel",
|
|
2864
|
+
command: "get",
|
|
2865
|
+
capabilityId: "analysis.bi_panel.get",
|
|
2866
|
+
description: "Get a BI panel released page structure. Use bi-panel-version get --version-type draft for unpublished edits.",
|
|
2867
|
+
flags: [
|
|
2868
|
+
projectIdFlag,
|
|
2869
|
+
{ name: "panel-id", type: "number", required: true, desc: "BI panel ID." },
|
|
2870
|
+
fieldsFlag
|
|
2871
|
+
],
|
|
2872
|
+
risk: "read",
|
|
2873
|
+
buildInput: (ctx) => compactInput({
|
|
2874
|
+
...projectInput(ctx),
|
|
2875
|
+
panel_id: ctx.num("panel-id"),
|
|
2876
|
+
fields: optionalJson(ctx, "fields")
|
|
2877
|
+
})
|
|
2878
|
+
});
|
|
2879
|
+
|
|
2880
|
+
// src/commands/te-analysis/bi-panel/create.ts
|
|
2881
|
+
var biPanelCreate = createAnalysisCapabilityCommand({
|
|
2882
|
+
resource: "bi-panel",
|
|
2883
|
+
command: "create",
|
|
2884
|
+
capabilityId: "analysis.bi_panel.create",
|
|
2885
|
+
description: "Create a BI panel.",
|
|
2886
|
+
flags: [
|
|
2887
|
+
projectIdFlag,
|
|
2888
|
+
{ name: "panel-name", type: "string", required: false, desc: "BI panel name." },
|
|
2889
|
+
{ name: "panel-uuid", type: "string", required: false, desc: "BI panel UUID." },
|
|
2890
|
+
{ name: "space-id", type: "number", required: false, desc: "Target project space ID." },
|
|
2891
|
+
{ name: "folder-id", type: "number", required: false, desc: "Target folder ID." },
|
|
2892
|
+
payloadFlag
|
|
2893
|
+
],
|
|
2894
|
+
risk: "write",
|
|
2895
|
+
buildInput: (ctx) => compactInput({
|
|
2896
|
+
...projectInput(ctx),
|
|
2897
|
+
panel_name: optionalString2(ctx, "panel-name"),
|
|
2898
|
+
panel_uuid: optionalString2(ctx, "panel-uuid"),
|
|
2899
|
+
space_id: optionalNumber2(ctx, "space-id"),
|
|
2900
|
+
folder_id: optionalNumber2(ctx, "folder-id"),
|
|
2901
|
+
payload: optionalJson(ctx, "payload")
|
|
2902
|
+
})
|
|
2903
|
+
});
|
|
2904
|
+
|
|
2905
|
+
// src/commands/te-analysis/bi-panel/update.ts
|
|
2906
|
+
var biPanelUpdate = createAnalysisCapabilityCommand({
|
|
2907
|
+
resource: "bi-panel",
|
|
2908
|
+
command: "update",
|
|
2909
|
+
capabilityId: "analysis.bi_panel.update",
|
|
2910
|
+
description: "Update BI panel content or metadata.",
|
|
2911
|
+
flags: [
|
|
2912
|
+
projectIdFlag,
|
|
2913
|
+
{ name: "panel-name", type: "string", required: false, desc: "BI panel name." },
|
|
2914
|
+
{ name: "panel-uuid", type: "string", required: false, desc: "BI panel UUID." },
|
|
2915
|
+
payloadFlag
|
|
2916
|
+
],
|
|
2917
|
+
risk: "write",
|
|
2918
|
+
buildInput: (ctx) => compactInput({
|
|
2919
|
+
...projectInput(ctx),
|
|
2920
|
+
panel_name: optionalString2(ctx, "panel-name"),
|
|
2921
|
+
panel_uuid: optionalString2(ctx, "panel-uuid"),
|
|
2922
|
+
payload: optionalJson(ctx, "payload")
|
|
2923
|
+
})
|
|
2924
|
+
});
|
|
2925
|
+
|
|
2926
|
+
// src/commands/te-analysis/bi-panel/delete.ts
|
|
2927
|
+
var biPanelDelete = createAnalysisCapabilityCommand({
|
|
2928
|
+
resource: "bi-panel",
|
|
2929
|
+
command: "delete",
|
|
2930
|
+
capabilityId: "analysis.bi_panel.delete",
|
|
2931
|
+
description: "Delete one or more BI panels.",
|
|
2932
|
+
flags: [projectIdFlag, { name: "panel-ids", type: "json", required: true, desc: "BI panel ID array." }],
|
|
2933
|
+
risk: "high-risk-write",
|
|
2934
|
+
buildInput: (ctx) => ({
|
|
2935
|
+
...projectInput(ctx),
|
|
2936
|
+
panel_ids: jsonArray(ctx, "panel-ids")
|
|
2937
|
+
})
|
|
2938
|
+
});
|
|
2939
|
+
|
|
2940
|
+
// src/commands/te-analysis/bi-panel/share.ts
|
|
2941
|
+
var biPanelShare = createAnalysisCapabilityCommand({
|
|
2942
|
+
resource: "bi-panel",
|
|
2943
|
+
command: "share",
|
|
2944
|
+
capabilityId: "analysis.bi_panel.share",
|
|
2945
|
+
description: "Modify BI panel sharing members.",
|
|
2946
|
+
flags: [projectIdFlag, { name: "panel-id", type: "number", required: true, desc: "BI panel ID." }, payloadFlag],
|
|
2947
|
+
risk: "write",
|
|
2948
|
+
buildInput: (ctx) => compactInput({
|
|
2949
|
+
...projectInput(ctx),
|
|
2950
|
+
panel_id: ctx.num("panel-id"),
|
|
2951
|
+
payload: optionalJson(ctx, "payload")
|
|
2952
|
+
})
|
|
2953
|
+
});
|
|
2954
|
+
|
|
2955
|
+
// src/commands/te-analysis/bi-panel/copy.ts
|
|
2956
|
+
var biPanelCopy = createAnalysisCapabilityCommand({
|
|
2957
|
+
resource: "bi-panel",
|
|
2958
|
+
command: "copy",
|
|
2959
|
+
capabilityId: "analysis.bi_panel.copy",
|
|
2960
|
+
description: "Copy a BI panel.",
|
|
2961
|
+
flags: [
|
|
2962
|
+
projectIdFlag,
|
|
2963
|
+
{ name: "panel-name", type: "string", required: false, desc: "New BI panel name." },
|
|
2964
|
+
{ name: "panel-uuid", type: "string", required: false, desc: "Source BI panel UUID." },
|
|
2965
|
+
{ name: "space-id", type: "number", required: false, desc: "Target project space ID." },
|
|
2966
|
+
{ name: "folder-id", type: "number", required: false, desc: "Target folder ID." },
|
|
2967
|
+
payloadFlag
|
|
2968
|
+
],
|
|
2969
|
+
risk: "write",
|
|
2970
|
+
buildInput: (ctx) => compactInput({
|
|
2971
|
+
...projectInput(ctx),
|
|
2972
|
+
panel_name: optionalString2(ctx, "panel-name"),
|
|
2973
|
+
panel_uuid: optionalString2(ctx, "panel-uuid"),
|
|
2974
|
+
space_id: optionalNumber2(ctx, "space-id"),
|
|
2975
|
+
folder_id: optionalNumber2(ctx, "folder-id"),
|
|
2976
|
+
payload: optionalJson(ctx, "payload")
|
|
2977
|
+
})
|
|
2978
|
+
});
|
|
2979
|
+
|
|
2980
|
+
// src/commands/te-analysis/bi-panel/index.ts
|
|
2981
|
+
var commands26 = [
|
|
2982
|
+
biPanelList,
|
|
2983
|
+
biPanelGet,
|
|
2984
|
+
biPanelCreate,
|
|
2985
|
+
biPanelUpdate,
|
|
2986
|
+
biPanelDelete,
|
|
2987
|
+
biPanelShare,
|
|
2988
|
+
biPanelCopy
|
|
2989
|
+
];
|
|
2990
|
+
var bi_panel_default = commands26;
|
|
2991
|
+
|
|
2992
|
+
// src/commands/te-analysis/bi-panel-version/get.ts
|
|
2993
|
+
var biPanelVersionGet = createAnalysisCapabilityCommand({
|
|
2994
|
+
resource: "bi-panel-version",
|
|
2995
|
+
command: "get",
|
|
2996
|
+
capabilityId: "analysis.bi_panel_version.get",
|
|
2997
|
+
description: "Get a BI panel release or draft version. Use draft to inspect unpublished edits.",
|
|
2998
|
+
flags: [
|
|
2999
|
+
projectIdFlag,
|
|
3000
|
+
{ name: "panel-id", type: "number", required: false, desc: "BI panel ID. Required when --panel-uuid is omitted." },
|
|
3001
|
+
{ name: "panel-uuid", type: "string", required: false, desc: "BI panel UUID. Required when --panel-id is omitted." },
|
|
3002
|
+
{ name: "version-type", type: "string", required: false, desc: "Version to inspect: release or draft. Default: release." },
|
|
3003
|
+
fieldsFlag
|
|
3004
|
+
],
|
|
3005
|
+
risk: "read",
|
|
3006
|
+
buildInput: (ctx) => compactInput({
|
|
3007
|
+
...projectInput(ctx),
|
|
3008
|
+
panel_id: ctx.str("panel-id") === "" ? void 0 : ctx.num("panel-id"),
|
|
3009
|
+
panel_uuid: optionalString2(ctx, "panel-uuid"),
|
|
3010
|
+
version_type: optionalString2(ctx, "version-type"),
|
|
3011
|
+
fields: optionalJson(ctx, "fields")
|
|
3012
|
+
})
|
|
3013
|
+
});
|
|
3014
|
+
|
|
3015
|
+
// src/commands/te-analysis/bi-panel-version/publish.ts
|
|
3016
|
+
var biPanelVersionPublish = createAnalysisCapabilityCommand({
|
|
3017
|
+
resource: "bi-panel-version",
|
|
3018
|
+
command: "publish",
|
|
3019
|
+
capabilityId: "analysis.bi_panel_version.publish",
|
|
3020
|
+
description: "Publish the current BI panel draft. Requires source version returned by bi-panel-version get.",
|
|
3021
|
+
flags: [
|
|
3022
|
+
projectIdFlag,
|
|
3023
|
+
{ name: "panel-id", type: "number", required: false, desc: "BI panel ID. Required when --panel-uuid is omitted." },
|
|
3024
|
+
{ name: "panel-uuid", type: "string", required: false, desc: "BI panel UUID. Required when --panel-id is omitted." },
|
|
3025
|
+
{ name: "source-version", type: "string", required: true, desc: "Current draft version to publish, for example 0.1." }
|
|
3026
|
+
],
|
|
3027
|
+
risk: "write",
|
|
3028
|
+
buildInput: (ctx) => compactInput({
|
|
3029
|
+
...projectInput(ctx),
|
|
3030
|
+
panel_id: ctx.str("panel-id") === "" ? void 0 : ctx.num("panel-id"),
|
|
3031
|
+
panel_uuid: optionalString2(ctx, "panel-uuid"),
|
|
3032
|
+
source_version: ctx.str("source-version")
|
|
3033
|
+
})
|
|
3034
|
+
});
|
|
3035
|
+
|
|
3036
|
+
// src/commands/te-analysis/bi-panel-version/index.ts
|
|
3037
|
+
var commands27 = [
|
|
3038
|
+
biPanelVersionGet,
|
|
3039
|
+
biPanelVersionPublish
|
|
3040
|
+
];
|
|
3041
|
+
var bi_panel_version_default = commands27;
|
|
3042
|
+
|
|
3043
|
+
// src/commands/te-analysis/bi-panel-page-data/run.ts
|
|
3044
|
+
var biPanelPageDataRun = createAnalysisCapabilityCommand({
|
|
3045
|
+
resource: "bi-panel-page-data",
|
|
3046
|
+
command: "run",
|
|
3047
|
+
capabilityId: "analysis.bi_panel_page_data.run",
|
|
3048
|
+
description: `Run a bounded BI panel page data query and return inline JSON. Chart results may include query_context_id; BI SQL chart contexts are not model-drilldown contexts unless drilldown_available=true. ${analysisDataRunRoutingHelp}`,
|
|
3049
|
+
flags: [
|
|
3050
|
+
projectIdFlag,
|
|
3051
|
+
{ name: "panel-id", type: "number", required: true, desc: "BI panel ID." },
|
|
3052
|
+
{ name: "page-key", type: "string", required: true, desc: "Page key returned by bi-panel get." },
|
|
3053
|
+
{ name: "result-type", type: "string", required: true, desc: "Result type: charts or summary." },
|
|
3054
|
+
{ name: "chart-ids", type: "json", required: false, desc: "Optional chart ID array." },
|
|
3055
|
+
{ name: "parameter-controls", type: "json", required: false, desc: "Optional parameter control override array." },
|
|
3056
|
+
{ name: "permission-controls", type: "json", required: false, desc: "Optional permission control array." },
|
|
3057
|
+
{ name: "chart-filter-controls", type: "json", required: false, desc: "Optional chart filter control array." },
|
|
3058
|
+
{ name: "columns", type: "json", required: false, desc: "Optional returned column array." },
|
|
3059
|
+
{ name: "row-limit", type: "number", required: false, desc: "BI chart row window control. Default: 100, max: 1000. This is chart paging, not the sync/export routing policy.", min: 1, max: 1e3 },
|
|
3060
|
+
{ name: "row-offset", type: "number", required: false, desc: "Chart row offset." },
|
|
3061
|
+
{ name: "block-limit", type: "number", required: false, desc: "Summary block limit." },
|
|
3062
|
+
{ name: "block-offset", type: "number", required: false, desc: "Summary block offset." },
|
|
3063
|
+
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
|
|
3064
|
+
{ name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
|
|
3065
|
+
syncTimeoutSecondsFlag,
|
|
3066
|
+
syncLimitFlag
|
|
3067
|
+
],
|
|
3068
|
+
risk: "read",
|
|
3069
|
+
buildInput: biPanelPageDataInput,
|
|
3070
|
+
postProcess: applyAnalysisInlineLimit
|
|
3071
|
+
});
|
|
3072
|
+
|
|
3073
|
+
// src/commands/te-analysis/bi-panel-page-data/export.ts
|
|
3074
|
+
var biPanelPageDataExport = createAnalysisCapabilityCommand({
|
|
3075
|
+
resource: "bi-panel-page-data",
|
|
3076
|
+
command: "export",
|
|
3077
|
+
capabilityId: "analysis.bi_panel_page_data.export",
|
|
3078
|
+
description: `Submit a BI panel page data query as an asynchronous gzip JSONL artifact. Chart exports may include query_context_id metadata; BI SQL chart contexts are not model-drilldown contexts unless drilldown_available=true. ${analysisDataExportRoutingHelp}`,
|
|
3079
|
+
flags: [
|
|
3080
|
+
projectIdFlag,
|
|
3081
|
+
{ name: "panel-id", type: "number", required: true, desc: "BI panel ID." },
|
|
3082
|
+
{ name: "page-key", type: "string", required: true, desc: "Page key returned by bi-panel get." },
|
|
3083
|
+
{ name: "result-type", type: "string", required: true, desc: "Result type: charts or summary." },
|
|
3084
|
+
{ name: "chart-ids", type: "json", required: false, desc: "Optional chart ID array." },
|
|
3085
|
+
{ name: "parameter-controls", type: "json", required: false, desc: "Optional parameter control override array." },
|
|
3086
|
+
{ name: "permission-controls", type: "json", required: false, desc: "Optional permission control array." },
|
|
3087
|
+
{ name: "chart-filter-controls", type: "json", required: false, desc: "Optional chart filter control array." },
|
|
3088
|
+
{ name: "columns", type: "json", required: false, desc: "Optional returned column array." },
|
|
3089
|
+
{ name: "row-limit", type: "number", required: false, desc: "BI chart row window control. Default: 100, max: 1000. This is chart paging, not the async artifact total-row policy.", min: 1, max: 1e3 },
|
|
3090
|
+
{ name: "row-offset", type: "number", required: false, desc: "Chart row offset." },
|
|
3091
|
+
{ name: "block-limit", type: "number", required: false, desc: "Summary block limit." },
|
|
3092
|
+
{ name: "block-offset", type: "number", required: false, desc: "Summary block offset." },
|
|
3093
|
+
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use cache. Default: true." },
|
|
3094
|
+
{ name: "request-id", type: "string", required: false, desc: "Optional cli_<32 lowercase hex> request ID. Generated when omitted." },
|
|
3095
|
+
asyncTimeoutSecondsFlag,
|
|
3096
|
+
{ name: "artifact-format", type: "string", required: false, desc: "Artifact format. Only jsonl is supported." }
|
|
3097
|
+
],
|
|
3098
|
+
risk: "read",
|
|
3099
|
+
buildInput: biPanelPageDataInput
|
|
3100
|
+
});
|
|
3101
|
+
|
|
3102
|
+
// src/commands/te-analysis/bi-panel-page-data/index.ts
|
|
3103
|
+
var commands28 = [
|
|
3104
|
+
biPanelPageDataRun,
|
|
3105
|
+
biPanelPageDataExport
|
|
3106
|
+
];
|
|
3107
|
+
var bi_panel_page_data_default = commands28;
|
|
3108
|
+
|
|
3109
|
+
// src/commands/te-analysis/project-space/list.ts
|
|
3110
|
+
var projectSpaceList = createAnalysisCapabilityCommand({
|
|
3111
|
+
resource: "project-space",
|
|
3112
|
+
command: "list",
|
|
3113
|
+
capabilityId: "analysis.project_space.list",
|
|
3114
|
+
description: "List project spaces visible to the current user.",
|
|
3115
|
+
flags: [projectIdFlag, queryFlag, fieldsFlag, directoryLimitFlag, offsetFlag],
|
|
3116
|
+
risk: "read",
|
|
3117
|
+
buildInput: listInput
|
|
3118
|
+
});
|
|
3119
|
+
|
|
3120
|
+
// src/commands/te-analysis/project-space/get.ts
|
|
3121
|
+
var projectSpaceGet = createAnalysisCapabilityCommand({
|
|
3122
|
+
resource: "project-space",
|
|
3123
|
+
command: "get",
|
|
3124
|
+
capabilityId: "analysis.project_space.get",
|
|
3125
|
+
description: "Get one project space detail.",
|
|
3126
|
+
flags: [projectIdFlag, { name: "space-id", type: "number", required: true, desc: "Project space ID." }, fieldsFlag],
|
|
3127
|
+
risk: "read",
|
|
3128
|
+
buildInput: (ctx) => compactInput({
|
|
3129
|
+
...projectInput(ctx),
|
|
3130
|
+
space_id: ctx.num("space-id"),
|
|
3131
|
+
fields: optionalJson(ctx, "fields")
|
|
3132
|
+
})
|
|
3133
|
+
});
|
|
3134
|
+
|
|
3135
|
+
// src/commands/te-analysis/project-space/index.ts
|
|
3136
|
+
var commands29 = [
|
|
3137
|
+
projectSpaceList,
|
|
3138
|
+
projectSpaceGet
|
|
3139
|
+
];
|
|
3140
|
+
var project_space_default = commands29;
|
|
3141
|
+
|
|
3142
|
+
// src/commands/te-analysis/favorite/add.ts
|
|
3143
|
+
var favoriteAdd = createAnalysisCapabilityCommand({
|
|
3144
|
+
resource: "favorite",
|
|
3145
|
+
command: "add",
|
|
3146
|
+
capabilityId: "analysis.favorite.add",
|
|
3147
|
+
description: "Favorite one dashboard, BI panel, or folder.",
|
|
3148
|
+
flags: [
|
|
3149
|
+
projectIdFlag,
|
|
3150
|
+
{ name: "asset-id", type: "number", required: false, desc: "Asset ID." },
|
|
3151
|
+
{ name: "asset-type", type: "string", required: false, desc: "Asset type, for example dashboard, bi_panel, or folder." },
|
|
3152
|
+
{ name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." },
|
|
3153
|
+
{ name: "id", type: "number", required: false, desc: "Backend DTO ID field when required." },
|
|
3154
|
+
payloadFlag
|
|
3155
|
+
],
|
|
3156
|
+
risk: "write",
|
|
3157
|
+
buildInput: (ctx) => compactInput({
|
|
3158
|
+
...projectInput(ctx),
|
|
3159
|
+
asset_id: optionalNumber2(ctx, "asset-id"),
|
|
3160
|
+
asset_type: optionalString2(ctx, "asset-type"),
|
|
3161
|
+
space_id: optionalNumber2(ctx, "space-id"),
|
|
3162
|
+
id: optionalNumber2(ctx, "id"),
|
|
3163
|
+
payload: optionalJson(ctx, "payload")
|
|
3164
|
+
})
|
|
3165
|
+
});
|
|
3166
|
+
|
|
3167
|
+
// src/commands/te-analysis/favorite/remove.ts
|
|
3168
|
+
var favoriteRemove = createAnalysisCapabilityCommand({
|
|
3169
|
+
resource: "favorite",
|
|
3170
|
+
command: "remove",
|
|
3171
|
+
capabilityId: "analysis.favorite.remove",
|
|
3172
|
+
description: "Remove favorite from one dashboard, BI panel, or folder.",
|
|
3173
|
+
flags: [
|
|
3174
|
+
projectIdFlag,
|
|
3175
|
+
{ name: "asset-id", type: "number", required: false, desc: "Asset ID." },
|
|
3176
|
+
{ name: "asset-type", type: "string", required: false, desc: "Asset type, for example dashboard, bi_panel, or folder." },
|
|
3177
|
+
{ name: "space-id", type: "number", required: false, desc: "Project space ID when relevant." },
|
|
3178
|
+
{ name: "id", type: "number", required: false, desc: "Backend DTO ID field when required." },
|
|
3179
|
+
payloadFlag
|
|
3180
|
+
],
|
|
3181
|
+
risk: "write",
|
|
3182
|
+
buildInput: (ctx) => compactInput({
|
|
3183
|
+
...projectInput(ctx),
|
|
3184
|
+
asset_id: optionalNumber2(ctx, "asset-id"),
|
|
3185
|
+
asset_type: optionalString2(ctx, "asset-type"),
|
|
3186
|
+
space_id: optionalNumber2(ctx, "space-id"),
|
|
3187
|
+
id: optionalNumber2(ctx, "id"),
|
|
3188
|
+
payload: optionalJson(ctx, "payload")
|
|
3189
|
+
})
|
|
3190
|
+
});
|
|
3191
|
+
|
|
3192
|
+
// src/commands/te-analysis/favorite/index.ts
|
|
3193
|
+
var commands30 = [
|
|
3194
|
+
favoriteAdd,
|
|
3195
|
+
favoriteRemove
|
|
3196
|
+
];
|
|
3197
|
+
var favorite_default = commands30;
|
|
3198
|
+
|
|
3199
|
+
// src/commands/te-analysis/public-link/create.ts
|
|
3200
|
+
var publicLinkCreate = createAnalysisCapabilityCommand({
|
|
3201
|
+
resource: "public-link",
|
|
3202
|
+
command: "create",
|
|
3203
|
+
capabilityId: "analysis.public_link.create",
|
|
3204
|
+
description: "Create a public link for a dashboard or BI panel.",
|
|
3205
|
+
flags: [
|
|
3206
|
+
projectIdFlag,
|
|
3207
|
+
{ name: "company-id", type: "number", required: false, desc: "Company ID. Derived from project ID when omitted." },
|
|
3208
|
+
{ name: "resource-type", type: "string", required: true, desc: "Resource type: dashboard or bi_panel." },
|
|
3209
|
+
{ name: "resource-id", type: "number", required: true, desc: "Target resource ID." },
|
|
3210
|
+
{ name: "access-controls", type: "json", required: false, desc: "Public link access-control JSON." },
|
|
3211
|
+
{ name: "remark", type: "string", required: false, desc: "Public link remark." },
|
|
3212
|
+
{ name: "effective-at", type: "string", required: true, desc: "Effective time, yyyy-MM-dd HH:mm:ss." },
|
|
3213
|
+
{ name: "expires-at", type: "string", required: true, desc: "Expiration time, yyyy-MM-dd HH:mm:ss." },
|
|
3214
|
+
payloadFlag
|
|
3215
|
+
],
|
|
3216
|
+
risk: "write",
|
|
3217
|
+
buildInput: (ctx) => compactInput({
|
|
3218
|
+
...projectInput(ctx),
|
|
3219
|
+
company_id: optionalNumber2(ctx, "company-id"),
|
|
3220
|
+
resource_type: ctx.str("resource-type"),
|
|
3221
|
+
resource_id: ctx.num("resource-id"),
|
|
3222
|
+
access_controls: optionalJson(ctx, "access-controls"),
|
|
3223
|
+
remark: optionalString2(ctx, "remark"),
|
|
3224
|
+
effective_at: ctx.str("effective-at"),
|
|
3225
|
+
expires_at: ctx.str("expires-at"),
|
|
3226
|
+
payload: optionalJson(ctx, "payload")
|
|
3227
|
+
})
|
|
3228
|
+
});
|
|
3229
|
+
|
|
3230
|
+
// src/commands/te-analysis/public-link/list.ts
|
|
3231
|
+
var publicLinkList = createAnalysisCapabilityCommand({
|
|
3232
|
+
resource: "public-link",
|
|
3233
|
+
command: "list",
|
|
3234
|
+
capabilityId: "analysis.public_link.list",
|
|
3235
|
+
description: "List public links in a project.",
|
|
3236
|
+
flags: [projectIdFlag, queryFlag, fieldsFlag, directoryLimitFlag, offsetFlag],
|
|
3237
|
+
risk: "read",
|
|
3238
|
+
buildInput: listInput
|
|
3239
|
+
});
|
|
3240
|
+
|
|
3241
|
+
// src/commands/te-analysis/public-link/update.ts
|
|
3242
|
+
var publicLinkUpdate = createAnalysisCapabilityCommand({
|
|
3243
|
+
resource: "public-link",
|
|
3244
|
+
command: "update",
|
|
3245
|
+
capabilityId: "analysis.public_link.update",
|
|
3246
|
+
description: "Update a public link.",
|
|
3247
|
+
flags: [
|
|
3248
|
+
projectIdFlag,
|
|
3249
|
+
{ name: "company-id", type: "number", required: false, desc: "Company ID. Derived from project ID when omitted." },
|
|
3250
|
+
{ name: "link-id", type: "number", required: true, desc: "Public link ID." },
|
|
3251
|
+
{ name: "access-controls", type: "json", required: false, desc: "Public link access-control JSON." },
|
|
3252
|
+
{ name: "remark", type: "string", required: false, desc: "Public link remark." },
|
|
3253
|
+
{ name: "effective-at", type: "string", required: true, desc: "Effective time, yyyy-MM-dd HH:mm:ss." },
|
|
3254
|
+
{ name: "expires-at", type: "string", required: true, desc: "Expiration time, yyyy-MM-dd HH:mm:ss." },
|
|
3255
|
+
payloadFlag
|
|
3256
|
+
],
|
|
3257
|
+
risk: "write",
|
|
3258
|
+
buildInput: (ctx) => compactInput({
|
|
3259
|
+
...projectInput(ctx),
|
|
3260
|
+
company_id: optionalNumber2(ctx, "company-id"),
|
|
3261
|
+
link_id: ctx.num("link-id"),
|
|
3262
|
+
access_controls: optionalJson(ctx, "access-controls"),
|
|
3263
|
+
remark: optionalString2(ctx, "remark"),
|
|
3264
|
+
effective_at: ctx.str("effective-at"),
|
|
3265
|
+
expires_at: ctx.str("expires-at"),
|
|
3266
|
+
payload: optionalJson(ctx, "payload")
|
|
3267
|
+
})
|
|
3268
|
+
});
|
|
3269
|
+
|
|
3270
|
+
// src/commands/te-analysis/public-link/offline.ts
|
|
3271
|
+
var publicLinkOffline = createAnalysisCapabilityCommand({
|
|
3272
|
+
resource: "public-link",
|
|
3273
|
+
command: "offline",
|
|
3274
|
+
capabilityId: "analysis.public_link.offline",
|
|
3275
|
+
description: "Offline one or more public links.",
|
|
3276
|
+
flags: [
|
|
3277
|
+
projectIdFlag,
|
|
3278
|
+
{ name: "company-id", type: "number", required: false, desc: "Company ID. Derived from project ID when omitted." },
|
|
3279
|
+
{ name: "link-id", type: "number", required: false, desc: "Public link ID." },
|
|
3280
|
+
{ name: "link-ids", type: "json", required: false, desc: "Public link ID array." }
|
|
3281
|
+
],
|
|
3282
|
+
risk: "write",
|
|
3283
|
+
buildInput: (ctx) => compactInput({
|
|
3284
|
+
...projectInput(ctx),
|
|
3285
|
+
company_id: optionalNumber2(ctx, "company-id"),
|
|
3286
|
+
link_id: optionalNumber2(ctx, "link-id"),
|
|
3287
|
+
link_ids: optionalJsonArray(ctx, "link-ids")
|
|
3288
|
+
})
|
|
3289
|
+
});
|
|
3290
|
+
|
|
3291
|
+
// src/commands/te-analysis/public-link/delete.ts
|
|
3292
|
+
var publicLinkDelete = createAnalysisCapabilityCommand({
|
|
3293
|
+
resource: "public-link",
|
|
3294
|
+
command: "delete",
|
|
3295
|
+
capabilityId: "analysis.public_link.delete",
|
|
3296
|
+
description: "Delete one or more public links.",
|
|
3297
|
+
flags: [
|
|
3298
|
+
projectIdFlag,
|
|
3299
|
+
{ name: "company-id", type: "number", required: false, desc: "Company ID. Derived from project ID when omitted." },
|
|
3300
|
+
{ name: "link-id", type: "number", required: false, desc: "Public link ID." },
|
|
3301
|
+
{ name: "link-ids", type: "json", required: false, desc: "Public link ID array." }
|
|
3302
|
+
],
|
|
3303
|
+
risk: "high-risk-write",
|
|
3304
|
+
buildInput: (ctx) => compactInput({
|
|
3305
|
+
...projectInput(ctx),
|
|
3306
|
+
company_id: optionalNumber2(ctx, "company-id"),
|
|
3307
|
+
link_id: optionalNumber2(ctx, "link-id"),
|
|
3308
|
+
link_ids: optionalJsonArray(ctx, "link-ids")
|
|
3309
|
+
})
|
|
3310
|
+
});
|
|
3311
|
+
|
|
3312
|
+
// src/commands/te-analysis/public-link/index.ts
|
|
3313
|
+
var commands31 = [
|
|
3314
|
+
publicLinkCreate,
|
|
3315
|
+
publicLinkList,
|
|
3316
|
+
publicLinkUpdate,
|
|
3317
|
+
publicLinkOffline,
|
|
3318
|
+
publicLinkDelete
|
|
3319
|
+
];
|
|
3320
|
+
var public_link_default = commands31;
|
|
3321
|
+
|
|
3322
|
+
// src/commands/te-analysis/model/cancel-query.ts
|
|
3323
|
+
var cancelQuery = createMcpCommand({
|
|
3324
|
+
command: "+cancel_query",
|
|
3325
|
+
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.",
|
|
3326
|
+
flags: [
|
|
3327
|
+
{ 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." },
|
|
3328
|
+
{ name: "reason", type: "string", required: false, desc: "Optional cancellation reason. Default: MCP_CANCEL_QUERY_TOOL." }
|
|
3329
|
+
],
|
|
3330
|
+
risk: "write",
|
|
3331
|
+
buildArgs: (ctx) => ({
|
|
3332
|
+
requestId: ctx.str("request_id"),
|
|
3333
|
+
reason: optionalString(ctx, "reason")
|
|
3334
|
+
})
|
|
3335
|
+
});
|
|
3336
|
+
|
|
3337
|
+
// src/commands/te-analysis/model/load-filters.ts
|
|
3338
|
+
var loadFilters = createMcpCommand({
|
|
3339
|
+
command: "+load_filters",
|
|
3340
|
+
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.",
|
|
3341
|
+
flags: [
|
|
3342
|
+
{ name: "project_id", type: "number", required: true, alias: "p", desc: "Project ID" },
|
|
3343
|
+
{ name: "quot", type: "string", required: true, desc: "Property identifier (field name). This is the property whose candidate values will be loaded." },
|
|
3344
|
+
{ name: "table_type", type: "string", required: true, desc: "Table type. Supported values: event and user." },
|
|
3345
|
+
{ name: "event_name", type: "string", required: false, desc: "Optional event name. Effective when table_type=event." },
|
|
3346
|
+
{ name: "inputdata", type: "string", required: false, desc: "Optional input prefix used for fuzzy filtering of candidate values." },
|
|
3347
|
+
{ name: "zone_offset", type: "number", required: false, desc: "Time zone offset in hours. For example, UTC+8 is 8" },
|
|
3348
|
+
{ name: "cluster_date_policy", type: "string", required: false, desc: "Cluster date policy. Supported values: LATEST, AUTO, SPECIFIED." },
|
|
3349
|
+
{ name: "specified_cluster_date", type: "string", required: false, desc: "Specified cluster date in yyyy-MM-dd format. Effective only when cluster_date_policy=SPECIFIED." },
|
|
3350
|
+
{ name: "is_report", type: "boolean", required: false, desc: "Whether this is report mode. Default: false" }
|
|
3351
|
+
],
|
|
3352
|
+
risk: "read",
|
|
3353
|
+
mcpService: "te_analysis_extend",
|
|
3354
|
+
buildArgs: (ctx) => ({
|
|
3355
|
+
projectId: ctx.num("project_id"),
|
|
3356
|
+
quot: ctx.str("quot"),
|
|
3357
|
+
tableType: ctx.str("table_type"),
|
|
3358
|
+
eventName: optionalString(ctx, "event_name"),
|
|
3359
|
+
inputdata: optionalString(ctx, "inputdata"),
|
|
3360
|
+
zoneOffset: optionalNumber(ctx, "zone_offset"),
|
|
3361
|
+
clusterDatePolicy: optionalString(ctx, "cluster_date_policy"),
|
|
3362
|
+
specifiedClusterDate: optionalString(ctx, "specified_cluster_date"),
|
|
3363
|
+
isReport: optionalBoolean(ctx, "is_report")
|
|
3364
|
+
})
|
|
3365
|
+
});
|
|
3366
|
+
|
|
3367
|
+
// src/commands/te-analysis/model/index.ts
|
|
3368
|
+
var commands32 = [
|
|
3369
|
+
cancelQuery,
|
|
3370
|
+
loadFilters
|
|
3371
|
+
];
|
|
3372
|
+
var model_default = commands32;
|
|
3373
|
+
|
|
3374
|
+
// src/commands/te-analysis/event-detail/shared.ts
|
|
3375
|
+
var eventDetailDefinitionFlag = {
|
|
3376
|
+
name: "definition",
|
|
3377
|
+
type: "json",
|
|
3378
|
+
required: true,
|
|
3379
|
+
desc: 'AI-facing event detail definition: {"event":"login","time_range":{"mode":"absolute","start_time":"2026-07-01 00:00:00","end_time":"2026-07-01 23:59:59"},"filters":{"relation":"and","items":[{"field":{"name":"country","type":"user_property"},"operator":"eq","values":["US"]}]},"properties":["#event_time",{"name":"country","type":"user_property"}],"sort":[{"field":"#event_time","order":"desc"}]}. Do not pass raw QP/eventView/taFilters.'
|
|
3380
|
+
};
|
|
3381
|
+
function eventDetailRunInput(ctx) {
|
|
3382
|
+
return compactInput({
|
|
3383
|
+
project_id: ctx.num("project-id"),
|
|
3384
|
+
definition: ctx.json("definition"),
|
|
3385
|
+
request_id: optionalString2(ctx, "request-id"),
|
|
3386
|
+
use_cache: optionalBoolean2(ctx, "use-cache"),
|
|
3387
|
+
zone_offset: optionalNumber2(ctx, "zone-offset"),
|
|
3388
|
+
limit: optionalNumber2(ctx, "limit"),
|
|
3389
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
|
|
3390
|
+
});
|
|
3391
|
+
}
|
|
3392
|
+
function eventDetailExportInput(ctx) {
|
|
3393
|
+
return compactInput({
|
|
3394
|
+
project_id: ctx.num("project-id"),
|
|
3395
|
+
definition: ctx.json("definition"),
|
|
3396
|
+
request_id: optionalString2(ctx, "request-id"),
|
|
3397
|
+
use_cache: optionalBoolean2(ctx, "use-cache"),
|
|
3398
|
+
zone_offset: optionalNumber2(ctx, "zone-offset"),
|
|
3399
|
+
format: optionalString2(ctx, "artifact-format"),
|
|
3400
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
|
|
3401
|
+
});
|
|
3402
|
+
}
|
|
3403
|
+
var eventDetailBaseFlags = [
|
|
3404
|
+
projectIdFlag,
|
|
3405
|
+
eventDetailDefinitionFlag,
|
|
3406
|
+
requestIdFlag,
|
|
3407
|
+
useCacheFlag2,
|
|
3408
|
+
zoneOffsetFlag2
|
|
3409
|
+
];
|
|
3410
|
+
var eventDetailExportFlags = [
|
|
3411
|
+
...eventDetailBaseFlags,
|
|
3412
|
+
artifactFormatFlag,
|
|
3413
|
+
asyncTimeoutSecondsFlag
|
|
3414
|
+
];
|
|
3415
|
+
|
|
3416
|
+
// src/commands/te-analysis/event-detail/run.ts
|
|
3417
|
+
var eventDetailRun = createAnalysisCapabilityCommand({
|
|
3418
|
+
resource: "event-detail",
|
|
3419
|
+
command: "run",
|
|
3420
|
+
capabilityId: "analysis.event_detail.run",
|
|
3421
|
+
description: `Run a bounded event detail query from an AI-facing definition. ${analysisDataRunRoutingHelp}`,
|
|
3422
|
+
flags: [
|
|
3423
|
+
...eventDetailBaseFlags,
|
|
3424
|
+
detailPreviewLimitFlag,
|
|
3425
|
+
syncTimeoutSecondsFlag
|
|
3426
|
+
],
|
|
3427
|
+
risk: "read",
|
|
3428
|
+
buildInput: eventDetailRunInput,
|
|
3429
|
+
postProcess: applyAnalysisInlineLimit
|
|
3430
|
+
});
|
|
3431
|
+
|
|
3432
|
+
// src/commands/te-analysis/event-detail/export.ts
|
|
3433
|
+
var eventDetailExport = createAnalysisCapabilityCommand({
|
|
3434
|
+
resource: "event-detail",
|
|
3435
|
+
command: "export",
|
|
3436
|
+
capabilityId: "analysis.event_detail.export",
|
|
3437
|
+
description: "Export complete event detail data as an asynchronous gzip artifact. The server reads backend pages internally; callers inspect and download one artifact without pagination.",
|
|
3438
|
+
flags: [
|
|
3439
|
+
...eventDetailExportFlags
|
|
3440
|
+
],
|
|
3441
|
+
risk: "read",
|
|
3442
|
+
buildInput: eventDetailExportInput
|
|
3443
|
+
});
|
|
3444
|
+
|
|
3445
|
+
// src/commands/te-analysis/event-detail/index.ts
|
|
3446
|
+
var commands33 = [
|
|
3447
|
+
eventDetailRun,
|
|
3448
|
+
eventDetailExport
|
|
3449
|
+
];
|
|
3450
|
+
var event_detail_default = commands33;
|
|
3451
|
+
|
|
3452
|
+
// src/commands/te-analysis/entity-detail/shared.ts
|
|
3453
|
+
var entityDetailDefinitionFlag = {
|
|
3454
|
+
name: "definition",
|
|
3455
|
+
type: "json",
|
|
3456
|
+
required: true,
|
|
3457
|
+
desc: 'Bounded entity detail definition: {"entity":"user","cohort":{"relation":"and","items":[{"field":{"name":"level","type":"user_property"},"operator":"gte","values":[1]}]},"properties":["#user_id",{"name":"country","type":"user_property"}],"sort":[{"field":"#user_id","order":"asc"}]}. cohort is AI-facing for user_property/tag/cluster filters; do not pass raw QP at the capability top level.'
|
|
3458
|
+
};
|
|
3459
|
+
function entityDetailRunInput(ctx) {
|
|
3460
|
+
return compactInput({
|
|
3461
|
+
project_id: ctx.num("project-id"),
|
|
3462
|
+
definition: ctx.json("definition"),
|
|
3463
|
+
request_id: optionalString2(ctx, "request-id"),
|
|
3464
|
+
use_cache: optionalBoolean2(ctx, "use-cache"),
|
|
3465
|
+
zone_offset: optionalNumber2(ctx, "zone-offset"),
|
|
3466
|
+
limit: optionalNumber2(ctx, "limit"),
|
|
3467
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
|
|
3468
|
+
});
|
|
3469
|
+
}
|
|
3470
|
+
function entityDetailExportInput(ctx) {
|
|
3471
|
+
return compactInput({
|
|
3472
|
+
project_id: ctx.num("project-id"),
|
|
3473
|
+
definition: ctx.json("definition"),
|
|
3474
|
+
request_id: optionalString2(ctx, "request-id"),
|
|
3475
|
+
use_cache: optionalBoolean2(ctx, "use-cache"),
|
|
3476
|
+
zone_offset: optionalNumber2(ctx, "zone-offset"),
|
|
3477
|
+
format: optionalString2(ctx, "artifact-format"),
|
|
3478
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
|
|
3479
|
+
});
|
|
3480
|
+
}
|
|
3481
|
+
var entityDetailBaseFlags = [
|
|
3482
|
+
projectIdFlag,
|
|
3483
|
+
entityDetailDefinitionFlag,
|
|
3484
|
+
requestIdFlag,
|
|
3485
|
+
useCacheFlag2,
|
|
3486
|
+
zoneOffsetFlag2
|
|
3487
|
+
];
|
|
3488
|
+
var entityDetailExportFlags = [
|
|
3489
|
+
...entityDetailBaseFlags,
|
|
3490
|
+
artifactFormatFlag,
|
|
3491
|
+
asyncTimeoutSecondsFlag
|
|
3492
|
+
];
|
|
3493
|
+
|
|
3494
|
+
// src/commands/te-analysis/entity-detail/run.ts
|
|
3495
|
+
var entityDetailRun = createAnalysisCapabilityCommand({
|
|
3496
|
+
resource: "entity-detail",
|
|
3497
|
+
command: "run",
|
|
3498
|
+
capabilityId: "analysis.entity_detail.run",
|
|
3499
|
+
description: `Run a bounded entity detail query from a cluster cohort definition. ${analysisDataRunRoutingHelp}`,
|
|
3500
|
+
flags: [
|
|
3501
|
+
...entityDetailBaseFlags,
|
|
3502
|
+
detailPreviewLimitFlag,
|
|
3503
|
+
syncTimeoutSecondsFlag
|
|
3504
|
+
],
|
|
3505
|
+
risk: "read",
|
|
3506
|
+
buildInput: entityDetailRunInput,
|
|
3507
|
+
postProcess: applyAnalysisInlineLimit
|
|
3508
|
+
});
|
|
3509
|
+
|
|
3510
|
+
// src/commands/te-analysis/entity-detail/export.ts
|
|
3511
|
+
var entityDetailExport = createAnalysisCapabilityCommand({
|
|
3512
|
+
resource: "entity-detail",
|
|
3513
|
+
command: "export",
|
|
3514
|
+
capabilityId: "analysis.entity_detail.export",
|
|
3515
|
+
description: "Export complete entity detail data as an asynchronous gzip artifact. The server reads backend pages internally; callers inspect and download one artifact without pagination.",
|
|
3516
|
+
flags: [
|
|
3517
|
+
...entityDetailExportFlags
|
|
3518
|
+
],
|
|
3519
|
+
risk: "read",
|
|
3520
|
+
buildInput: entityDetailExportInput
|
|
3521
|
+
});
|
|
3522
|
+
|
|
3523
|
+
// src/commands/te-analysis/entity-detail/index.ts
|
|
3524
|
+
var commands34 = [
|
|
3525
|
+
entityDetailRun,
|
|
3526
|
+
entityDetailExport
|
|
3527
|
+
];
|
|
3528
|
+
var entity_detail_default = commands34;
|
|
3529
|
+
|
|
3530
|
+
// src/commands/te-analysis/drilldown-users/shared.ts
|
|
3531
|
+
var queryContextIdFlag = {
|
|
3532
|
+
name: "query-context-id",
|
|
3533
|
+
type: "string",
|
|
3534
|
+
required: true,
|
|
3535
|
+
desc: "query_context_id returned by an analysis data run/export."
|
|
3536
|
+
};
|
|
3537
|
+
var jsonlArtifactFormatFlag = {
|
|
3538
|
+
name: "artifact-format",
|
|
3539
|
+
type: "string",
|
|
3540
|
+
required: false,
|
|
3541
|
+
desc: "Artifact format. Only jsonl is supported."
|
|
3542
|
+
};
|
|
3543
|
+
var drilldownUsersBaseFlags = [
|
|
3544
|
+
queryContextIdFlag,
|
|
3545
|
+
targetFlag,
|
|
3546
|
+
propertiesFlag,
|
|
3547
|
+
requestIdFlag,
|
|
3548
|
+
useCacheFlag
|
|
3549
|
+
];
|
|
3550
|
+
var drilldownUsersRunFlags = [
|
|
3551
|
+
...drilldownUsersBaseFlags,
|
|
3552
|
+
detailPreviewLimitFlag,
|
|
3553
|
+
syncTimeoutSecondsFlag
|
|
3554
|
+
];
|
|
3555
|
+
var drilldownUsersExportFlags = [
|
|
3556
|
+
...drilldownUsersBaseFlags,
|
|
3557
|
+
jsonlArtifactFormatFlag,
|
|
3558
|
+
asyncTimeoutSecondsFlag
|
|
3559
|
+
];
|
|
3560
|
+
function drilldownUsersRunInput(ctx) {
|
|
3561
|
+
return compactInput({
|
|
3562
|
+
...baseInput(ctx),
|
|
3563
|
+
limit: optionalNumber2(ctx, "limit"),
|
|
3564
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
|
|
3565
|
+
});
|
|
3566
|
+
}
|
|
3567
|
+
function drilldownUsersExportInput(ctx) {
|
|
3568
|
+
return compactInput({
|
|
3569
|
+
...baseInput(ctx),
|
|
3570
|
+
format: optionalString2(ctx, "artifact-format"),
|
|
3571
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
|
|
3572
|
+
});
|
|
3573
|
+
}
|
|
3574
|
+
function baseInput(ctx) {
|
|
3575
|
+
return {
|
|
3576
|
+
query_context_id: ctx.str("query-context-id"),
|
|
3577
|
+
target: ctx.json("target"),
|
|
3578
|
+
properties: optionalJson(ctx, "properties"),
|
|
3579
|
+
request_id: optionalString2(ctx, "request-id"),
|
|
3580
|
+
use_cache: optionalBoolean2(ctx, "use-cache")
|
|
3581
|
+
};
|
|
3582
|
+
}
|
|
3583
|
+
|
|
3584
|
+
// src/commands/te-analysis/drilldown-users/export.ts
|
|
3585
|
+
var drilldownUsersExport = createAnalysisCapabilityCommand({
|
|
3586
|
+
resource: "drilldown-users",
|
|
3587
|
+
command: "export",
|
|
3588
|
+
capabilityId: "analysis.query.drilldown_users.export",
|
|
3589
|
+
description: `Export users from a previous analysis query context as a jsonl artifact. ${analysisDataExportRoutingHelp}`,
|
|
3590
|
+
flags: [...drilldownUsersExportFlags],
|
|
3591
|
+
risk: "read",
|
|
3592
|
+
buildInput: drilldownUsersExportInput
|
|
3593
|
+
});
|
|
3594
|
+
|
|
3595
|
+
// src/commands/te-analysis/drilldown-users/run.ts
|
|
3596
|
+
var drilldownUsersRun = createAnalysisCapabilityCommand({
|
|
3597
|
+
resource: "drilldown-users",
|
|
3598
|
+
command: "run",
|
|
3599
|
+
capabilityId: "analysis.query.drilldown_users",
|
|
3600
|
+
description: `Preview users from a previous analysis query context. Do not pass raw QP. ${analysisDataRunRoutingHelp}`,
|
|
3601
|
+
flags: [...drilldownUsersRunFlags],
|
|
3602
|
+
risk: "read",
|
|
3603
|
+
buildInput: drilldownUsersRunInput,
|
|
3604
|
+
postProcess: applyAnalysisInlineLimit
|
|
3605
|
+
});
|
|
3606
|
+
|
|
3607
|
+
// src/commands/te-analysis/drilldown-users/index.ts
|
|
3608
|
+
var commands35 = [drilldownUsersRun, drilldownUsersExport];
|
|
3609
|
+
var drilldown_users_default = commands35;
|
|
3610
|
+
|
|
3611
|
+
// src/commands/te-analysis/drilldown-user-events/shared.ts
|
|
3612
|
+
var drilldownContextIdFlag = {
|
|
3613
|
+
name: "drilldown-context-id",
|
|
3614
|
+
type: "string",
|
|
3615
|
+
required: true,
|
|
3616
|
+
desc: "drilldown_context_id returned by analysis drilldown-users run."
|
|
3617
|
+
};
|
|
3618
|
+
var userIdFlag = {
|
|
3619
|
+
name: "user-id",
|
|
3620
|
+
type: "string",
|
|
3621
|
+
required: true,
|
|
3622
|
+
desc: "User ID returned by analysis drilldown-users run/export."
|
|
3623
|
+
};
|
|
3624
|
+
var sequenceFlags = [
|
|
3625
|
+
propertiesFlag,
|
|
3626
|
+
{ name: "sort-order", type: "string", required: false, desc: "Event time sort order: asc or desc." },
|
|
3627
|
+
{ name: "event-name-filter", type: "string", required: false, desc: "Optional event-name filter." },
|
|
3628
|
+
{ name: "time-filter", type: "string", required: false, desc: "Optional time filter condition." },
|
|
3629
|
+
{ name: "time-filter-before-nums", type: "number", required: false, desc: "Optional events before the time filter point." },
|
|
3630
|
+
{ name: "time-filter-after-nums", type: "number", required: false, desc: "Optional events after the time filter point." }
|
|
3631
|
+
];
|
|
3632
|
+
var jsonlArtifactFormatFlag2 = {
|
|
3633
|
+
name: "artifact-format",
|
|
3634
|
+
type: "string",
|
|
3635
|
+
required: false,
|
|
3636
|
+
desc: "Artifact format. Only jsonl is supported."
|
|
3637
|
+
};
|
|
3638
|
+
var drilldownUserEventsBaseFlags = [
|
|
3639
|
+
drilldownContextIdFlag,
|
|
3640
|
+
userIdFlag,
|
|
3641
|
+
...sequenceFlags,
|
|
3642
|
+
requestIdFlag,
|
|
3643
|
+
useCacheFlag
|
|
3644
|
+
];
|
|
3645
|
+
var drilldownUserEventsRunFlags = [
|
|
3646
|
+
...drilldownUserEventsBaseFlags,
|
|
3647
|
+
detailPreviewLimitFlag,
|
|
3648
|
+
syncTimeoutSecondsFlag
|
|
3649
|
+
];
|
|
3650
|
+
var drilldownUserEventsExportFlags = [
|
|
3651
|
+
...drilldownUserEventsBaseFlags,
|
|
3652
|
+
jsonlArtifactFormatFlag2,
|
|
3653
|
+
asyncTimeoutSecondsFlag
|
|
3654
|
+
];
|
|
3655
|
+
function drilldownUserEventsRunInput(ctx) {
|
|
3656
|
+
return compactInput({
|
|
3657
|
+
...baseInput2(ctx),
|
|
3658
|
+
limit: optionalNumber2(ctx, "limit"),
|
|
3659
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
|
|
3660
|
+
});
|
|
3661
|
+
}
|
|
3662
|
+
function drilldownUserEventsExportInput(ctx) {
|
|
3663
|
+
return compactInput({
|
|
3664
|
+
...baseInput2(ctx),
|
|
3665
|
+
format: optionalString2(ctx, "artifact-format"),
|
|
3666
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds")
|
|
3667
|
+
});
|
|
3668
|
+
}
|
|
3669
|
+
function baseInput2(ctx) {
|
|
3670
|
+
return {
|
|
3671
|
+
drilldown_context_id: ctx.str("drilldown-context-id"),
|
|
3672
|
+
user_id: ctx.str("user-id"),
|
|
3673
|
+
properties: optionalJson(ctx, "properties"),
|
|
3674
|
+
sort_order: optionalString2(ctx, "sort-order"),
|
|
3675
|
+
event_name_filter: optionalString2(ctx, "event-name-filter"),
|
|
3676
|
+
time_filter: optionalString2(ctx, "time-filter"),
|
|
3677
|
+
time_filter_before_nums: optionalNumber2(ctx, "time-filter-before-nums"),
|
|
3678
|
+
time_filter_after_nums: optionalNumber2(ctx, "time-filter-after-nums"),
|
|
3679
|
+
request_id: optionalString2(ctx, "request-id"),
|
|
3680
|
+
use_cache: optionalBoolean2(ctx, "use-cache")
|
|
3681
|
+
};
|
|
3682
|
+
}
|
|
3683
|
+
|
|
3684
|
+
// src/commands/te-analysis/drilldown-user-events/export.ts
|
|
3685
|
+
var drilldownUserEventsExport = createAnalysisCapabilityCommand({
|
|
3686
|
+
resource: "drilldown-user-events",
|
|
3687
|
+
command: "export",
|
|
3688
|
+
capabilityId: "analysis.query.drilldown_user_events.export",
|
|
3689
|
+
description: `Export one user's event sequence from a drilldown context as a jsonl artifact. ${analysisDataExportRoutingHelp}`,
|
|
3690
|
+
flags: [...drilldownUserEventsExportFlags],
|
|
3691
|
+
risk: "read",
|
|
3692
|
+
buildInput: drilldownUserEventsExportInput
|
|
3693
|
+
});
|
|
3694
|
+
|
|
3695
|
+
// src/commands/te-analysis/drilldown-user-events/run.ts
|
|
3696
|
+
var drilldownUserEventsRun = createAnalysisCapabilityCommand({
|
|
3697
|
+
resource: "drilldown-user-events",
|
|
3698
|
+
command: "run",
|
|
3699
|
+
capabilityId: "analysis.query.drilldown_user_events",
|
|
3700
|
+
description: `Preview one user's event sequence from a drilldown context. Do not pass raw QP. ${analysisDataRunRoutingHelp}`,
|
|
3701
|
+
flags: [...drilldownUserEventsRunFlags],
|
|
3702
|
+
risk: "read",
|
|
3703
|
+
buildInput: drilldownUserEventsRunInput,
|
|
3704
|
+
postProcess: applyAnalysisInlineLimit
|
|
3705
|
+
});
|
|
3706
|
+
|
|
3707
|
+
// src/commands/te-analysis/drilldown-user-events/index.ts
|
|
3708
|
+
var commands36 = [drilldownUserEventsRun, drilldownUserEventsExport];
|
|
3709
|
+
var drilldown_user_events_default = commands36;
|
|
3710
|
+
|
|
3711
|
+
// src/commands/te-analysis/user/index.ts
|
|
3712
|
+
import { existsSync, statSync } from "fs";
|
|
3713
|
+
var authenticatedOnlyFlag = {
|
|
3714
|
+
name: "authenticated-only",
|
|
3715
|
+
type: "boolean",
|
|
3716
|
+
required: false,
|
|
3717
|
+
desc: "Return only resources whose metadata can be resolved under the current identity."
|
|
3718
|
+
};
|
|
3719
|
+
var tagListFieldsFlag = {
|
|
3720
|
+
...fieldsFlag,
|
|
3721
|
+
desc: "Optional tag inventory projection. Use tag_name, display_name, users_num, and other tag fields. cluster_name is reserved for user clusters and is rejected here."
|
|
3722
|
+
};
|
|
3723
|
+
var tagMemberFieldsFlag = {
|
|
3724
|
+
...fieldsFlag,
|
|
3725
|
+
desc: "Optional result fields. Defaults to #user_id, #account_id, #distinct_id, and tag_value."
|
|
3726
|
+
};
|
|
3727
|
+
var clusterMemberFieldsFlag = {
|
|
3728
|
+
...fieldsFlag,
|
|
3729
|
+
desc: "Optional result fields. Defaults to #user_id, #account_id, and #distinct_id."
|
|
3730
|
+
};
|
|
3731
|
+
var clusterNameFlag = {
|
|
3732
|
+
name: "cluster-name",
|
|
3733
|
+
type: "string",
|
|
3734
|
+
required: true,
|
|
3735
|
+
desc: "Exact cluster_name. Discover real values with analysis user-cluster list first."
|
|
3736
|
+
};
|
|
3737
|
+
var tagNameFlag = {
|
|
3738
|
+
name: "tag-name",
|
|
3739
|
+
type: "string",
|
|
3740
|
+
required: true,
|
|
3741
|
+
desc: "Exact tag_name. Discover real values with analysis user-tag list first."
|
|
3742
|
+
};
|
|
3743
|
+
var displayNameFlag = {
|
|
3744
|
+
name: "display-name",
|
|
3745
|
+
type: "string",
|
|
3746
|
+
required: true,
|
|
3747
|
+
desc: "Human-readable display name."
|
|
3748
|
+
};
|
|
3749
|
+
var optionalDisplayNameFlag = {
|
|
3750
|
+
...displayNameFlag,
|
|
3751
|
+
required: false,
|
|
3752
|
+
desc: "Optional new display name."
|
|
3753
|
+
};
|
|
3754
|
+
var clusterDefinitionRequestFlag = {
|
|
3755
|
+
name: "definition-request",
|
|
3756
|
+
type: "json",
|
|
3757
|
+
required: true,
|
|
3758
|
+
desc: "Semantic snake_case cluster definition. Read skills/ae-analysis/references/user_cluster_models.md; shared primitives are in audience_models.md."
|
|
3759
|
+
};
|
|
3760
|
+
var optionalClusterDefinitionRequestFlag = {
|
|
3761
|
+
...clusterDefinitionRequestFlag,
|
|
3762
|
+
required: false,
|
|
3763
|
+
desc: "Optional semantic snake_case cluster definition. Read user_cluster_models.md; raw filts, C-codes, ftv, columnName, and backend DTOs are rejected."
|
|
3764
|
+
};
|
|
3765
|
+
var tagDefinitionRequestFlag = {
|
|
3766
|
+
...clusterDefinitionRequestFlag,
|
|
3767
|
+
desc: "Semantic snake_case tag definition. Read skills/ae-analysis/references/user_tag_models.md; shared primitives are in audience_models.md."
|
|
3768
|
+
};
|
|
3769
|
+
var optionalTagDefinitionRequestFlag = {
|
|
3770
|
+
...tagDefinitionRequestFlag,
|
|
3771
|
+
required: false,
|
|
3772
|
+
desc: "Optional semantic snake_case tag definition. Read user_tag_models.md; raw filts, C-codes, ftv, columnName, and backend DTOs are rejected."
|
|
3773
|
+
};
|
|
3774
|
+
var zoneOffsetFlag3 = {
|
|
3775
|
+
name: "zone-offset",
|
|
3776
|
+
type: "number",
|
|
3777
|
+
required: false,
|
|
3778
|
+
desc: "Optional timezone offset. UTC+8 is 8; UTC-5 is -5."
|
|
3779
|
+
};
|
|
3780
|
+
var entityIdFlag = {
|
|
3781
|
+
name: "entity-id",
|
|
3782
|
+
type: "number",
|
|
3783
|
+
required: false,
|
|
3784
|
+
desc: "Optional entity ID. Required by ID-file create commands."
|
|
3785
|
+
};
|
|
3786
|
+
var requiredEntityIdFlag = {
|
|
3787
|
+
...entityIdFlag,
|
|
3788
|
+
required: true,
|
|
3789
|
+
desc: "Required analysis entity. Use the primary user entity only when matching uploaded external identifiers through a user property."
|
|
3790
|
+
};
|
|
3791
|
+
var inputFileIdFlag = {
|
|
3792
|
+
name: "input-file-id",
|
|
3793
|
+
type: "string",
|
|
3794
|
+
required: false,
|
|
3795
|
+
desc: "Reuse a file already uploaded for purpose analysis.user.id_import."
|
|
3796
|
+
};
|
|
3797
|
+
var inputFileFlag = {
|
|
3798
|
+
name: "input-file",
|
|
3799
|
+
type: "string",
|
|
3800
|
+
required: false,
|
|
3801
|
+
desc: "Local CSV path. The CLI uploads it with purpose analysis.user.id_import before executing the create/update capability."
|
|
3802
|
+
};
|
|
3803
|
+
var clusterFileContentFlag = {
|
|
3804
|
+
name: "file-content",
|
|
3805
|
+
type: "string",
|
|
3806
|
+
required: false,
|
|
3807
|
+
desc: "Headerless UTF-8 CSV. No header row. Exactly one non-empty column per row: association-property value for the primary user entity, otherwise the entity ID."
|
|
3808
|
+
};
|
|
3809
|
+
var tagFileContentFlag = {
|
|
3810
|
+
name: "file-content",
|
|
3811
|
+
type: "string",
|
|
3812
|
+
required: false,
|
|
3813
|
+
desc: "Headerless UTF-8 CSV. No header row. Exactly two non-empty columns per row: association-property value or entity ID, then tag_value."
|
|
3814
|
+
};
|
|
3815
|
+
var associationPropertyFlag = {
|
|
3816
|
+
name: "association-property",
|
|
3817
|
+
type: "string",
|
|
3818
|
+
required: false,
|
|
3819
|
+
desc: "Required only for the primary user entity. The first CSV column is matched against this allowed user property; #user_id is forbidden. Omit for non-primary entities."
|
|
3820
|
+
};
|
|
3821
|
+
var remarksFlag = {
|
|
3822
|
+
name: "remarks",
|
|
3823
|
+
type: "string",
|
|
3824
|
+
required: false,
|
|
3825
|
+
desc: "Optional remarks."
|
|
3826
|
+
};
|
|
3827
|
+
var remarkFlag = {
|
|
3828
|
+
name: "remark",
|
|
3829
|
+
type: "string",
|
|
3830
|
+
required: false,
|
|
3831
|
+
desc: "Optional new remark."
|
|
3832
|
+
};
|
|
3833
|
+
var propertyNamesFlag = {
|
|
3834
|
+
name: "property-names",
|
|
3835
|
+
type: "json",
|
|
3836
|
+
required: false,
|
|
3837
|
+
desc: "Optional JSON array of user property names to include."
|
|
3838
|
+
};
|
|
3839
|
+
var snapshotDateFlag = {
|
|
3840
|
+
name: "snapshot-date",
|
|
3841
|
+
type: "string",
|
|
3842
|
+
required: false,
|
|
3843
|
+
desc: "Optional tag snapshot date, yyyy-MM-dd."
|
|
3844
|
+
};
|
|
3845
|
+
var jsonlArtifactFormatFlag3 = {
|
|
3846
|
+
name: "artifact-format",
|
|
3847
|
+
type: "string",
|
|
3848
|
+
required: false,
|
|
3849
|
+
desc: "Artifact format. Only jsonl is supported for user member/history-tag exports."
|
|
3850
|
+
};
|
|
3851
|
+
var confirmedFlag = {
|
|
3852
|
+
name: "confirmed",
|
|
3853
|
+
type: "boolean",
|
|
3854
|
+
required: false,
|
|
3855
|
+
desc: "Set true only after dependency and influence checks have been accepted."
|
|
3856
|
+
};
|
|
3857
|
+
var refreshDateFlag = {
|
|
3858
|
+
name: "refresh-date",
|
|
3859
|
+
type: "string",
|
|
3860
|
+
required: true,
|
|
3861
|
+
desc: "History tag date to refresh, yyyy-MM-dd."
|
|
3862
|
+
};
|
|
3863
|
+
var historyViewFlag = {
|
|
3864
|
+
name: "view",
|
|
3865
|
+
type: "json",
|
|
3866
|
+
required: true,
|
|
3867
|
+
desc: "AI-facing history tag view with interval_type/property_range/time_particle/array_group_type/column_splited_str."
|
|
3868
|
+
};
|
|
3869
|
+
var groupColFlag = {
|
|
3870
|
+
name: "group-col",
|
|
3871
|
+
type: "string",
|
|
3872
|
+
required: true,
|
|
3873
|
+
desc: "Exact statistic value or bucket from history-tag-data results to drill down into."
|
|
3874
|
+
};
|
|
3875
|
+
function capability(resource, command, capabilityId, description, flags, risk, buildInput) {
|
|
3876
|
+
return createAnalysisCapabilityCommand({
|
|
3877
|
+
resource,
|
|
3878
|
+
command,
|
|
3879
|
+
capabilityId,
|
|
3880
|
+
description,
|
|
3881
|
+
flags,
|
|
3882
|
+
risk,
|
|
3883
|
+
buildInput
|
|
3884
|
+
});
|
|
3885
|
+
}
|
|
3886
|
+
function idImportCapability(command) {
|
|
3887
|
+
const originalValidate = command.validate;
|
|
3888
|
+
const originalValidateInput = command.validateInput;
|
|
3889
|
+
const originalDryRun = command.dryRun;
|
|
3890
|
+
const originalExecute = command.execute;
|
|
3891
|
+
return {
|
|
3892
|
+
...command,
|
|
3893
|
+
flags: command.flags.flatMap((flag) => flag.name === "input-file-id" ? [inputFileFlag, flag] : [flag]),
|
|
3894
|
+
validate: (ctx) => {
|
|
3895
|
+
originalValidate?.(ctx);
|
|
3896
|
+
const sources = ["input-file", "input-file-id", "file-content"].filter((name) => ctx.str(name).trim() !== "");
|
|
3897
|
+
if (sources.length !== 1) {
|
|
3898
|
+
throw new Error("Pass exactly one of --input-file, --input-file-id, or --file-content");
|
|
3899
|
+
}
|
|
3900
|
+
const localFile = ctx.str("input-file");
|
|
3901
|
+
if (localFile && (!existsSync(localFile) || !statSync(localFile).isFile())) {
|
|
3902
|
+
throw new Error(`--input-file must reference a readable local file: ${localFile}`);
|
|
3903
|
+
}
|
|
3904
|
+
},
|
|
3905
|
+
validateInput: originalValidateInput ? async (ctx) => ctx.str("input-file") ? {
|
|
3906
|
+
valid: true,
|
|
3907
|
+
validation_scope: "local_orchestration",
|
|
3908
|
+
input_file: ctx.str("input-file"),
|
|
3909
|
+
next_step: "Execution uploads this file with purpose analysis.user.id_import, then validates and executes the capability with the returned input_file_id."
|
|
3910
|
+
} : originalValidateInput(ctx) : void 0,
|
|
3911
|
+
dryRun: originalDryRun ? async (ctx) => {
|
|
3912
|
+
if (!ctx.str("input-file")) {
|
|
3913
|
+
return originalDryRun(ctx);
|
|
3914
|
+
}
|
|
3915
|
+
return {
|
|
3916
|
+
steps: [
|
|
3917
|
+
{
|
|
3918
|
+
method: "POST",
|
|
3919
|
+
url: buildCapabilityGatewayUrl(ctx.host(), resolveGatewayDomain("analysis"), "input-files"),
|
|
3920
|
+
body: { multipart: { project_id: ctx.num("project-id"), purpose: "analysis.user.id_import", file: ctx.str("input-file") } }
|
|
3921
|
+
},
|
|
3922
|
+
{
|
|
3923
|
+
method: "POST",
|
|
3924
|
+
url: `${ctx.host()}/api/cli/${resolveGatewayDomain("analysis")}/v1/capabilities/${command.capabilityId}/dry-run`,
|
|
3925
|
+
body: {
|
|
3926
|
+
input_file_id: "<input_file_id returned by upload step>",
|
|
3927
|
+
note: "The remaining command flags are sent unchanged after upload."
|
|
3928
|
+
}
|
|
3929
|
+
}
|
|
3930
|
+
]
|
|
3931
|
+
};
|
|
3932
|
+
} : void 0,
|
|
3933
|
+
execute: async (ctx) => {
|
|
3934
|
+
if (!ctx.str("input-file")) {
|
|
3935
|
+
return originalExecute(ctx);
|
|
3936
|
+
}
|
|
3937
|
+
const uploaded = await uploadInputFile(
|
|
3938
|
+
ctx.host(),
|
|
3939
|
+
resolveGatewayDomain("analysis"),
|
|
3940
|
+
ctx.num("project-id"),
|
|
3941
|
+
"analysis.user.id_import",
|
|
3942
|
+
ctx.str("input-file")
|
|
3943
|
+
);
|
|
3944
|
+
const inputFileId = uploadedInputFileId(uploaded);
|
|
3945
|
+
return originalExecute(withInputFileId(ctx, inputFileId));
|
|
3946
|
+
}
|
|
3947
|
+
};
|
|
3948
|
+
}
|
|
3949
|
+
function withInputFileId(ctx, inputFileId) {
|
|
3950
|
+
if (!inputFileId) return ctx;
|
|
3951
|
+
return new Proxy(ctx, {
|
|
3952
|
+
get(target, property, receiver) {
|
|
3953
|
+
if (property === "str") {
|
|
3954
|
+
return (name) => name === "input-file-id" ? inputFileId : target.str(name);
|
|
3955
|
+
}
|
|
3956
|
+
return Reflect.get(target, property, target);
|
|
3957
|
+
}
|
|
3958
|
+
});
|
|
3959
|
+
}
|
|
3960
|
+
function uploadedInputFileId(value) {
|
|
3961
|
+
const inputFileId = value?.input_file_id ?? value?.inputFileId ?? value?.data?.input_file_id ?? value?.data?.inputFileId;
|
|
3962
|
+
if (typeof inputFileId !== "string" || !inputFileId.startsWith("ifile_")) {
|
|
3963
|
+
throw new Error("Analysis input-file upload did not return input_file_id");
|
|
3964
|
+
}
|
|
3965
|
+
return inputFileId;
|
|
3966
|
+
}
|
|
3967
|
+
function assetListInput(ctx) {
|
|
3968
|
+
return compactInput({
|
|
3969
|
+
project_id: ctx.num("project-id"),
|
|
3970
|
+
query: optionalString2(ctx, "query"),
|
|
3971
|
+
fields: optionalJsonArray(ctx, "fields"),
|
|
3972
|
+
limit: optionalNumber2(ctx, "limit"),
|
|
3973
|
+
offset: optionalNumber2(ctx, "offset"),
|
|
3974
|
+
authenticated_only: optionalBoolean2(ctx, "authenticated-only")
|
|
3975
|
+
});
|
|
3976
|
+
}
|
|
3977
|
+
function memberInput(ctx, kind, inline) {
|
|
3978
|
+
return compactInput({
|
|
3979
|
+
project_id: ctx.num("project-id"),
|
|
3980
|
+
cluster_name: kind === "cluster" ? ctx.str("cluster-name") : void 0,
|
|
3981
|
+
tag_name: kind === "tag" ? ctx.str("tag-name") : void 0,
|
|
3982
|
+
snapshot_date: kind === "tag" ? optionalString2(ctx, "snapshot-date") : void 0,
|
|
3983
|
+
property_names: optionalJsonArray(ctx, "property-names"),
|
|
3984
|
+
fields: optionalJsonArray(ctx, "fields"),
|
|
3985
|
+
query: optionalString2(ctx, "query"),
|
|
3986
|
+
use_cache: optionalBoolean2(ctx, "use-cache"),
|
|
3987
|
+
request_id: optionalString2(ctx, "request-id"),
|
|
3988
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds"),
|
|
3989
|
+
limit: inline ? optionalNumber2(ctx, "limit") : void 0,
|
|
3990
|
+
format: inline ? void 0 : optionalJsonlFormat(ctx)
|
|
3991
|
+
});
|
|
3992
|
+
}
|
|
3993
|
+
function clusterWriteInput(ctx, create) {
|
|
3994
|
+
const definitionRequest = optionalJson(ctx, "definition-request");
|
|
3995
|
+
validateDefinitionRequest(create, definitionRequest);
|
|
3996
|
+
return compactInput({
|
|
3997
|
+
project_id: ctx.num("project-id"),
|
|
3998
|
+
cluster_name: ctx.str("cluster-name"),
|
|
3999
|
+
display_name: create ? ctx.str("display-name") : optionalString2(ctx, "display-name"),
|
|
4000
|
+
definition_request: definitionRequest,
|
|
4001
|
+
authenticated_only: optionalBoolean2(ctx, "authenticated-only"),
|
|
4002
|
+
remark: create ? void 0 : optionalString2(ctx, "remark"),
|
|
4003
|
+
zone_offset: optionalNumber2(ctx, "zone-offset"),
|
|
4004
|
+
entity_id: create ? optionalNumber2(ctx, "entity-id") : void 0
|
|
4005
|
+
});
|
|
4006
|
+
}
|
|
4007
|
+
function tagWriteInput(ctx, create) {
|
|
4008
|
+
const definitionRequest = optionalJson(ctx, "definition-request");
|
|
4009
|
+
validateDefinitionRequest(create, definitionRequest);
|
|
4010
|
+
return compactInput({
|
|
4011
|
+
project_id: ctx.num("project-id"),
|
|
4012
|
+
tag_name: ctx.str("tag-name"),
|
|
4013
|
+
display_name: create ? ctx.str("display-name") : optionalString2(ctx, "display-name"),
|
|
4014
|
+
definition_request: definitionRequest,
|
|
4015
|
+
authenticated_only: optionalBoolean2(ctx, "authenticated-only"),
|
|
4016
|
+
remark: create ? void 0 : optionalString2(ctx, "remark"),
|
|
4017
|
+
zone_offset: optionalNumber2(ctx, "zone-offset"),
|
|
4018
|
+
entity_id: create ? optionalNumber2(ctx, "entity-id") : void 0
|
|
4019
|
+
});
|
|
4020
|
+
}
|
|
4021
|
+
function validateDefinitionRequest(create, definitionRequest) {
|
|
4022
|
+
if (create && definitionRequest === void 0) {
|
|
4023
|
+
throw new Error("Pass --definition-request");
|
|
4024
|
+
}
|
|
4025
|
+
}
|
|
4026
|
+
function idClusterInput(ctx, create) {
|
|
4027
|
+
return compactInput({
|
|
4028
|
+
project_id: ctx.num("project-id"),
|
|
4029
|
+
cluster_name: create ? optionalString2(ctx, "cluster-name") : ctx.str("cluster-name"),
|
|
4030
|
+
display_name: create ? ctx.str("display-name") : optionalString2(ctx, "display-name"),
|
|
4031
|
+
input_file_id: optionalString2(ctx, "input-file-id"),
|
|
4032
|
+
file_content: optionalString2(ctx, "file-content"),
|
|
4033
|
+
entity_id: create ? ctx.num("entity-id") : void 0,
|
|
4034
|
+
remarks: optionalString2(ctx, "remarks"),
|
|
4035
|
+
main_column_name: optionalString2(ctx, "association-property")
|
|
4036
|
+
});
|
|
4037
|
+
}
|
|
4038
|
+
function idTagInput(ctx, create) {
|
|
4039
|
+
return compactInput({
|
|
4040
|
+
project_id: ctx.num("project-id"),
|
|
4041
|
+
tag_name: create ? optionalString2(ctx, "tag-name") : ctx.str("tag-name"),
|
|
4042
|
+
display_name: create ? ctx.str("display-name") : optionalString2(ctx, "display-name"),
|
|
4043
|
+
input_file_id: optionalString2(ctx, "input-file-id"),
|
|
4044
|
+
file_content: optionalString2(ctx, "file-content"),
|
|
4045
|
+
entity_id: create ? ctx.num("entity-id") : optionalNumber2(ctx, "entity-id"),
|
|
4046
|
+
remarks: optionalString2(ctx, "remarks"),
|
|
4047
|
+
main_column_name: optionalString2(ctx, "association-property")
|
|
4048
|
+
});
|
|
4049
|
+
}
|
|
4050
|
+
function historyTagDataInput(ctx, inline) {
|
|
4051
|
+
return compactInput({
|
|
4052
|
+
project_id: ctx.num("project-id"),
|
|
4053
|
+
tag_name: ctx.str("tag-name"),
|
|
4054
|
+
view: ctx.json("view"),
|
|
4055
|
+
request_id: optionalString2(ctx, "request-id"),
|
|
4056
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds"),
|
|
4057
|
+
limit: inline ? optionalNumber2(ctx, "limit") : void 0,
|
|
4058
|
+
format: inline ? void 0 : optionalJsonlFormat(ctx)
|
|
4059
|
+
});
|
|
4060
|
+
}
|
|
4061
|
+
function historyTagDataDrilldownInput(ctx, inline) {
|
|
4062
|
+
return compactInput({
|
|
4063
|
+
project_id: ctx.num("project-id"),
|
|
4064
|
+
tag_name: ctx.str("tag-name"),
|
|
4065
|
+
snapshot_date: ctx.str("snapshot-date"),
|
|
4066
|
+
group_col: ctx.str("group-col"),
|
|
4067
|
+
view: ctx.json("view"),
|
|
4068
|
+
property_names: optionalJsonArray(ctx, "property-names"),
|
|
4069
|
+
fields: optionalJsonArray(ctx, "fields"),
|
|
4070
|
+
query: optionalString2(ctx, "query"),
|
|
4071
|
+
use_cache: optionalBoolean2(ctx, "use-cache"),
|
|
4072
|
+
request_id: optionalString2(ctx, "request-id"),
|
|
4073
|
+
timeout_seconds: optionalNumber2(ctx, "timeout-seconds"),
|
|
4074
|
+
limit: inline ? optionalNumber2(ctx, "limit") : void 0,
|
|
4075
|
+
format: inline ? void 0 : optionalJsonlFormat(ctx)
|
|
4076
|
+
});
|
|
4077
|
+
}
|
|
4078
|
+
function optionalJsonlFormat(ctx) {
|
|
4079
|
+
const format = optionalString2(ctx, "artifact-format");
|
|
4080
|
+
if (format !== void 0 && format !== "jsonl") {
|
|
4081
|
+
throw new Error("--artifact-format only supports jsonl for user member/history-tag exports");
|
|
4082
|
+
}
|
|
4083
|
+
return format;
|
|
4084
|
+
}
|
|
4085
|
+
var listFlags = [projectIdFlag, queryFlag, fieldsFlag, directoryLimitFlag, offsetFlag, authenticatedOnlyFlag];
|
|
4086
|
+
var tagListFlags = [projectIdFlag, queryFlag, tagListFieldsFlag, directoryLimitFlag, offsetFlag, authenticatedOnlyFlag];
|
|
4087
|
+
var memberRunFlags = (memberFieldsFlag) => [
|
|
4088
|
+
projectIdFlag,
|
|
4089
|
+
propertyNamesFlag,
|
|
4090
|
+
memberFieldsFlag,
|
|
4091
|
+
queryFlag,
|
|
4092
|
+
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use query cache. Default: true." },
|
|
4093
|
+
requestIdFlag,
|
|
4094
|
+
memberLimitFlag,
|
|
4095
|
+
syncTimeoutSecondsFlag
|
|
4096
|
+
];
|
|
4097
|
+
var memberExportFlags = (memberFieldsFlag) => [
|
|
4098
|
+
projectIdFlag,
|
|
4099
|
+
propertyNamesFlag,
|
|
4100
|
+
memberFieldsFlag,
|
|
4101
|
+
queryFlag,
|
|
4102
|
+
{ name: "use-cache", type: "boolean", required: false, desc: "Whether to use query cache. Default: true." },
|
|
4103
|
+
requestIdFlag,
|
|
4104
|
+
jsonlArtifactFormatFlag3,
|
|
4105
|
+
asyncTimeoutSecondsFlag
|
|
4106
|
+
];
|
|
4107
|
+
var commands37 = [
|
|
4108
|
+
capability("user-cluster", "list", "analysis.user_cluster.list", "List user clusters for discovery. Use offset only for stable asset browsing.", listFlags, "read", assetListInput),
|
|
4109
|
+
capability("user-cluster", "get", "analysis.user_cluster.get", "Get user cluster details by exact cluster_name values.", [
|
|
4110
|
+
projectIdFlag,
|
|
4111
|
+
{ name: "cluster-names", type: "json", required: true, desc: "JSON array of exact cluster_name values." }
|
|
4112
|
+
], "read", (ctx) => ({
|
|
4113
|
+
project_id: ctx.num("project-id"),
|
|
4114
|
+
cluster_names: ctx.json("cluster-names")
|
|
4115
|
+
})),
|
|
4116
|
+
capability("user-cluster-member", "list", "analysis.user_cluster_member.list", `Run a bounded user cluster member query. ${analysisDataRunRoutingHelp}`, [
|
|
4117
|
+
clusterNameFlag,
|
|
4118
|
+
...memberRunFlags(clusterMemberFieldsFlag)
|
|
4119
|
+
], "read", (ctx) => memberInput(ctx, "cluster", true)),
|
|
4120
|
+
capability("user-cluster-member", "export", "analysis.user_cluster_member.export", `Export user cluster members as a jsonl artifact. ${analysisDataExportRoutingHelp}`, [
|
|
4121
|
+
clusterNameFlag,
|
|
4122
|
+
...memberExportFlags(clusterMemberFieldsFlag)
|
|
4123
|
+
], "read", (ctx) => memberInput(ctx, "cluster", false)),
|
|
4124
|
+
capability("user-cluster", "create", "analysis.user_cluster.create", "Create a condition or SQL user cluster directly from an AI-facing definition request.", [
|
|
4125
|
+
projectIdFlag,
|
|
4126
|
+
clusterNameFlag,
|
|
4127
|
+
displayNameFlag,
|
|
4128
|
+
clusterDefinitionRequestFlag,
|
|
4129
|
+
authenticatedOnlyFlag,
|
|
4130
|
+
zoneOffsetFlag3,
|
|
4131
|
+
entityIdFlag
|
|
4132
|
+
], "write", (ctx) => clusterWriteInput(ctx, true)),
|
|
4133
|
+
capability("user-cluster", "update", "analysis.user_cluster.update", "Update a condition or SQL user cluster. Pass only fields that should change.", [
|
|
4134
|
+
projectIdFlag,
|
|
4135
|
+
clusterNameFlag,
|
|
4136
|
+
optionalDisplayNameFlag,
|
|
4137
|
+
optionalClusterDefinitionRequestFlag,
|
|
4138
|
+
authenticatedOnlyFlag,
|
|
4139
|
+
remarkFlag,
|
|
4140
|
+
zoneOffsetFlag3
|
|
4141
|
+
], "write", (ctx) => clusterWriteInput(ctx, false)),
|
|
4142
|
+
idImportCapability(capability("user-cluster", "create-id", "analysis.user_cluster.create_id", "Create a cluster by mapping imported values to an analysis entity.", [
|
|
4143
|
+
projectIdFlag,
|
|
4144
|
+
{ ...clusterNameFlag, required: false, desc: "Optional cluster_name; generated if omitted." },
|
|
4145
|
+
displayNameFlag,
|
|
4146
|
+
requiredEntityIdFlag,
|
|
4147
|
+
inputFileIdFlag,
|
|
4148
|
+
clusterFileContentFlag,
|
|
4149
|
+
remarksFlag,
|
|
4150
|
+
associationPropertyFlag
|
|
4151
|
+
], "write", (ctx) => idClusterInput(ctx, true))),
|
|
4152
|
+
idImportCapability(capability("user-cluster", "update-id", "analysis.user_cluster.update_id", "Update a cluster by remapping imported values to its analysis entity.", [
|
|
4153
|
+
projectIdFlag,
|
|
4154
|
+
clusterNameFlag,
|
|
4155
|
+
optionalDisplayNameFlag,
|
|
4156
|
+
inputFileIdFlag,
|
|
4157
|
+
clusterFileContentFlag,
|
|
4158
|
+
remarksFlag,
|
|
4159
|
+
associationPropertyFlag
|
|
4160
|
+
], "write", (ctx) => idClusterInput(ctx, false))),
|
|
4161
|
+
capability("user-cluster", "refresh", "analysis.user_cluster.refresh", "Refresh a user cluster by exact cluster_name.", [
|
|
4162
|
+
projectIdFlag,
|
|
4163
|
+
clusterNameFlag
|
|
4164
|
+
], "write", (ctx) => ({ project_id: ctx.num("project-id"), cluster_name: ctx.str("cluster-name") })),
|
|
4165
|
+
capability("user-cluster", "delete", "analysis.user_cluster.delete", "Delete a user cluster by exact cluster_name after dependency review.", [
|
|
4166
|
+
projectIdFlag,
|
|
4167
|
+
clusterNameFlag,
|
|
4168
|
+
confirmedFlag
|
|
4169
|
+
], "high-risk-write", (ctx) => compactInput({
|
|
4170
|
+
project_id: ctx.num("project-id"),
|
|
4171
|
+
cluster_name: ctx.str("cluster-name"),
|
|
4172
|
+
confirmed: optionalBoolean2(ctx, "confirmed")
|
|
4173
|
+
})),
|
|
4174
|
+
capability("user-tag", "list", "analysis.user_tag.list", "List user tags for discovery. Returned identifiers use canonical tag_name. Use offset only for stable asset browsing.", tagListFlags, "read", assetListInput),
|
|
4175
|
+
capability("user-tag", "get", "analysis.user_tag.get", "Get user tag details by exact tag_name values.", [
|
|
4176
|
+
projectIdFlag,
|
|
4177
|
+
{ name: "tag-names", type: "json", required: true, desc: "JSON array of exact tag_name values." }
|
|
4178
|
+
], "read", (ctx) => ({
|
|
4179
|
+
project_id: ctx.num("project-id"),
|
|
4180
|
+
tag_names: ctx.json("tag-names")
|
|
4181
|
+
})),
|
|
4182
|
+
capability("user-tag-member", "list", "analysis.user_tag_member.list", `Run a bounded user tag member query. ${analysisDataRunRoutingHelp}`, [
|
|
4183
|
+
tagNameFlag,
|
|
4184
|
+
snapshotDateFlag,
|
|
4185
|
+
...memberRunFlags(tagMemberFieldsFlag)
|
|
4186
|
+
], "read", (ctx) => memberInput(ctx, "tag", true)),
|
|
4187
|
+
capability("user-tag-member", "export", "analysis.user_tag_member.export", `Export user tag members as a jsonl artifact. ${analysisDataExportRoutingHelp}`, [
|
|
4188
|
+
tagNameFlag,
|
|
4189
|
+
snapshotDateFlag,
|
|
4190
|
+
...memberExportFlags(tagMemberFieldsFlag)
|
|
4191
|
+
], "read", (ctx) => memberInput(ctx, "tag", false)),
|
|
4192
|
+
capability("user-tag", "create", "analysis.user_tag.create", "Create a user tag directly from an AI-facing definition request.", [
|
|
4193
|
+
projectIdFlag,
|
|
4194
|
+
tagNameFlag,
|
|
4195
|
+
displayNameFlag,
|
|
4196
|
+
tagDefinitionRequestFlag,
|
|
4197
|
+
authenticatedOnlyFlag,
|
|
4198
|
+
zoneOffsetFlag3,
|
|
4199
|
+
entityIdFlag
|
|
4200
|
+
], "write", (ctx) => tagWriteInput(ctx, true)),
|
|
4201
|
+
capability("user-tag", "update", "analysis.user_tag.update", "Update a user tag. Pass only fields that should change.", [
|
|
4202
|
+
projectIdFlag,
|
|
4203
|
+
tagNameFlag,
|
|
4204
|
+
optionalDisplayNameFlag,
|
|
4205
|
+
optionalTagDefinitionRequestFlag,
|
|
4206
|
+
authenticatedOnlyFlag,
|
|
4207
|
+
remarkFlag,
|
|
4208
|
+
zoneOffsetFlag3
|
|
4209
|
+
], "write", (ctx) => tagWriteInput(ctx, false)),
|
|
4210
|
+
capability("user-tag", "refresh", "analysis.user_tag.refresh", "Refresh a user tag by exact tag_name.", [
|
|
4211
|
+
projectIdFlag,
|
|
4212
|
+
tagNameFlag
|
|
4213
|
+
], "write", (ctx) => ({ project_id: ctx.num("project-id"), tag_name: ctx.str("tag-name") })),
|
|
4214
|
+
idImportCapability(capability("user-tag", "create-id", "analysis.user_tag.create_id", "Create a tag by mapping imported values to an analysis entity.", [
|
|
4215
|
+
projectIdFlag,
|
|
4216
|
+
{ ...tagNameFlag, required: false, desc: "Optional tag_name; generated if omitted." },
|
|
4217
|
+
displayNameFlag,
|
|
4218
|
+
requiredEntityIdFlag,
|
|
4219
|
+
inputFileIdFlag,
|
|
4220
|
+
tagFileContentFlag,
|
|
4221
|
+
remarksFlag,
|
|
4222
|
+
associationPropertyFlag
|
|
4223
|
+
], "write", (ctx) => idTagInput(ctx, true))),
|
|
4224
|
+
idImportCapability(capability("user-tag", "update-id", "analysis.user_tag.update_id", "Update a tag by remapping imported values to its analysis entity.", [
|
|
4225
|
+
projectIdFlag,
|
|
4226
|
+
tagNameFlag,
|
|
4227
|
+
optionalDisplayNameFlag,
|
|
4228
|
+
entityIdFlag,
|
|
4229
|
+
inputFileIdFlag,
|
|
4230
|
+
tagFileContentFlag,
|
|
4231
|
+
remarksFlag,
|
|
4232
|
+
associationPropertyFlag
|
|
4233
|
+
], "write", (ctx) => idTagInput(ctx, false))),
|
|
4234
|
+
capability("user-tag", "delete", "analysis.user_tag.delete", "Delete a user tag by exact tag_name after dependency review.", [
|
|
4235
|
+
projectIdFlag,
|
|
4236
|
+
tagNameFlag,
|
|
4237
|
+
confirmedFlag
|
|
4238
|
+
], "high-risk-write", (ctx) => compactInput({
|
|
4239
|
+
project_id: ctx.num("project-id"),
|
|
4240
|
+
tag_name: ctx.str("tag-name"),
|
|
4241
|
+
confirmed: optionalBoolean2(ctx, "confirmed")
|
|
4242
|
+
})),
|
|
4243
|
+
capability("history-tag", "list", "analysis.history_tag.list", "List history tag snapshots for a tag.", [
|
|
4244
|
+
projectIdFlag,
|
|
4245
|
+
tagNameFlag
|
|
4246
|
+
], "read", (ctx) => ({ project_id: ctx.num("project-id"), tag_name: ctx.str("tag-name") })),
|
|
4247
|
+
capability("history-tag", "refresh", "analysis.history_tag.refresh", "Refresh one history tag snapshot.", [
|
|
4248
|
+
projectIdFlag,
|
|
4249
|
+
tagNameFlag,
|
|
4250
|
+
refreshDateFlag,
|
|
4251
|
+
{ name: "use-user-table-type", type: "string", required: false, desc: "Optional source strategy: user_table, user_backup_table_default, or user_backup_table_last_date." }
|
|
4252
|
+
], "write", (ctx) => compactInput({
|
|
4253
|
+
project_id: ctx.num("project-id"),
|
|
4254
|
+
tag_name: ctx.str("tag-name"),
|
|
4255
|
+
refresh_date: ctx.str("refresh-date"),
|
|
4256
|
+
use_user_table_type: optionalString2(ctx, "use-user-table-type")
|
|
4257
|
+
})),
|
|
4258
|
+
capability("history-tag", "batch-refresh", "analysis.history_tag.batch_refresh", "Batch refresh history tag snapshots using the product refresh request object.", [
|
|
4259
|
+
projectIdFlag,
|
|
4260
|
+
tagNameFlag,
|
|
4261
|
+
{ name: "refresh-request", type: "json", required: true, desc: "Snake_case object: {start_time,end_time,only_abnormal?,use_user_table_type?}. Dates use yyyy-MM-dd; see history_tag_batch_refresh.md." }
|
|
4262
|
+
], "write", (ctx) => ({
|
|
4263
|
+
project_id: ctx.num("project-id"),
|
|
4264
|
+
tag_name: ctx.str("tag-name"),
|
|
4265
|
+
refresh_request: ctx.json("refresh-request")
|
|
4266
|
+
})),
|
|
4267
|
+
capability("history-tag", "clear", "analysis.history_tag.clear", "Clear history tag snapshots in a date range after explicit confirmation.", [
|
|
4268
|
+
projectIdFlag,
|
|
4269
|
+
tagNameFlag,
|
|
4270
|
+
{ name: "start-time", type: "string", required: true, desc: "Start date, yyyy-MM-dd." },
|
|
4271
|
+
{ name: "end-time", type: "string", required: true, desc: "End date, yyyy-MM-dd." },
|
|
4272
|
+
confirmedFlag
|
|
4273
|
+
], "high-risk-write", (ctx) => compactInput({
|
|
4274
|
+
project_id: ctx.num("project-id"),
|
|
4275
|
+
tag_name: ctx.str("tag-name"),
|
|
4276
|
+
start_time: ctx.str("start-time"),
|
|
4277
|
+
end_time: ctx.str("end-time"),
|
|
4278
|
+
confirmed: optionalBoolean2(ctx, "confirmed")
|
|
4279
|
+
})),
|
|
4280
|
+
capability("history-tag-data", "run", "analysis.history_tag_data.run", `Run a bounded history tag statistics query. ${analysisDataRunRoutingHelp}`, [
|
|
4281
|
+
projectIdFlag,
|
|
4282
|
+
tagNameFlag,
|
|
4283
|
+
historyViewFlag,
|
|
4284
|
+
requestIdFlag,
|
|
4285
|
+
limitFlag,
|
|
4286
|
+
syncTimeoutSecondsFlag
|
|
4287
|
+
], "read", (ctx) => historyTagDataInput(ctx, true)),
|
|
4288
|
+
capability("history-tag-data", "export", "analysis.history_tag_data.export", `Export history tag statistics as a jsonl artifact. ${analysisDataExportRoutingHelp}`, [
|
|
4289
|
+
projectIdFlag,
|
|
4290
|
+
tagNameFlag,
|
|
4291
|
+
historyViewFlag,
|
|
4292
|
+
requestIdFlag,
|
|
4293
|
+
jsonlArtifactFormatFlag3,
|
|
4294
|
+
asyncTimeoutSecondsFlag
|
|
4295
|
+
], "read", (ctx) => historyTagDataInput(ctx, false)),
|
|
4296
|
+
capability("history-tag-data-drilldown", "run", "analysis.history_tag_data_drilldown.run", `Run a bounded drilldown user query for one history tag statistic value. ${analysisDataRunRoutingHelp}`, [
|
|
4297
|
+
tagNameFlag,
|
|
4298
|
+
{ ...snapshotDateFlag, required: true, desc: "History tag snapshot date, yyyy-MM-dd." },
|
|
4299
|
+
groupColFlag,
|
|
4300
|
+
historyViewFlag,
|
|
4301
|
+
...memberRunFlags(tagMemberFieldsFlag)
|
|
4302
|
+
], "read", (ctx) => historyTagDataDrilldownInput(ctx, true)),
|
|
4303
|
+
capability("history-tag-data-drilldown", "export", "analysis.history_tag_data_drilldown.export", `Export drilldown users for one history tag statistic value as a jsonl artifact. ${analysisDataExportRoutingHelp}`, [
|
|
4304
|
+
tagNameFlag,
|
|
4305
|
+
{ ...snapshotDateFlag, required: true, desc: "History tag snapshot date, yyyy-MM-dd." },
|
|
4306
|
+
groupColFlag,
|
|
4307
|
+
historyViewFlag,
|
|
4308
|
+
...memberExportFlags(tagMemberFieldsFlag)
|
|
4309
|
+
], "read", (ctx) => historyTagDataDrilldownInput(ctx, false))
|
|
4310
|
+
];
|
|
4311
|
+
var user_default = commands37;
|
|
4312
|
+
|
|
4313
|
+
// src/commands/te-analysis/global/list-query-clusters.ts
|
|
4314
|
+
var listQueryClusters = createMcpCommand({
|
|
4315
|
+
command: "+list_query_clusters",
|
|
4316
|
+
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.",
|
|
4317
|
+
flags: [
|
|
4318
|
+
{ name: "project_id", type: "number", required: true, desc: "Project ID used to resolve cluster query permissions", alias: "p" }
|
|
4319
|
+
],
|
|
4320
|
+
risk: "read",
|
|
4321
|
+
buildArgs: (ctx) => ({
|
|
4322
|
+
projectId: ctx.num("project_id")
|
|
4323
|
+
})
|
|
4324
|
+
});
|
|
4325
|
+
|
|
4326
|
+
// src/commands/te-analysis/global/index.ts
|
|
4327
|
+
var commands38 = [
|
|
4328
|
+
listQueryClusters
|
|
4329
|
+
];
|
|
4330
|
+
var global_default = commands38;
|
|
4331
|
+
|
|
4332
|
+
// src/commands/te-analysis/sql-table/columns.ts
|
|
4333
|
+
var sqlTableColumns = createAnalysisCapabilityCommand({
|
|
4334
|
+
resource: "sql-table",
|
|
4335
|
+
command: "columns",
|
|
4336
|
+
capabilityId: "analysis.sql_table.columns",
|
|
4337
|
+
description: 'List columns for an exact server-authorized SQL table reference. When copying a Trino column containing #, $, @, spaces, or punctuation into SQL, delimit the identifier with double quotes, for example "#user_id" or "$part_event". Queries against an event table must include a date-partition predicate on the quoted "$part_date" column; the backend rejects event-table SQL without it.',
|
|
4338
|
+
flags: [
|
|
4339
|
+
projectIdFlag,
|
|
4340
|
+
{
|
|
4341
|
+
name: "table-ref",
|
|
4342
|
+
type: "string",
|
|
4343
|
+
required: true,
|
|
4344
|
+
desc: "Exact table_ref returned by analysis sql-table list; a unique table-only reference is also accepted."
|
|
4345
|
+
},
|
|
4346
|
+
sqlTableUsageFlag
|
|
4347
|
+
],
|
|
4348
|
+
risk: "read",
|
|
4349
|
+
buildInput: (ctx) => compactInput({
|
|
4350
|
+
...projectInput(ctx),
|
|
4351
|
+
table_ref: ctx.str("table-ref"),
|
|
4352
|
+
usage: optionalString2(ctx, "usage")
|
|
4353
|
+
})
|
|
4354
|
+
});
|
|
4355
|
+
|
|
4356
|
+
// src/commands/te-analysis/sql-table/list.ts
|
|
4357
|
+
var sqlTableList = createAnalysisCapabilityCommand({
|
|
4358
|
+
resource: "sql-table",
|
|
4359
|
+
command: "list",
|
|
4360
|
+
capabilityId: "analysis.sql_table.list",
|
|
4361
|
+
description: "List server-authoritative SQL table references queryable by the current user in a project.",
|
|
4362
|
+
flags: [projectIdFlag, queryFlag, directoryLimitFlag, offsetFlag, sqlTableUsageFlag],
|
|
4363
|
+
risk: "read",
|
|
4364
|
+
buildInput: (ctx) => compactInput({
|
|
4365
|
+
project_id: ctx.num("project-id"),
|
|
4366
|
+
query: optionalString2(ctx, "query"),
|
|
4367
|
+
limit: optionalNumber2(ctx, "limit"),
|
|
4368
|
+
offset: optionalNumber2(ctx, "offset"),
|
|
4369
|
+
usage: optionalString2(ctx, "usage")
|
|
4370
|
+
})
|
|
4371
|
+
});
|
|
4372
|
+
|
|
4373
|
+
// src/commands/te-analysis/sql-table/index.ts
|
|
4374
|
+
var commands39 = [sqlTableList, sqlTableColumns];
|
|
4375
|
+
var sql_table_default = commands39;
|
|
4376
|
+
|
|
4377
|
+
// src/commands/te-analysis/entity/id-import-options.ts
|
|
4378
|
+
var entityIdImportOptions = createAnalysisCapabilityCommand({
|
|
4379
|
+
resource: "entity",
|
|
4380
|
+
command: "id-import-options",
|
|
4381
|
+
capabilityId: "analysis.entity.id_import_options",
|
|
4382
|
+
description: "Discover the authoritative ID-import mapping contract for one analysis entity.",
|
|
4383
|
+
flags: [
|
|
4384
|
+
projectIdFlag,
|
|
4385
|
+
{
|
|
4386
|
+
name: "entity-id",
|
|
4387
|
+
type: "number",
|
|
4388
|
+
required: true,
|
|
4389
|
+
desc: "Analysis entity ID. Discover it from project entity metadata; do not guess."
|
|
4390
|
+
}
|
|
4391
|
+
],
|
|
4392
|
+
risk: "read",
|
|
4393
|
+
buildInput: (ctx) => ({
|
|
4394
|
+
project_id: ctx.num("project-id"),
|
|
4395
|
+
entity_id: ctx.num("entity-id")
|
|
4396
|
+
})
|
|
4397
|
+
});
|
|
4398
|
+
|
|
4399
|
+
// src/commands/te-analysis/entity/index.ts
|
|
4400
|
+
var commands40 = [entityIdImportOptions];
|
|
4401
|
+
var entity_default = commands40;
|
|
4402
|
+
|
|
4403
|
+
// src/commands/te-analysis/input-file/inspect.ts
|
|
4404
|
+
var inputFileInspect = {
|
|
4405
|
+
service: "analysis",
|
|
4406
|
+
resource: "input-file",
|
|
4407
|
+
command: "inspect",
|
|
4408
|
+
description: "Inspect an uploaded analysis input file owned by the current user.",
|
|
4409
|
+
flags: [
|
|
4410
|
+
{ name: "input-file-id", type: "string", required: true, desc: "Uploaded input file ID, for example ifile_<32 lowercase hex>." }
|
|
4411
|
+
],
|
|
4412
|
+
risk: "read",
|
|
4413
|
+
dryRun: (ctx) => ({
|
|
4414
|
+
method: "GET",
|
|
4415
|
+
url: `${ctx.host()}/api/cli/${resolveGatewayDomain("analysis")}/v1/input-files/${ctx.str("input-file-id")}`
|
|
4416
|
+
}),
|
|
4417
|
+
execute: async (ctx) => {
|
|
4418
|
+
const inputFileId = ctx.str("input-file-id");
|
|
4419
|
+
const result = await requestCapabilityGateway(
|
|
4420
|
+
ctx.host(),
|
|
4421
|
+
resolveGatewayDomain("analysis"),
|
|
4422
|
+
`input-files/${inputFileId}`
|
|
4423
|
+
);
|
|
4424
|
+
return {
|
|
4425
|
+
...result,
|
|
4426
|
+
inspect_path: `/api/cli/analysis/v1/input-files/${inputFileId}`,
|
|
4427
|
+
inspect_command: `ae-cli analysis input-file inspect --input-file-id ${inputFileId}`
|
|
4428
|
+
};
|
|
4429
|
+
}
|
|
4430
|
+
};
|
|
4431
|
+
|
|
4432
|
+
// src/commands/te-analysis/input-file/purpose-list.ts
|
|
4433
|
+
var inputFilePurposeList = createAnalysisCapabilityCommand({
|
|
4434
|
+
resource: "input-file purpose",
|
|
4435
|
+
command: "list",
|
|
4436
|
+
capabilityId: "analysis.input_file.purpose.list",
|
|
4437
|
+
description: "List input-file purposes the current user may upload in a project.",
|
|
4438
|
+
flags: [projectIdFlag],
|
|
4439
|
+
risk: "read",
|
|
4440
|
+
buildInput: (ctx) => ({ project_id: ctx.num("project-id") })
|
|
4441
|
+
});
|
|
4442
|
+
|
|
4443
|
+
// src/commands/te-analysis/input-file/upload.ts
|
|
4444
|
+
var inputFileUpload = {
|
|
4445
|
+
service: "analysis",
|
|
4446
|
+
resource: "input-file",
|
|
4447
|
+
command: "upload",
|
|
4448
|
+
description: "Upload a local file to the analysis capability gateway and return an input_file_id.",
|
|
4449
|
+
flags: [
|
|
4450
|
+
{ name: "project-id", type: "number", required: true, desc: "Numeric project ID.", alias: "p" },
|
|
4451
|
+
{ name: "purpose", type: "string", required: true, desc: "Purpose returned by analysis input-file purpose list." },
|
|
4452
|
+
{ name: "file", type: "string", required: true, desc: "Local file path to upload." }
|
|
4453
|
+
],
|
|
4454
|
+
risk: "write",
|
|
4455
|
+
dryRun: (ctx) => ({
|
|
4456
|
+
method: "POST",
|
|
4457
|
+
url: buildCapabilityGatewayUrl(ctx.host(), resolveGatewayDomain("analysis"), "input-files"),
|
|
4458
|
+
body: {
|
|
4459
|
+
multipart: {
|
|
4460
|
+
project_id: ctx.num("project-id"),
|
|
4461
|
+
purpose: ctx.str("purpose"),
|
|
4462
|
+
file: ctx.str("file")
|
|
4463
|
+
}
|
|
4464
|
+
}
|
|
4465
|
+
}),
|
|
4466
|
+
execute: async (ctx) => {
|
|
4467
|
+
const result = await uploadInputFile(
|
|
4468
|
+
ctx.host(),
|
|
4469
|
+
resolveGatewayDomain("analysis"),
|
|
4470
|
+
ctx.num("project-id"),
|
|
4471
|
+
ctx.str("purpose"),
|
|
4472
|
+
ctx.str("file")
|
|
4473
|
+
);
|
|
4474
|
+
const inputFileId = result?.input_file_id ?? result?.inputFileId;
|
|
4475
|
+
return {
|
|
4476
|
+
...result,
|
|
4477
|
+
inspect_path: typeof inputFileId === "string" ? `/api/cli/analysis/v1/input-files/${inputFileId}` : result?.inspect_path,
|
|
4478
|
+
inspect_command: typeof inputFileId === "string" ? `ae-cli analysis input-file inspect --input-file-id ${inputFileId}` : void 0
|
|
4479
|
+
};
|
|
4480
|
+
}
|
|
4481
|
+
};
|
|
4482
|
+
|
|
4483
|
+
// src/commands/te-analysis/input-file/index.ts
|
|
4484
|
+
var commands41 = [inputFileUpload, inputFileInspect, inputFilePurposeList];
|
|
4485
|
+
var input_file_default = commands41;
|
|
4486
|
+
|
|
4487
|
+
// src/commands/te-analysis/index.ts
|
|
4488
|
+
registerCapabilityGatewayRoute("analysis", { gatewayDomain: "analysis" });
|
|
4489
|
+
var baseCommands = [
|
|
4490
|
+
...meta_default,
|
|
4491
|
+
...governance_default,
|
|
4492
|
+
...report_default,
|
|
4493
|
+
...report_data_default,
|
|
4494
|
+
...report_change_log_default,
|
|
4495
|
+
...report_version_default,
|
|
4496
|
+
...report_abnormal_default,
|
|
4497
|
+
...dashboard_default,
|
|
4498
|
+
...dashboard_report_default,
|
|
4499
|
+
...dashboard_report_data_default,
|
|
4500
|
+
...query_default,
|
|
4501
|
+
...run_default,
|
|
4502
|
+
...artifact_default,
|
|
4503
|
+
...adhoc_default,
|
|
4504
|
+
...dashboard_definition_default,
|
|
4505
|
+
...dashboard_daily_report_default,
|
|
4506
|
+
...bi_panel_default,
|
|
4507
|
+
...bi_panel_version_default,
|
|
4508
|
+
...bi_panel_page_data_default,
|
|
4509
|
+
...project_space_default,
|
|
4510
|
+
...favorite_default,
|
|
4511
|
+
...public_link_default,
|
|
4512
|
+
...model_default,
|
|
4513
|
+
...event_detail_default,
|
|
4514
|
+
...entity_detail_default,
|
|
4515
|
+
...drilldown_users_default,
|
|
4516
|
+
...drilldown_user_events_default,
|
|
4517
|
+
...user_default,
|
|
4518
|
+
...sql_table_default,
|
|
4519
|
+
...entity_default,
|
|
4520
|
+
...input_file_default
|
|
4521
|
+
];
|
|
4522
|
+
var commands42 = [
|
|
4523
|
+
...baseCommands,
|
|
4524
|
+
...isGlobalQueryModeEnabled() ? global_default : []
|
|
4525
|
+
];
|
|
4526
|
+
var te_analysis_default = commands42;
|
|
4527
|
+
export {
|
|
4528
|
+
baseCommands,
|
|
4529
|
+
te_analysis_default as default
|
|
4530
|
+
};
|