#!/usr/bin/env bash
set -euo pipefail

URI="$1"

bazel run //bin:show_message -- \
    --stdout \
    --chum_uri="${URI}" \
    --topic='/agent_comms/decision_comm_plan_generator/reproducibility' \
    --topic='/agent_comms/impression_tracker/reproducibility' \
    --topic='/agent_comms/plan_executor/reproducibility' \
    --topic='/agent_comms/system_state/reproducibility' \
    --topic='/agent_comms/teleop_interface/reproducibility' \
    --topic='/ai_monitor/pose_validator/reproducibility' \
    --topic='/ai_monitor/safety_perception/reproducibility' \
    --topic='/ai_robot_monitor/fault_handler/reproducibility' \
    --topic='/ai_robot_monitor/heartbeat/reproducibility' \
    --topic='/ai_robot_monitor/robot_monitor_master/reproducibility' \
    --topic='/ai_robot_monitor/ros_diagnostic_handler/reproducibility' \
    --topic='/ai_trajectory_manager/cas_prediction_server/reproducibility' \
    --topic='/ai_trajectory_manager/trajectory_manager/reproducibility' \
    --topic='/audio_gateway/compressed_audio_component/reproducibility' \
    --topic='/audio_gateway/reproducibility' \
    --topic='/authority/reproducibility' \
    --topic='/chum_recorder/reproducibility' \
    --topic='/dispatch/mission_watchdog/reproducibility' \
    --topic='/dispatch/vitals_component/reproducibility' \
    --topic='/drivers/ride_state_machine/reproducibility' \
    --topic='/driving/lidar1/driver/diagnostics/reproducibility' \
    --topic='/driving/lidar1/projector/reproducibility' \
    --topic='/driving/lidar2/driver/diagnostics/reproducibility' \
    --topic='/driving/lidar2/projector/reproducibility' \
    --topic='/driving/lidar5/driver/diagnostics/reproducibility' \
    --topic='/driving/lidar5/projector/reproducibility' \
    --topic='/driving/lidar6/driver/diagnostics/reproducibility' \
    --topic='/driving/lidar6/projector/reproducibility' \
    --topic='/driving/velodyne12/driver/diagnostics/reproducibility' \
    --topic='/driving/velodyne12/projector/reproducibility' \
    --topic='/driving/velodyne3/driver/diagnostics/reproducibility' \
    --topic='/driving/velodyne3/projector/reproducibility' \
    --topic='/driving/velodyne4/driver/diagnostics/reproducibility' \
    --topic='/driving/velodyne4/projector/reproducibility' \
    --topic='/driving/velodyne7/driver/diagnostics/reproducibility' \
    --topic='/driving/velodyne7/projector/reproducibility' \
    --topic='/driving/velodyne8/driver/diagnostics/reproducibility' \
    --topic='/driving/velodyne8/projector/reproducibility' \
    --topic='/gpu_monitor/reproducibility' \
    --topic='/hd_monitor/reproducibility' \
    --topic='/kitt_gateway/l3_thermal_gateway/reproducibility' \
    --topic='/link/link_zci_component/reproducibility' \
    --topic='/llc_gateway/reproducibility' \
    --topic='/localization/radar_velocity_component/reproducibility' \
    --topic='/localization/state_keeper/reproducibility' \
    --topic='/localizer6dof/aligner/reproducibility' \
    --topic='/mapping/imagery_client/reproducibility' \
    --topic='/mapping/map_select/reproducibility' \
    --topic='/mapping/zrn_client/reproducibility' \
    --topic='/mapping/zrn_overlay/reproducibility' \
    --topic='/orchestration/base/supervisor/reproducibility' \
    --topic='/orchestration/drivers/supervisor/reproducibility' \
    --topic='/orchestration/lidar/supervisor/reproducibility' \
    --topic='/orchestration/localizer/supervisor/reproducibility' \
    --topic='/orchestration/nogo/supervisor/reproducibility' \
    --topic='/orchestration/perception/supervisor/reproducibility' \
    --topic='/orchestration/planner/supervisor/reproducibility' \
    --topic='/orchestration/pose_locomofo/supervisor/reproducibility' \
    --topic='/orchestration/radar/supervisor/reproducibility' \
    --topic='/orchestration/swopdash_server/supervisor/reproducibility' \
    --topic='/orchestration/vision/supervisor/reproducibility' \
    --topic='/perception/activation_client/reproducibility' \
    --topic='/perception/activation_server/reproducibility' \
    --topic='/perception/audio/siren_detector_zci/reproducibility' \
    --topic='/perception/construction_zone_monitor/reproducibility' \
    --topic='/perception/lidar_component/reproducibility' \
    --topic='/perception/radar_component/reproducibility' \
    --topic='/perception/radnet_component/reproducibility' \
    --topic='/perception/tracker_component/reproducibility' \
    --topic='/perception/vma_component/reproducibility' \
    --topic='/planner/corridor/reproducibility' \
    --topic='/planner/decision/reproducibility' \
    --topic='/planner/hero_state/reproducibility' \
    --topic='/planner/planner_config_provider/reproducibility' \
    --topic='/planner/region_provider/reproducibility' \
    --topic='/planner/road_graph_solver/reproducibility' \
    --topic='/planner/route_data_generator/reproducibility' \
    --topic='/planner/smoother/reproducibility' \
    --topic='/planner/tracker/reproducibility' \
    --topic='/planner/tracker_planner_config_provider/reproducibility' \
    --topic='/pose_estimator/smooth_pose/reproducibility' \
    --topic='/pose_estimator/solver/reproducibility' \
    --topic='/prediction/server/reproducibility' \
    --topic='/reporting/aggregator/reproducibility' \
    --topic='/router_monitor/reproducibility' \
    --topic='/simple_spin_loader/reproducibility' \
    --topic='/switch_monitor/reproducibility' \
    --topic='/swopdash/ai_version/reproducibility' \
    --topic='/swopdash/capability_client/reproducibility' \
    --topic='/swopdash/capability_server/reproducibility' \
    --topic='/swopdash/debug_visualization_layers/reproducibility' \
    --topic='/swopdash/disengagement_control/reproducibility' \
    --topic='/swopdash/domain_monitor/reproducibility' \
    --topic='/swopdash/drive_compatibility/reproducibility' \
    --topic='/swopdash/drive_control/reproducibility' \
    --topic='/swopdash/mission_compatibility/reproducibility' \
    --topic='/swopdash/mission_config/reproducibility' \
    --topic='/swopdash/mission_control/reproducibility' \
    --topic='/swopdash/mission_location/reproducibility' \
    --topic='/swopdash/pcu_latency/reproducibility' \
    --topic='/swopdash/robot_config/reproducibility' \
    --topic='/swopdash/swopdash_version/reproducibility' \
    --topic='/swopdash/system_tree/reproducibility' \
    --topic='/swopdash/traffic_lights/reproducibility' \
    --topic='/swopdash/zfr_control/reproducibility' \
    --topic='/swopdash/zrn_proxy/reproducibility' \
    --topic='/system_monitor/bpf_operator/reproducibility' \
    --topic='/system_monitor/bpf_pcu/reproducibility' \
    --topic='/system_monitor/reproducibility' \
    --topic='/teleop/domain_monitor/reproducibility' \
    --topic='/teleop/reporting/uploader/reproducibility' \
    --topic='/teleop/shield/reproducibility' \
    --topic='/teleop/supervisor/heartbeat/reproducibility' \
    --topic='/teleop/supervisor/reproducibility' \
    --topic='/teleop/supervisor/telemetry_balancer/reproducibility' \
    --topic='/teleop/supervisor/telemetry_control/reproducibility' \
    --topic='/teleop/supervisor/telemetry_health/reproducibility' \
    --topic='/teleop/supervisor/teleop_interaction/reproducibility' \
    --topic='/teleop/telemetry/reproducibility' \
    --topic='/tib_component/FRONT_LOWER_CENTER/reproducibility' \
    --topic='/tib_component/FRONT_LOWER_LEFT/reproducibility' \
    --topic='/tib_component/FRONT_LOWER_RIGHT/reproducibility' \
    --topic='/tib_component/FRONT_UPPER_LEFT/reproducibility' \
    --topic='/tib_component/FRONT_UPPER_RIGHT/reproducibility' \
    --topic='/tib_component/REAR_LOWER_LEFT/reproducibility' \
    --topic='/tib_component/REAR_LOWER_RIGHT/reproducibility' \
    --topic='/tib_component/REAR_UPPER_LEFT/reproducibility' \
    --topic='/tib_component/REAR_UPPER_RIGHT/reproducibility' \
    --topic='/vision/thumbnailer/reproducibility' \
    --topic='/vision/traffic_light_monitor/reproducibility' \
    --topic='/vision/vision13_detection_tracking/reproducibility' \
    --topic='/vision/vision13_image_monitor/reproducibility' \
    --topic='/vision/vision13_pipeline/reproducibility' \
    --topic='/vision/vision15_detection_tracking/reproducibility' \
    --topic='/vision/vision15_image_monitor/reproducibility' \
    --topic='/vision/vision15_pipeline/reproducibility' \
    --topic='/vision/vision16_detection_tracking/reproducibility' \
    --topic='/vision/vision16_image_monitor/reproducibility' \
    --topic='/vision/vision16_pipeline/reproducibility' \
    --topic='/vision/vision3_detection_tracking/reproducibility' \
    --topic='/vision/vision3_image_monitor/reproducibility' \
    --topic='/vision/vision3_pipeline/reproducibility' \
    --topic='/vision/vision4_detection_tracking/reproducibility' \
    --topic='/vision/vision4_image_monitor/reproducibility' \
    --topic='/vision/vision4_pipeline/reproducibility' \
    --topic='/vision/vision5_detection_tracking/reproducibility' \
    --topic='/vision/vision5_image_monitor/reproducibility' \
    --topic='/vision/vision5_pipeline/reproducibility' \
    --topic='/vision/vision7_detection_tracking/reproducibility' \
    --topic='/vision/vision7_image_monitor/reproducibility' \
    --topic='/vision/vision7_pipeline/reproducibility' \
    --topic='/vision/vision8_detection_tracking/reproducibility' \
    --topic='/vision/vision8_image_monitor/reproducibility' \
    --topic='/vision/vision8_pipeline/reproducibility' \
    --topic='/vision/vision9_detection_tracking/reproducibility' \
    --topic='/vision/vision9_image_monitor/reproducibility' \
    --topic='/vision/vision9_pipeline/reproducibility' \
    --flatten \
    --filter=".clock.relative_now_ns" \
    --filter=".meta.topic"
