@usex/mikrotik-mcp 4.21.0 → 4.23.0
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/dist/cli.js +200 -37
- package/dist/index.js +13 -2
- package/dist/shared/{cli-g27x73vg.js → cli-p673815b.js} +1 -1
- package/dist/shared/{cli-4tycy2mf.js → cli-tssmr7sb.js} +3 -3
- package/dist/shared/{library-v21pwa2g.js → library-2144zr9f.js} +2 -2
- package/dist/shared/{library-w7gzvedz.js → library-8f4pbp0x.js} +1 -1
- package/dist/ui/observability.html +2 -2
- package/package.json +6 -5
- package/prompts/setup-eoip-tunnel-between-sites.md +4 -0
- package/prompts/setup-gre-tunnel-between-sites.md +4 -0
- package/prompts/setup-ipip-tunnel-between-sites.md +4 -0
- package/prompts/setup-ipsec-site-to-site.md +4 -0
- package/prompts/setup-l2tp-ipsec-roadwarrior.md +4 -0
- package/prompts/setup-openvpn-tunnel-between-sites.md +4 -0
- package/prompts/setup-sstp-tunnel-between-sites.md +4 -0
- package/prompts/setup-tunnel-between-sites.md +4 -0
- package/prompts/setup-v2ray-container-proxy.md +4 -0
- package/prompts/setup-vxlan-tunnel-between-sites.md +4 -0
- package/prompts/setup-wireguard-tunnel-between-sites.md +4 -0
- package/prompts/setup-wireguard-vpn.md +4 -0
- package/schemas/README.md +5 -5
- package/schemas/config.schema.json +7 -36
- package/schemas/tool-catalog.json +747 -2974
- package/schemas/tools/aaa_mutate.json +2 -10
- package/schemas/tools/add_address_list_entry.json +1 -5
- package/schemas/tools/add_bfd_configuration.json +1 -4
- package/schemas/tools/add_bgp_connection.json +1 -5
- package/schemas/tools/add_bgp_template.json +1 -4
- package/schemas/tools/add_blackhole_route.json +1 -4
- package/schemas/tools/add_bridge_port.json +6 -31
- package/schemas/tools/add_bridge_vlan.json +1 -4
- package/schemas/tools/add_container_env.json +1 -5
- package/schemas/tools/add_container_mount.json +1 -5
- package/schemas/tools/add_default_route.json +1 -5
- package/schemas/tools/add_dhcp_client.json +1 -7
- package/schemas/tools/add_disk.json +1 -3
- package/schemas/tools/add_dns_regexp.json +1 -6
- package/schemas/tools/add_dns_static.json +1 -4
- package/schemas/tools/add_dot1x_client.json +1 -5
- package/schemas/tools/add_dot1x_server.json +3 -13
- package/schemas/tools/add_firewall_default_deny.json +1 -4
- package/schemas/tools/add_graphing_interface.json +1 -3
- package/schemas/tools/add_graphing_queue.json +1 -3
- package/schemas/tools/add_igmp_proxy_interface.json +1 -5
- package/schemas/tools/add_ip_address.json +1 -6
- package/schemas/tools/add_ipv6_address.json +1 -6
- package/schemas/tools/add_ipv6_address_list_entry.json +1 -5
- package/schemas/tools/add_ipv6_default_route.json +1 -4
- package/schemas/tools/add_ipv6_dhcp_binding.json +1 -4
- package/schemas/tools/add_ipv6_dhcp_client.json +3 -15
- package/schemas/tools/add_ipv6_dhcp_option.json +1 -5
- package/schemas/tools/add_ipv6_dhcp_relay.json +1 -6
- package/schemas/tools/add_ipv6_nd.json +2 -9
- package/schemas/tools/add_ipv6_nd_prefix.json +1 -4
- package/schemas/tools/add_ipv6_route.json +2 -10
- package/schemas/tools/add_logging_action.json +2 -12
- package/schemas/tools/add_logging_rule.json +1 -4
- package/schemas/tools/add_netwatch.json +2 -10
- package/schemas/tools/add_ospf_area.json +2 -11
- package/schemas/tools/add_ospf_area_range.json +1 -5
- package/schemas/tools/add_ospf_instance.json +1 -5
- package/schemas/tools/add_ospf_interface_template.json +3 -20
- package/schemas/tools/add_ovpn_server.json +4 -17
- package/schemas/tools/add_pimsm_instance.json +2 -9
- package/schemas/tools/add_pimsm_interface_template.json +1 -5
- package/schemas/tools/add_pimsm_rp.json +1 -5
- package/schemas/tools/add_radius_server.json +1 -4
- package/schemas/tools/add_rip_instance.json +1 -4
- package/schemas/tools/add_rip_interface_template.json +1 -5
- package/schemas/tools/add_rip_static_neighbor.json +1 -4
- package/schemas/tools/add_romon_port.json +1 -4
- package/schemas/tools/add_route.json +1 -5
- package/schemas/tools/add_routing_filter_num_list.json +1 -4
- package/schemas/tools/add_routing_filter_rule.json +1 -5
- package/schemas/tools/add_routing_id.json +1 -4
- package/schemas/tools/add_routing_rule.json +2 -10
- package/schemas/tools/add_routing_table.json +1 -5
- package/schemas/tools/add_rpki_session.json +1 -6
- package/schemas/tools/add_script.json +1 -5
- package/schemas/tools/add_switch_port_isolation.json +1 -4
- package/schemas/tools/add_switch_rule.json +2 -10
- package/schemas/tools/add_traffic_generator_port.json +1 -5
- package/schemas/tools/add_traffic_generator_stream.json +1 -5
- package/schemas/tools/add_traffic_monitor.json +3 -17
- package/schemas/tools/add_user.json +1 -6
- package/schemas/tools/add_user_group.json +1 -4
- package/schemas/tools/add_user_manager_limitation.json +1 -3
- package/schemas/tools/add_user_manager_profile.json +2 -7
- package/schemas/tools/add_user_manager_router.json +1 -6
- package/schemas/tools/add_user_manager_user.json +1 -5
- package/schemas/tools/add_wireguard_peer.json +1 -6
- package/schemas/tools/allow_device.json +1 -3
- package/schemas/tools/apply_capsman_fixes.json +1 -3
- package/schemas/tools/apply_plan.json +1 -3
- package/schemas/tools/apply_security_hardening_fixes.json +1 -4
- package/schemas/tools/apply_traffic_shaping.json +2 -10
- package/schemas/tools/assign_user_manager_profile.json +1 -4
- package/schemas/tools/audit_certificate_expiry.json +1 -3
- package/schemas/tools/audit_fleet.json +2 -9
- package/schemas/tools/audit_remediate.json +2 -9
- package/schemas/tools/backup_info.json +1 -3
- package/schemas/tools/bandwidth_test.json +3 -15
- package/schemas/tools/block_device.json +1 -3
- package/schemas/tools/bootstrap_ipv6_firewall_baseline.json +1 -4
- package/schemas/tools/build_guest_hotspot.json +1 -7
- package/schemas/tools/build_wireguard_mesh.json +1 -4
- package/schemas/tools/capture_config_snapshot.json +1 -5
- package/schemas/tools/change_password.json +1 -4
- package/schemas/tools/check_route_path.json +1 -3
- package/schemas/tools/config_check_drift.json +1 -5
- package/schemas/tools/config_reconcile.json +1 -3
- package/schemas/tools/config_set_baseline.json +1 -4
- package/schemas/tools/correlate_events.json +1 -4
- package/schemas/tools/create_backup.json +1 -4
- package/schemas/tools/create_bridge.json +5 -28
- package/schemas/tools/create_certificate.json +1 -6
- package/schemas/tools/create_dhcp_network.json +1 -4
- package/schemas/tools/create_dhcp_pool.json +1 -4
- package/schemas/tools/create_dhcp_server.json +4 -22
- package/schemas/tools/create_eoip_tunnel.json +3 -17
- package/schemas/tools/create_export.json +3 -17
- package/schemas/tools/create_filter_rule.json +1 -6
- package/schemas/tools/create_gre_tunnel.json +2 -9
- package/schemas/tools/create_ip_pool.json +1 -4
- package/schemas/tools/create_ipip_tunnel.json +2 -9
- package/schemas/tools/create_ipsec_identity.json +4 -21
- package/schemas/tools/create_ipsec_peer.json +2 -10
- package/schemas/tools/create_ipsec_policy.json +3 -15
- package/schemas/tools/create_ipsec_profile.json +1 -5
- package/schemas/tools/create_ipsec_proposal.json +1 -7
- package/schemas/tools/create_ipv6_dhcp_server.json +1 -7
- package/schemas/tools/create_ipv6_filter_rule.json +2 -11
- package/schemas/tools/create_ipv6_mangle_rule.json +2 -13
- package/schemas/tools/create_ipv6_nat_rule.json +2 -10
- package/schemas/tools/create_ipv6_pool.json +1 -5
- package/schemas/tools/create_ipv6_raw_rule.json +3 -19
- package/schemas/tools/create_l2tp_client.json +2 -12
- package/schemas/tools/create_local_backup.json +1 -6
- package/schemas/tools/create_mangle_rule.json +2 -13
- package/schemas/tools/create_nat_rule.json +2 -10
- package/schemas/tools/create_ovpn_client.json +4 -18
- package/schemas/tools/create_ppp_profile.json +6 -30
- package/schemas/tools/create_ppp_secret.json +2 -14
- package/schemas/tools/create_pptp_client.json +1 -7
- package/schemas/tools/create_queue_tree.json +1 -5
- package/schemas/tools/create_queue_type.json +5 -28
- package/schemas/tools/create_scheduler.json +1 -5
- package/schemas/tools/create_simple_queue.json +1 -5
- package/schemas/tools/create_sstp_client.json +2 -11
- package/schemas/tools/create_vlan_interface.json +3 -19
- package/schemas/tools/create_vxlan_tunnel.json +3 -17
- package/schemas/tools/create_wireguard_interface.json +1 -4
- package/schemas/tools/create_wireless_interface.json +6 -37
- package/schemas/tools/create_wireless_security_profile.json +1 -3
- package/schemas/tools/delete_local_backup.json +1 -3
- package/schemas/tools/delete_s3_backup.json +1 -3
- package/schemas/tools/describe_tool.json +1 -3
- package/schemas/tools/design_network_segment.json +1 -10
- package/schemas/tools/diagnose.json +1 -3
- package/schemas/tools/diff_config_snapshots.json +1 -6
- package/schemas/tools/disable_address_list_entry.json +1 -3
- package/schemas/tools/disable_dns_static.json +1 -3
- package/schemas/tools/disable_filter_rule.json +1 -3
- package/schemas/tools/disable_interface.json +1 -3
- package/schemas/tools/disable_ip_service.json +1 -3
- package/schemas/tools/disable_ipv6_address_list_entry.json +1 -3
- package/schemas/tools/disable_ipv6_dhcp_relay.json +1 -3
- package/schemas/tools/disable_ipv6_filter_rule.json +1 -3
- package/schemas/tools/disable_ipv6_mangle_rule.json +1 -3
- package/schemas/tools/disable_ipv6_nat_rule.json +1 -3
- package/schemas/tools/disable_ipv6_raw_rule.json +1 -3
- package/schemas/tools/disable_ipv6_route.json +1 -3
- package/schemas/tools/disable_l2tp_client.json +1 -3
- package/schemas/tools/disable_mangle_rule.json +1 -3
- package/schemas/tools/disable_nat_rule.json +1 -3
- package/schemas/tools/disable_ovpn_client.json +1 -3
- package/schemas/tools/disable_ovpn_server.json +1 -3
- package/schemas/tools/disable_queue_tree.json +1 -3
- package/schemas/tools/disable_radius_server.json +1 -3
- package/schemas/tools/disable_route.json +1 -3
- package/schemas/tools/disable_scheduler.json +1 -3
- package/schemas/tools/disable_simple_queue.json +1 -3
- package/schemas/tools/disable_sstp_client.json +1 -3
- package/schemas/tools/disable_switch_rule.json +1 -3
- package/schemas/tools/disable_traffic_monitor.json +1 -3
- package/schemas/tools/disable_user.json +1 -3
- package/schemas/tools/disable_wireguard_interface.json +1 -3
- package/schemas/tools/disable_wireguard_peer.json +1 -3
- package/schemas/tools/disable_wireless_interface.json +1 -3
- package/schemas/tools/disconnect_ppp_active.json +1 -3
- package/schemas/tools/disconnect_user.json +1 -3
- package/schemas/tools/download_backup_from_s3.json +1 -3
- package/schemas/tools/download_file.json +1 -3
- package/schemas/tools/eject_disk.json +1 -3
- package/schemas/tools/enable_address_list_entry.json +1 -3
- package/schemas/tools/enable_dns_static.json +1 -3
- package/schemas/tools/enable_filter_rule.json +1 -3
- package/schemas/tools/enable_interface.json +1 -3
- package/schemas/tools/enable_ip_service.json +1 -3
- package/schemas/tools/enable_ipv6_address_list_entry.json +1 -3
- package/schemas/tools/enable_ipv6_dhcp_relay.json +1 -3
- package/schemas/tools/enable_ipv6_filter_rule.json +1 -3
- package/schemas/tools/enable_ipv6_mangle_rule.json +1 -3
- package/schemas/tools/enable_ipv6_nat_rule.json +1 -3
- package/schemas/tools/enable_ipv6_raw_rule.json +1 -3
- package/schemas/tools/enable_ipv6_route.json +1 -3
- package/schemas/tools/enable_l2tp_client.json +1 -3
- package/schemas/tools/enable_mangle_rule.json +1 -3
- package/schemas/tools/enable_nat_rule.json +1 -3
- package/schemas/tools/enable_ovpn_client.json +1 -3
- package/schemas/tools/enable_ovpn_server.json +1 -3
- package/schemas/tools/enable_queue_tree.json +1 -3
- package/schemas/tools/enable_radius_server.json +1 -3
- package/schemas/tools/enable_route.json +1 -3
- package/schemas/tools/enable_scheduler.json +1 -3
- package/schemas/tools/enable_simple_queue.json +1 -3
- package/schemas/tools/enable_sstp_client.json +1 -3
- package/schemas/tools/enable_switch_rule.json +1 -3
- package/schemas/tools/enable_traffic_monitor.json +1 -3
- package/schemas/tools/enable_user.json +1 -3
- package/schemas/tools/enable_wireguard_interface.json +1 -3
- package/schemas/tools/enable_wireguard_peer.json +1 -3
- package/schemas/tools/enable_wireless_interface.json +1 -3
- package/schemas/tools/enforce_address_list_blocking.json +1 -4
- package/schemas/tools/expand_ip_pool.json +1 -4
- package/schemas/tools/export_logs.json +2 -7
- package/schemas/tools/export_section.json +1 -5
- package/schemas/tools/export_ssh_host_key.json +1 -3
- package/schemas/tools/find_tools.json +1 -3
- package/schemas/tools/firewall_audit.json +1 -4
- package/schemas/tools/firmware_check.json +2 -8
- package/schemas/tools/firmware_stage.json +1 -5
- package/schemas/tools/firmware_status.json +1 -3
- package/schemas/tools/firmware_upgrade.json +1 -5
- package/schemas/tools/fix_certificate_crl_policy.json +1 -4
- package/schemas/tools/fix_password_policy.json +1 -4
- package/schemas/tools/flood_ping.json +1 -4
- package/schemas/tools/forecast_link_saturation.json +1 -5
- package/schemas/tools/format_disk.json +2 -10
- package/schemas/tools/forward_port.json +2 -10
- package/schemas/tools/generate_hotspot_vouchers.json +1 -5
- package/schemas/tools/get_aaa_section.json +1 -3
- package/schemas/tools/get_address_list_entry.json +1 -3
- package/schemas/tools/get_bgp_connection.json +1 -3
- package/schemas/tools/get_bridge.json +1 -3
- package/schemas/tools/get_certificate.json +1 -3
- package/schemas/tools/get_config_snapshot.json +1 -4
- package/schemas/tools/get_device_traffic.json +1 -3
- package/schemas/tools/get_dhcp_client.json +1 -3
- package/schemas/tools/get_dhcp_server.json +1 -3
- package/schemas/tools/get_disk.json +1 -3
- package/schemas/tools/get_dns_static.json +1 -3
- package/schemas/tools/get_dot1x_client.json +1 -3
- package/schemas/tools/get_dot1x_server.json +1 -3
- package/schemas/tools/get_eoip_tunnel.json +1 -3
- package/schemas/tools/get_filter_rule.json +1 -3
- package/schemas/tools/get_gre_tunnel.json +1 -3
- package/schemas/tools/get_interface.json +1 -3
- package/schemas/tools/get_ip_address.json +1 -3
- package/schemas/tools/get_ip_pool.json +1 -3
- package/schemas/tools/get_ip_service.json +1 -3
- package/schemas/tools/get_ipip_tunnel.json +1 -3
- package/schemas/tools/get_ipsec_peer.json +1 -3
- package/schemas/tools/get_ipsec_profile.json +1 -3
- package/schemas/tools/get_ipsec_proposal.json +1 -3
- package/schemas/tools/get_ipv6_address.json +1 -3
- package/schemas/tools/get_ipv6_address_list_entry.json +1 -3
- package/schemas/tools/get_ipv6_dhcp_client.json +1 -3
- package/schemas/tools/get_ipv6_dhcp_relay.json +1 -3
- package/schemas/tools/get_ipv6_dhcp_server.json +1 -3
- package/schemas/tools/get_ipv6_filter_rule.json +1 -3
- package/schemas/tools/get_ipv6_mangle_rule.json +1 -3
- package/schemas/tools/get_ipv6_nat_rule.json +1 -3
- package/schemas/tools/get_ipv6_nd.json +1 -3
- package/schemas/tools/get_ipv6_neighbor.json +1 -3
- package/schemas/tools/get_ipv6_pool.json +1 -3
- package/schemas/tools/get_ipv6_raw_rule.json +1 -3
- package/schemas/tools/get_ipv6_route.json +1 -3
- package/schemas/tools/get_l2tp_client.json +1 -3
- package/schemas/tools/get_local_backup.json +1 -3
- package/schemas/tools/get_logs.json +2 -9
- package/schemas/tools/get_logs_by_severity.json +2 -10
- package/schemas/tools/get_logs_by_topic.json +1 -3
- package/schemas/tools/get_mangle_rule.json +1 -3
- package/schemas/tools/get_nat_rule.json +1 -3
- package/schemas/tools/get_netwatch.json +1 -3
- package/schemas/tools/get_ovpn_client.json +1 -3
- package/schemas/tools/get_poe_monitor.json +1 -3
- package/schemas/tools/get_poe_settings.json +1 -3
- package/schemas/tools/get_port.json +1 -3
- package/schemas/tools/get_ppp_profile.json +1 -3
- package/schemas/tools/get_ppp_secret.json +1 -3
- package/schemas/tools/get_pptp_client.json +1 -3
- package/schemas/tools/get_queue_interface.json +1 -3
- package/schemas/tools/get_queue_tree.json +1 -3
- package/schemas/tools/get_queue_type.json +1 -3
- package/schemas/tools/get_radius_server.json +1 -3
- package/schemas/tools/get_route.json +1 -3
- package/schemas/tools/get_routing_id.json +1 -3
- package/schemas/tools/get_routing_rule.json +1 -3
- package/schemas/tools/get_routing_table.json +1 -4
- package/schemas/tools/get_routing_table_def.json +1 -3
- package/schemas/tools/get_scheduler.json +1 -3
- package/schemas/tools/get_simple_queue.json +1 -3
- package/schemas/tools/get_sstp_client.json +1 -3
- package/schemas/tools/get_switch.json +1 -3
- package/schemas/tools/get_switch_port.json +1 -3
- package/schemas/tools/get_switch_port_isolation.json +1 -3
- package/schemas/tools/get_switch_rule.json +1 -3
- package/schemas/tools/get_traffic_monitor.json +1 -3
- package/schemas/tools/get_user.json +1 -3
- package/schemas/tools/get_user_group.json +1 -3
- package/schemas/tools/get_user_manager_user.json +1 -3
- package/schemas/tools/get_vlan_interface.json +1 -3
- package/schemas/tools/get_vxlan_tunnel.json +1 -3
- package/schemas/tools/get_wireguard_interface.json +1 -3
- package/schemas/tools/get_wireguard_peer.json +1 -3
- package/schemas/tools/get_wireless_interface.json +1 -3
- package/schemas/tools/get_wireless_security_profile.json +1 -3
- package/schemas/tools/harden_connection_tracking_helpers.json +1 -4
- package/schemas/tools/harden_dns_resolver_exposure.json +1 -4
- package/schemas/tools/harden_firewall.json +1 -6
- package/schemas/tools/harden_ip_service_exposure.json +1 -4
- package/schemas/tools/harden_kernel_ip_settings.json +1 -4
- package/schemas/tools/harden_management_plane_exposure.json +1 -4
- package/schemas/tools/harden_ssh_service.json +1 -4
- package/schemas/tools/import_certificate.json +1 -3
- package/schemas/tools/import_configuration.json +1 -5
- package/schemas/tools/import_ssh_host_key.json +1 -3
- package/schemas/tools/invoke_tool.json +1 -3
- package/schemas/tools/ip_scan.json +1 -3
- package/schemas/tools/list_address_lists.json +1 -3
- package/schemas/tools/list_backups.json +1 -3
- package/schemas/tools/list_bfd_sessions.json +1 -3
- package/schemas/tools/list_bgp_sessions.json +1 -3
- package/schemas/tools/list_config_snapshots.json +1 -3
- package/schemas/tools/list_connected_devices.json +1 -4
- package/schemas/tools/list_containers.json +1 -3
- package/schemas/tools/list_dhcp_servers.json +1 -4
- package/schemas/tools/list_disks.json +1 -3
- package/schemas/tools/list_dns_static.json +1 -4
- package/schemas/tools/list_dot1x_clients.json +1 -3
- package/schemas/tools/list_dot1x_servers.json +1 -3
- package/schemas/tools/list_filter_rules.json +1 -5
- package/schemas/tools/list_graphing.json +2 -8
- package/schemas/tools/list_interfaces.json +1 -4
- package/schemas/tools/list_ip_addresses.json +1 -4
- package/schemas/tools/list_ip_pools.json +1 -3
- package/schemas/tools/list_ipv6_address_lists.json +1 -3
- package/schemas/tools/list_ipv6_addresses.json +1 -5
- package/schemas/tools/list_ipv6_dhcp_bindings.json +1 -3
- package/schemas/tools/list_ipv6_dhcp_clients.json +1 -4
- package/schemas/tools/list_ipv6_dhcp_relays.json +1 -3
- package/schemas/tools/list_ipv6_dhcp_servers.json +1 -4
- package/schemas/tools/list_ipv6_filter_rules.json +1 -5
- package/schemas/tools/list_ipv6_mangle_rules.json +1 -5
- package/schemas/tools/list_ipv6_nat_rules.json +1 -5
- package/schemas/tools/list_ipv6_nd.json +1 -3
- package/schemas/tools/list_ipv6_nd_prefixes.json +1 -3
- package/schemas/tools/list_ipv6_neighbors.json +1 -3
- package/schemas/tools/list_ipv6_raw_rules.json +1 -5
- package/schemas/tools/list_ipv6_routes.json +1 -5
- package/schemas/tools/list_mangle_rules.json +1 -5
- package/schemas/tools/list_nat_rules.json +1 -4
- package/schemas/tools/list_ppp_secrets.json +1 -8
- package/schemas/tools/list_queue_trees.json +1 -4
- package/schemas/tools/list_routes.json +1 -6
- package/schemas/tools/list_routing_nexthops.json +1 -3
- package/schemas/tools/list_routing_rules.json +1 -3
- package/schemas/tools/list_s3_backups.json +1 -3
- package/schemas/tools/list_simple_queues.json +1 -4
- package/schemas/tools/list_switch_rules.json +1 -3
- package/schemas/tools/list_traffic_monitors.json +1 -3
- package/schemas/tools/list_user_manager_sessions.json +1 -3
- package/schemas/tools/list_user_ssh_keys.json +1 -3
- package/schemas/tools/list_users.json +1 -4
- package/schemas/tools/list_vlan_interfaces.json +1 -3
- package/schemas/tools/list_wireguard_interfaces.json +1 -4
- package/schemas/tools/list_wireguard_peers.json +1 -3
- package/schemas/tools/list_wireless_interfaces.json +1 -4
- package/schemas/tools/make_device_static.json +1 -3
- package/schemas/tools/memory_add_observations.json +2 -7
- package/schemas/tools/memory_create_entities.json +2 -7
- package/schemas/tools/memory_create_relations.json +2 -8
- package/schemas/tools/memory_delete_entities.json +1 -3
- package/schemas/tools/memory_delete_observations.json +2 -7
- package/schemas/tools/memory_delete_relations.json +2 -8
- package/schemas/tools/memory_open_nodes.json +1 -3
- package/schemas/tools/memory_search_nodes.json +1 -3
- package/schemas/tools/mirror_traffic_to_capture.json +2 -12
- package/schemas/tools/monitor_logs.json +1 -3
- package/schemas/tools/move_filter_rule.json +1 -4
- package/schemas/tools/move_ipv6_filter_rule.json +1 -4
- package/schemas/tools/move_ipv6_mangle_rule.json +1 -4
- package/schemas/tools/move_ipv6_nat_rule.json +1 -4
- package/schemas/tools/move_ipv6_raw_rule.json +1 -4
- package/schemas/tools/move_mangle_rule.json +1 -4
- package/schemas/tools/move_nat_rule.json +1 -4
- package/schemas/tools/onboard_wireguard_user.json +1 -8
- package/schemas/tools/packet_capture_status.json +1 -3
- package/schemas/tools/ping.json +1 -4
- package/schemas/tools/profile_cpu.json +1 -3
- package/schemas/tools/reboot_system.json +1 -3
- package/schemas/tools/release_ipv6_dhcp_client.json +1 -3
- package/schemas/tools/remove_address_list_entry.json +1 -3
- package/schemas/tools/remove_bfd_configuration.json +1 -3
- package/schemas/tools/remove_bgp_connection.json +1 -3
- package/schemas/tools/remove_bgp_template.json +1 -3
- package/schemas/tools/remove_bridge.json +1 -3
- package/schemas/tools/remove_bridge_port.json +1 -3
- package/schemas/tools/remove_certificate.json +1 -3
- package/schemas/tools/remove_config_snapshot.json +1 -3
- package/schemas/tools/remove_container_env.json +1 -4
- package/schemas/tools/remove_container_mount.json +1 -3
- package/schemas/tools/remove_device_lease.json +1 -3
- package/schemas/tools/remove_dhcp_client.json +1 -3
- package/schemas/tools/remove_dhcp_server.json +1 -3
- package/schemas/tools/remove_disk.json +1 -3
- package/schemas/tools/remove_dns_static.json +1 -3
- package/schemas/tools/remove_dot1x_client.json +1 -3
- package/schemas/tools/remove_dot1x_server.json +1 -3
- package/schemas/tools/remove_eoip_tunnel.json +1 -3
- package/schemas/tools/remove_file.json +1 -3
- package/schemas/tools/remove_filter_rule.json +1 -3
- package/schemas/tools/remove_graphing.json +2 -9
- package/schemas/tools/remove_gre_tunnel.json +1 -3
- package/schemas/tools/remove_igmp_proxy_interface.json +1 -3
- package/schemas/tools/remove_ip_address.json +1 -3
- package/schemas/tools/remove_ip_pool.json +1 -3
- package/schemas/tools/remove_ipip_tunnel.json +1 -3
- package/schemas/tools/remove_ipsec_identity.json +1 -3
- package/schemas/tools/remove_ipsec_peer.json +1 -3
- package/schemas/tools/remove_ipsec_policy.json +1 -3
- package/schemas/tools/remove_ipsec_profile.json +1 -3
- package/schemas/tools/remove_ipsec_proposal.json +1 -3
- package/schemas/tools/remove_ipv6_address.json +1 -3
- package/schemas/tools/remove_ipv6_address_list_entry.json +1 -3
- package/schemas/tools/remove_ipv6_dhcp_binding.json +1 -3
- package/schemas/tools/remove_ipv6_dhcp_client.json +1 -3
- package/schemas/tools/remove_ipv6_dhcp_option.json +1 -3
- package/schemas/tools/remove_ipv6_dhcp_relay.json +1 -3
- package/schemas/tools/remove_ipv6_dhcp_server.json +1 -3
- package/schemas/tools/remove_ipv6_filter_rule.json +1 -3
- package/schemas/tools/remove_ipv6_mangle_rule.json +1 -3
- package/schemas/tools/remove_ipv6_nat_rule.json +1 -3
- package/schemas/tools/remove_ipv6_nd.json +1 -3
- package/schemas/tools/remove_ipv6_nd_prefix.json +1 -3
- package/schemas/tools/remove_ipv6_neighbor.json +1 -3
- package/schemas/tools/remove_ipv6_pool.json +1 -3
- package/schemas/tools/remove_ipv6_raw_rule.json +1 -3
- package/schemas/tools/remove_ipv6_route.json +1 -3
- package/schemas/tools/remove_l2tp_client.json +1 -3
- package/schemas/tools/remove_logging_action.json +1 -3
- package/schemas/tools/remove_logging_rule.json +1 -3
- package/schemas/tools/remove_mangle_rule.json +1 -3
- package/schemas/tools/remove_nat_rule.json +1 -3
- package/schemas/tools/remove_netwatch.json +1 -3
- package/schemas/tools/remove_ospf_area.json +1 -3
- package/schemas/tools/remove_ospf_area_range.json +1 -3
- package/schemas/tools/remove_ospf_instance.json +1 -3
- package/schemas/tools/remove_ospf_interface_template.json +1 -3
- package/schemas/tools/remove_ovpn_client.json +1 -3
- package/schemas/tools/remove_ovpn_server.json +1 -3
- package/schemas/tools/remove_pimsm_instance.json +1 -3
- package/schemas/tools/remove_pimsm_interface_template.json +1 -3
- package/schemas/tools/remove_pimsm_rp.json +1 -3
- package/schemas/tools/remove_ppp_profile.json +1 -3
- package/schemas/tools/remove_ppp_secret.json +1 -3
- package/schemas/tools/remove_pptp_client.json +1 -3
- package/schemas/tools/remove_queue_tree.json +1 -3
- package/schemas/tools/remove_queue_type.json +1 -3
- package/schemas/tools/remove_radius_server.json +1 -3
- package/schemas/tools/remove_rip_instance.json +1 -3
- package/schemas/tools/remove_rip_interface_template.json +1 -3
- package/schemas/tools/remove_rip_static_neighbor.json +1 -3
- package/schemas/tools/remove_romon_port.json +1 -3
- package/schemas/tools/remove_route.json +1 -3
- package/schemas/tools/remove_routing_filter_num_list.json +1 -3
- package/schemas/tools/remove_routing_filter_rule.json +1 -3
- package/schemas/tools/remove_routing_id.json +1 -3
- package/schemas/tools/remove_routing_rule.json +1 -3
- package/schemas/tools/remove_routing_table.json +1 -3
- package/schemas/tools/remove_rpki_session.json +1 -3
- package/schemas/tools/remove_scheduler.json +1 -3
- package/schemas/tools/remove_script.json +1 -3
- package/schemas/tools/remove_simple_queue.json +1 -3
- package/schemas/tools/remove_sstp_client.json +1 -3
- package/schemas/tools/remove_switch_port_isolation.json +1 -3
- package/schemas/tools/remove_switch_rule.json +1 -3
- package/schemas/tools/remove_threat_feed.json +1 -3
- package/schemas/tools/remove_time_policy.json +1 -3
- package/schemas/tools/remove_traffic_generator_port.json +1 -3
- package/schemas/tools/remove_traffic_generator_stream.json +1 -3
- package/schemas/tools/remove_traffic_monitor.json +1 -3
- package/schemas/tools/remove_user.json +1 -3
- package/schemas/tools/remove_user_group.json +1 -3
- package/schemas/tools/remove_user_manager_limitation.json +1 -3
- package/schemas/tools/remove_user_manager_profile.json +1 -3
- package/schemas/tools/remove_user_manager_router.json +1 -3
- package/schemas/tools/remove_user_manager_user.json +1 -3
- package/schemas/tools/remove_user_ssh_key.json +1 -3
- package/schemas/tools/remove_vlan_interface.json +1 -3
- package/schemas/tools/remove_vxlan_tunnel.json +1 -3
- package/schemas/tools/remove_wireguard_interface.json +1 -3
- package/schemas/tools/remove_wireguard_peer.json +1 -3
- package/schemas/tools/remove_wireless_access_list_entry.json +1 -3
- package/schemas/tools/remove_wireless_interface.json +1 -3
- package/schemas/tools/remove_wireless_security_profile.json +1 -3
- package/schemas/tools/rename_local_backup.json +1 -4
- package/schemas/tools/renew_dhcp_client.json +1 -4
- package/schemas/tools/renew_ipv6_dhcp_client.json +1 -3
- package/schemas/tools/request_letsencrypt_certificate.json +1 -3
- package/schemas/tools/reset_configuration.json +1 -3
- package/schemas/tools/resolve_dns.json +1 -3
- package/schemas/tools/restore_backup.json +1 -3
- package/schemas/tools/restore_local_backup.json +1 -4
- package/schemas/tools/revoke_wireguard_user.json +1 -3
- package/schemas/tools/run_capsman_audit.json +1 -7
- package/schemas/tools/run_compliance_audit.json +2 -9
- package/schemas/tools/run_failover_drill.json +2 -11
- package/schemas/tools/run_routeros_command.json +1 -3
- package/schemas/tools/run_script.json +1 -3
- package/schemas/tools/s3_backup_info.json +1 -3
- package/schemas/tools/save_sniffer.json +1 -3
- package/schemas/tools/scan_wireless_networks.json +1 -4
- package/schemas/tools/search_logs.json +1 -4
- package/schemas/tools/send_sms.json +1 -5
- package/schemas/tools/set_aaa_settings.json +2 -8
- package/schemas/tools/set_bfd_configuration_enabled.json +1 -4
- package/schemas/tools/set_bgp_connection_enabled.json +1 -4
- package/schemas/tools/set_device_ip.json +1 -4
- package/schemas/tools/set_device_label.json +1 -4
- package/schemas/tools/set_device_limits.json +1 -3
- package/schemas/tools/set_dhcp_client.json +1 -3
- package/schemas/tools/set_disk.json +1 -3
- package/schemas/tools/set_dns_servers.json +1 -6
- package/schemas/tools/set_igmp_proxy_interface_enabled.json +1 -4
- package/schemas/tools/set_ip_cloud_advanced.json +1 -3
- package/schemas/tools/set_ip_service.json +1 -3
- package/schemas/tools/set_l2tp_server.json +2 -9
- package/schemas/tools/set_leds_settings.json +1 -6
- package/schemas/tools/set_neighbor_discovery_settings.json +1 -5
- package/schemas/tools/set_ntp_client.json +1 -6
- package/schemas/tools/set_ovpn_server.json +3 -12
- package/schemas/tools/set_port.json +3 -13
- package/schemas/tools/set_routing_filter_rule_enabled.json +1 -4
- package/schemas/tools/set_routing_id_enabled.json +1 -4
- package/schemas/tools/set_routing_rule_enabled.json +1 -4
- package/schemas/tools/set_routing_table_enabled.json +1 -4
- package/schemas/tools/set_rpki_session_enabled.json +1 -4
- package/schemas/tools/set_ssh_settings.json +2 -10
- package/schemas/tools/set_sstp_server.json +1 -4
- package/schemas/tools/set_system_identity.json +1 -3
- package/schemas/tools/set_time_policy.json +1 -7
- package/schemas/tools/set_user_ssh_keys.json +1 -4
- package/schemas/tools/set_wireless_security_profile.json +1 -4
- package/schemas/tools/setup_port_knock.json +1 -7
- package/schemas/tools/setup_wan_failover.json +2 -11
- package/schemas/tools/setup_wan_loadbalance.json +2 -10
- package/schemas/tools/share_disk.json +1 -3
- package/schemas/tools/shutdown_system.json +1 -3
- package/schemas/tools/sign_certificate.json +1 -3
- package/schemas/tools/speed_test.json +1 -4
- package/schemas/tools/start_packet_capture.json +1 -4
- package/schemas/tools/steer_client.json +2 -8
- package/schemas/tools/subscribe_threat_feed.json +1 -8
- package/schemas/tools/suggest_fix.json +1 -3
- package/schemas/tools/test_dns_query.json +1 -4
- package/schemas/tools/test_ssh_from_device.json +1 -6
- package/schemas/tools/test_ssh_to_host.json +1 -6
- package/schemas/tools/trace_path.json +1 -5
- package/schemas/tools/traceroute.json +1 -4
- package/schemas/tools/tune_wifi_channel.json +1 -5
- package/schemas/tools/update_bfd_configuration.json +1 -3
- package/schemas/tools/update_bgp_connection.json +1 -3
- package/schemas/tools/update_bridge.json +5 -26
- package/schemas/tools/update_dns_static.json +1 -3
- package/schemas/tools/update_dot1x_client.json +1 -3
- package/schemas/tools/update_dot1x_server.json +3 -12
- package/schemas/tools/update_filter_rule.json +1 -3
- package/schemas/tools/update_igmp_proxy_interface.json +1 -3
- package/schemas/tools/update_ip_pool.json +1 -3
- package/schemas/tools/update_ipsec_peer.json +2 -8
- package/schemas/tools/update_ipsec_profile.json +1 -3
- package/schemas/tools/update_ipsec_proposal.json +1 -3
- package/schemas/tools/update_ipv6_filter_rule.json +1 -3
- package/schemas/tools/update_ipv6_mangle_rule.json +1 -3
- package/schemas/tools/update_ipv6_nat_rule.json +1 -3
- package/schemas/tools/update_ipv6_nd.json +2 -8
- package/schemas/tools/update_ipv6_pool.json +1 -3
- package/schemas/tools/update_ipv6_raw_rule.json +1 -3
- package/schemas/tools/update_ipv6_settings.json +3 -15
- package/schemas/tools/update_mac_ping.json +1 -3
- package/schemas/tools/update_mac_server.json +1 -3
- package/schemas/tools/update_mac_winbox.json +1 -3
- package/schemas/tools/update_mangle_rule.json +1 -3
- package/schemas/tools/update_nat_rule.json +1 -3
- package/schemas/tools/update_ospf_instance.json +1 -3
- package/schemas/tools/update_ovpn_server.json +4 -15
- package/schemas/tools/update_ppp_profile.json +6 -30
- package/schemas/tools/update_ppp_secret.json +2 -11
- package/schemas/tools/update_queue_interface.json +1 -4
- package/schemas/tools/update_queue_tree.json +1 -3
- package/schemas/tools/update_queue_type.json +1 -3
- package/schemas/tools/update_radius_server.json +2 -7
- package/schemas/tools/update_rip_instance.json +1 -3
- package/schemas/tools/update_route.json +1 -3
- package/schemas/tools/update_routing_filter_rule.json +1 -3
- package/schemas/tools/update_routing_id.json +1 -3
- package/schemas/tools/update_routing_rule.json +2 -9
- package/schemas/tools/update_routing_settings.json +2 -10
- package/schemas/tools/update_routing_table.json +1 -3
- package/schemas/tools/update_rpki_session.json +1 -3
- package/schemas/tools/update_simple_queue.json +1 -3
- package/schemas/tools/update_sniffer_settings.json +2 -9
- package/schemas/tools/update_switch.json +1 -3
- package/schemas/tools/update_switch_port.json +3 -14
- package/schemas/tools/update_switch_port_isolation.json +1 -3
- package/schemas/tools/update_switch_rule.json +2 -8
- package/schemas/tools/update_traffic_monitor.json +3 -12
- package/schemas/tools/update_user.json +1 -3
- package/schemas/tools/update_user_group.json +1 -3
- package/schemas/tools/update_user_manager_user.json +1 -3
- package/schemas/tools/update_vlan_interface.json +3 -14
- package/schemas/tools/update_wireguard_interface.json +1 -3
- package/schemas/tools/update_wireguard_peer.json +1 -3
- package/schemas/tools/update_wireless_interface.json +6 -36
- package/schemas/tools/upload_backup_to_s3.json +1 -3
- package/schemas/tools/upload_file.json +1 -4
- package/schemas/tools/wake_on_lan.json +1 -3
package/dist/cli.js
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
LOGO_URL,
|
|
12
12
|
MikrotikConfigSchema,
|
|
13
13
|
PKG_META,
|
|
14
|
+
PROJECT_ROOT,
|
|
14
15
|
PROMPTS_DIR,
|
|
15
16
|
REDACTED,
|
|
16
17
|
SERVER_DESCRIPTION,
|
|
@@ -124,7 +125,7 @@ import {
|
|
|
124
125
|
updateAaaEntity,
|
|
125
126
|
updateSummaryLine,
|
|
126
127
|
writeBackup
|
|
127
|
-
} from "./shared/cli-
|
|
128
|
+
} from "./shared/cli-tssmr7sb.js";
|
|
128
129
|
|
|
129
130
|
// src/cli.ts
|
|
130
131
|
import { existsSync as existsSync2 } from "fs";
|
|
@@ -132,8 +133,8 @@ import { existsSync as existsSync2 } from "fs";
|
|
|
132
133
|
// src/observability/dashboard.ts
|
|
133
134
|
import { spawn } from "child_process";
|
|
134
135
|
import { readFileSync as readFileSync3 } from "fs";
|
|
135
|
-
import { homedir, networkInterfaces } from "os";
|
|
136
|
-
import { dirname as dirname5, join as
|
|
136
|
+
import { homedir as homedir2, networkInterfaces } from "os";
|
|
137
|
+
import { dirname as dirname5, join as join4 } from "path";
|
|
137
138
|
var {serve } = globalThis.Bun;
|
|
138
139
|
import { z as z2 } from "zod";
|
|
139
140
|
|
|
@@ -815,6 +816,142 @@ function stopHealthChecks() {
|
|
|
815
816
|
}
|
|
816
817
|
}
|
|
817
818
|
|
|
819
|
+
// src/observability/geo.ts
|
|
820
|
+
import { lookup } from "dns/promises";
|
|
821
|
+
var LOG_TAG2 = "mikrotik-mcp";
|
|
822
|
+
var cache = new Map;
|
|
823
|
+
var REFRESH_MS = 24 * 60 * 60000;
|
|
824
|
+
var timer2 = null;
|
|
825
|
+
var inFlight2 = false;
|
|
826
|
+
function getDeviceGeo(name) {
|
|
827
|
+
return cache.get(name)?.geo ?? null;
|
|
828
|
+
}
|
|
829
|
+
var IPV4_RE = /^\d{1,3}(?:\.\d{1,3}){3}$/;
|
|
830
|
+
var PRIVATE_RE = /^(?:10\.|127\.|0\.|169\.254\.|192\.168\.|172\.(?:1[6-9]|2\d|3[01])\.|100\.(?:6[4-9]|[7-9]\d|1[01]\d|12[0-7])\.|::1$|f[cd])/i;
|
|
831
|
+
function isIpLiteral(host) {
|
|
832
|
+
return IPV4_RE.test(host) || host.includes(":");
|
|
833
|
+
}
|
|
834
|
+
async function publicIpOf(host) {
|
|
835
|
+
let ip = host;
|
|
836
|
+
if (!isIpLiteral(host)) {
|
|
837
|
+
try {
|
|
838
|
+
ip = (await lookup(host)).address;
|
|
839
|
+
} catch {
|
|
840
|
+
return null;
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
return PRIVATE_RE.test(ip) ? null : ip;
|
|
844
|
+
}
|
|
845
|
+
function toGeo(country, code, city) {
|
|
846
|
+
if (!code)
|
|
847
|
+
return null;
|
|
848
|
+
return { countryCode: code.toLowerCase(), country: country ?? code, city: city || undefined };
|
|
849
|
+
}
|
|
850
|
+
async function fetchIpkit(ip) {
|
|
851
|
+
const res = await fetch(`https://ipkit.ir/${ip}`, {
|
|
852
|
+
headers: { accept: "application/json" },
|
|
853
|
+
signal: AbortSignal.timeout(8000)
|
|
854
|
+
});
|
|
855
|
+
if (!res.ok)
|
|
856
|
+
throw new Error(`ipkit HTTP ${res.status}`);
|
|
857
|
+
const d = await res.json();
|
|
858
|
+
if (d.is_private)
|
|
859
|
+
return null;
|
|
860
|
+
return toGeo(d.country, d.country_code, d.city);
|
|
861
|
+
}
|
|
862
|
+
async function fetchIpquery(ip) {
|
|
863
|
+
const res = await fetch(`https://api.ipquery.io/${ip}`, { signal: AbortSignal.timeout(8000) });
|
|
864
|
+
if (!res.ok)
|
|
865
|
+
throw new Error(`ipquery HTTP ${res.status}`);
|
|
866
|
+
const d = await res.json();
|
|
867
|
+
return toGeo(d.location?.country, d.location?.country_code, d.location?.city);
|
|
868
|
+
}
|
|
869
|
+
async function fetchGeo(ip) {
|
|
870
|
+
try {
|
|
871
|
+
return await fetchIpkit(ip);
|
|
872
|
+
} catch (e) {
|
|
873
|
+
logger.warn(`[${LOG_TAG2}] ipkit geo failed for ${ip}, trying ipquery: ${e instanceof Error ? e.message : String(e)}`);
|
|
874
|
+
}
|
|
875
|
+
try {
|
|
876
|
+
return await fetchIpquery(ip);
|
|
877
|
+
} catch (e) {
|
|
878
|
+
logger.warn(`[${LOG_TAG2}] geo lookup failed for ${ip}: ${e instanceof Error ? e.message : String(e)}`);
|
|
879
|
+
return null;
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
async function resolveDevice(name, host) {
|
|
883
|
+
const ip = host ? await publicIpOf(host) : null;
|
|
884
|
+
const geo = ip ? await fetchGeo(ip) : null;
|
|
885
|
+
cache.set(name, { geo, at: Date.now() });
|
|
886
|
+
}
|
|
887
|
+
async function refreshGeo() {
|
|
888
|
+
if (inFlight2)
|
|
889
|
+
return;
|
|
890
|
+
inFlight2 = true;
|
|
891
|
+
try {
|
|
892
|
+
const now = Date.now();
|
|
893
|
+
await Promise.all(Object.entries(getConfig().devices).map(([name, dc]) => {
|
|
894
|
+
const c = cache.get(name);
|
|
895
|
+
if (c && now - c.at < REFRESH_MS)
|
|
896
|
+
return Promise.resolve();
|
|
897
|
+
return resolveDevice(name, dc.mac ? undefined : dc.host);
|
|
898
|
+
}));
|
|
899
|
+
} finally {
|
|
900
|
+
inFlight2 = false;
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
function startGeoLookups() {
|
|
904
|
+
refreshGeo();
|
|
905
|
+
timer2 = setInterval(() => void refreshGeo(), REFRESH_MS);
|
|
906
|
+
}
|
|
907
|
+
function stopGeoLookups() {
|
|
908
|
+
if (timer2) {
|
|
909
|
+
clearInterval(timer2);
|
|
910
|
+
timer2 = null;
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
// src/observability/flags.ts
|
|
915
|
+
import { join as join3 } from "path";
|
|
916
|
+
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
917
|
+
import { homedir } from "os";
|
|
918
|
+
var LOG_TAG3 = "mikrotik-mcp";
|
|
919
|
+
var CODE_RE = /^[a-z]{2}$/;
|
|
920
|
+
var sourceUrl = (code) => `https://hatscripts.github.io/circle-flags/flags/${code}.svg`;
|
|
921
|
+
var VENDOR_DIR = join3(PROJECT_ROOT, "assets", "flags");
|
|
922
|
+
var CACHE_DIR = join3(homedir(), ".mikrotik-mcp", "flags");
|
|
923
|
+
var mem = new Map;
|
|
924
|
+
async function flagSvg(code) {
|
|
925
|
+
const c = code.toLowerCase();
|
|
926
|
+
if (!CODE_RE.test(c))
|
|
927
|
+
return null;
|
|
928
|
+
const cached = mem.get(c);
|
|
929
|
+
if (cached !== undefined)
|
|
930
|
+
return cached;
|
|
931
|
+
for (const file of [join3(VENDOR_DIR, `${c}.svg`), join3(CACHE_DIR, `${c}.svg`)]) {
|
|
932
|
+
try {
|
|
933
|
+
const svg = await readFile(file, "utf8");
|
|
934
|
+
mem.set(c, svg);
|
|
935
|
+
return svg;
|
|
936
|
+
} catch {}
|
|
937
|
+
}
|
|
938
|
+
try {
|
|
939
|
+
const res = await fetch(sourceUrl(c), { signal: AbortSignal.timeout(8000) });
|
|
940
|
+
if (!res.ok) {
|
|
941
|
+
if (res.status === 404)
|
|
942
|
+
mem.set(c, null);
|
|
943
|
+
return null;
|
|
944
|
+
}
|
|
945
|
+
const svg = await res.text();
|
|
946
|
+
mem.set(c, svg);
|
|
947
|
+
mkdir(CACHE_DIR, { recursive: true }).then(() => writeFile(join3(CACHE_DIR, `${c}.svg`), svg)).catch(() => {});
|
|
948
|
+
return svg;
|
|
949
|
+
} catch (e) {
|
|
950
|
+
logger.warn(`[${LOG_TAG3}] flag fetch failed for '${c}': ${e instanceof Error ? e.message : String(e)}`);
|
|
951
|
+
return null;
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
|
|
818
955
|
// src/observability/traffic-hub.ts
|
|
819
956
|
var POLL_MS = 1000;
|
|
820
957
|
var hubs = new Map;
|
|
@@ -1140,8 +1277,8 @@ var CAPSMAN_RETENTION_MS = 30 * 24 * 60 * 60 * 1000;
|
|
|
1140
1277
|
var DEFAULT_CAPSMAN_INTERVAL_MS = 5 * 60000;
|
|
1141
1278
|
var MIN_CAPSMAN_INTERVAL_MS = 60000;
|
|
1142
1279
|
var MAX_CAPSMAN_INTERVAL_MS = 6 * 60 * 60000;
|
|
1143
|
-
var
|
|
1144
|
-
var
|
|
1280
|
+
var timer3 = null;
|
|
1281
|
+
var inFlight3 = false;
|
|
1145
1282
|
var noCapsman = new Set;
|
|
1146
1283
|
function clampInterval(ms) {
|
|
1147
1284
|
if (!Number.isFinite(ms))
|
|
@@ -1168,9 +1305,9 @@ async function sampleDevice(store, device, ts) {
|
|
|
1168
1305
|
store.recordRadioSamples(device, ts, samples);
|
|
1169
1306
|
}
|
|
1170
1307
|
async function sampleCapsmanOnce(store) {
|
|
1171
|
-
if (
|
|
1308
|
+
if (inFlight3)
|
|
1172
1309
|
return;
|
|
1173
|
-
|
|
1310
|
+
inFlight3 = true;
|
|
1174
1311
|
const ts = Date.now();
|
|
1175
1312
|
try {
|
|
1176
1313
|
const cfg = getConfig();
|
|
@@ -1185,18 +1322,18 @@ async function sampleCapsmanOnce(store) {
|
|
|
1185
1322
|
}));
|
|
1186
1323
|
store.pruneSamples(ts - CAPSMAN_RETENTION_MS);
|
|
1187
1324
|
} finally {
|
|
1188
|
-
|
|
1325
|
+
inFlight3 = false;
|
|
1189
1326
|
}
|
|
1190
1327
|
}
|
|
1191
1328
|
function startCapsmanSampler(store, intervalMs = DEFAULT_CAPSMAN_INTERVAL_MS) {
|
|
1192
1329
|
const ms = clampInterval(intervalMs);
|
|
1193
1330
|
sampleCapsmanOnce(store);
|
|
1194
|
-
|
|
1331
|
+
timer3 = setInterval(() => void sampleCapsmanOnce(store), ms);
|
|
1195
1332
|
}
|
|
1196
1333
|
function stopCapsmanSampler() {
|
|
1197
|
-
if (
|
|
1198
|
-
clearInterval(
|
|
1199
|
-
|
|
1334
|
+
if (timer3) {
|
|
1335
|
+
clearInterval(timer3);
|
|
1336
|
+
timer3 = null;
|
|
1200
1337
|
}
|
|
1201
1338
|
}
|
|
1202
1339
|
|
|
@@ -1336,8 +1473,8 @@ var USAGE_RETENTION_MS = 93 * 24 * 60 * 60 * 1000;
|
|
|
1336
1473
|
var DEFAULT_USAGE_INTERVAL_MS = 60000;
|
|
1337
1474
|
var MIN_USAGE_INTERVAL_MS = 30000;
|
|
1338
1475
|
var MAX_USAGE_INTERVAL_MS = 6 * 60 * 60000;
|
|
1339
|
-
var
|
|
1340
|
-
var
|
|
1476
|
+
var timer4 = null;
|
|
1477
|
+
var inFlight4 = false;
|
|
1341
1478
|
var currentStore = null;
|
|
1342
1479
|
var currentIntervalMs = DEFAULT_USAGE_INTERVAL_MS;
|
|
1343
1480
|
function clampInterval2(ms) {
|
|
@@ -1398,9 +1535,9 @@ async function ingestSessions(store, device) {
|
|
|
1398
1535
|
store.upsertSessions(device, sessions);
|
|
1399
1536
|
}
|
|
1400
1537
|
async function sampleUsageOnce(store) {
|
|
1401
|
-
if (
|
|
1538
|
+
if (inFlight4)
|
|
1402
1539
|
return;
|
|
1403
|
-
|
|
1540
|
+
inFlight4 = true;
|
|
1404
1541
|
const ts = Date.now();
|
|
1405
1542
|
try {
|
|
1406
1543
|
const cfg = getConfig();
|
|
@@ -1416,32 +1553,32 @@ async function sampleUsageOnce(store) {
|
|
|
1416
1553
|
}));
|
|
1417
1554
|
store.pruneSamples(ts - USAGE_RETENTION_MS);
|
|
1418
1555
|
} finally {
|
|
1419
|
-
|
|
1556
|
+
inFlight4 = false;
|
|
1420
1557
|
}
|
|
1421
1558
|
}
|
|
1422
1559
|
function startUsageSampler(store, intervalMs = DEFAULT_USAGE_INTERVAL_MS) {
|
|
1423
1560
|
currentStore = store;
|
|
1424
1561
|
currentIntervalMs = clampInterval2(intervalMs);
|
|
1425
1562
|
sampleUsageOnce(store);
|
|
1426
|
-
|
|
1563
|
+
timer4 = setInterval(() => void sampleUsageOnce(store), currentIntervalMs);
|
|
1427
1564
|
}
|
|
1428
1565
|
function getUsageSamplerInterval() {
|
|
1429
1566
|
return currentIntervalMs;
|
|
1430
1567
|
}
|
|
1431
1568
|
function setUsageSamplerInterval(intervalMs) {
|
|
1432
1569
|
currentIntervalMs = clampInterval2(intervalMs);
|
|
1433
|
-
if (
|
|
1434
|
-
clearInterval(
|
|
1570
|
+
if (timer4)
|
|
1571
|
+
clearInterval(timer4);
|
|
1435
1572
|
if (currentStore) {
|
|
1436
1573
|
const store = currentStore;
|
|
1437
|
-
|
|
1574
|
+
timer4 = setInterval(() => void sampleUsageOnce(store), currentIntervalMs);
|
|
1438
1575
|
}
|
|
1439
1576
|
return currentIntervalMs;
|
|
1440
1577
|
}
|
|
1441
1578
|
function stopUsageSampler() {
|
|
1442
|
-
if (
|
|
1443
|
-
clearInterval(
|
|
1444
|
-
|
|
1579
|
+
if (timer4) {
|
|
1580
|
+
clearInterval(timer4);
|
|
1581
|
+
timer4 = null;
|
|
1445
1582
|
}
|
|
1446
1583
|
currentStore = null;
|
|
1447
1584
|
}
|
|
@@ -1834,7 +1971,7 @@ function runUpgrade(spec) {
|
|
|
1834
1971
|
env: process.env,
|
|
1835
1972
|
stdio: ["ignore", "pipe", "pipe"]
|
|
1836
1973
|
});
|
|
1837
|
-
const
|
|
1974
|
+
const timer5 = setTimeout(() => {
|
|
1838
1975
|
child.kill();
|
|
1839
1976
|
resolve({ ok: false, log: `${out}
|
|
1840
1977
|
(timed out after 180s)` });
|
|
@@ -1842,19 +1979,19 @@ function runUpgrade(spec) {
|
|
|
1842
1979
|
child.stdout?.on("data", (d) => out += d.toString());
|
|
1843
1980
|
child.stderr?.on("data", (d) => out += d.toString());
|
|
1844
1981
|
child.on("error", (e) => {
|
|
1845
|
-
clearTimeout(
|
|
1982
|
+
clearTimeout(timer5);
|
|
1846
1983
|
resolve({ ok: false, log: `${out}
|
|
1847
1984
|
spawn error: ${String(e)}` });
|
|
1848
1985
|
});
|
|
1849
1986
|
child.on("exit", (code) => {
|
|
1850
|
-
clearTimeout(
|
|
1987
|
+
clearTimeout(timer5);
|
|
1851
1988
|
resolve({ ok: code === 0, log: out.trim() || `(exit ${code})` });
|
|
1852
1989
|
});
|
|
1853
1990
|
});
|
|
1854
1991
|
}
|
|
1855
1992
|
function dashboardHtml() {
|
|
1856
1993
|
try {
|
|
1857
|
-
return readFileSync3(
|
|
1994
|
+
return readFileSync3(join4(UI_DIST_DIR, "observability.html"), "utf8");
|
|
1858
1995
|
} catch {
|
|
1859
1996
|
return `<!doctype html><meta charset=utf-8><body style="font:14px system-ui;padding:24px;background:#0b0d10;color:#e8eaed">
|
|
1860
1997
|
<h2>MikroTik MCP \u2014 Observability Dashboard</h2>
|
|
@@ -1948,6 +2085,7 @@ function devicesPayload(store) {
|
|
|
1948
2085
|
jumpVia: dc.jumpVia,
|
|
1949
2086
|
jumpHost: dc.jumpHost ? { host: dc.jumpHost.host, port: dc.jumpHost.port } : undefined,
|
|
1950
2087
|
status: getDeviceStatus(name),
|
|
2088
|
+
geo: getDeviceGeo(name),
|
|
1951
2089
|
history: getDeviceHistory(name),
|
|
1952
2090
|
activity: activity.get(name) ?? {
|
|
1953
2091
|
calls: 0,
|
|
@@ -2733,7 +2871,7 @@ async function featureRoutes(req, url) {
|
|
|
2733
2871
|
const raw = b?.dir?.trim();
|
|
2734
2872
|
if (!raw)
|
|
2735
2873
|
return json3({ error: "dir required" }, 400);
|
|
2736
|
-
const dir = raw === "~" || raw.startsWith("~/") ?
|
|
2874
|
+
const dir = raw === "~" || raw.startsWith("~/") ? join4(homedir2(), raw.slice(1)) : raw;
|
|
2737
2875
|
const next = { ...getConfig(), backupDir: dir };
|
|
2738
2876
|
setConfig(next);
|
|
2739
2877
|
try {
|
|
@@ -2840,14 +2978,15 @@ async function runDashboard(cfg, transportLabel) {
|
|
|
2840
2978
|
transport: transportLabel
|
|
2841
2979
|
});
|
|
2842
2980
|
startHealthChecks(30000);
|
|
2981
|
+
startGeoLookups();
|
|
2843
2982
|
try {
|
|
2844
|
-
usageStore = await openUsageStore(
|
|
2983
|
+
usageStore = await openUsageStore(join4(dirname5(cfg.dbPath), "usage.db"));
|
|
2845
2984
|
startUsageSampler(usageStore);
|
|
2846
2985
|
} catch (e) {
|
|
2847
2986
|
logger.warn(`[${SERVER_TAG3}] usage history disabled: ${String(e)}`);
|
|
2848
2987
|
}
|
|
2849
2988
|
try {
|
|
2850
|
-
capsmanStore = await openCapsmanStore(
|
|
2989
|
+
capsmanStore = await openCapsmanStore(join4(dirname5(cfg.dbPath), "capsman.db"));
|
|
2851
2990
|
startCapsmanSampler(capsmanStore);
|
|
2852
2991
|
} catch (e) {
|
|
2853
2992
|
logger.warn(`[${SERVER_TAG3}] capsman trends disabled: ${String(e)}`);
|
|
@@ -2959,6 +3098,18 @@ async function runDashboard(cfg, transportLabel) {
|
|
|
2959
3098
|
devices: ps
|
|
2960
3099
|
});
|
|
2961
3100
|
}
|
|
3101
|
+
if (url.pathname.startsWith("/api/flag/")) {
|
|
3102
|
+
const code = url.pathname.slice("/api/flag/".length).replace(/\.svg$/, "");
|
|
3103
|
+
const svg = await flagSvg(code);
|
|
3104
|
+
if (!svg)
|
|
3105
|
+
return new Response("flag not found", { status: 404 });
|
|
3106
|
+
return new Response(svg, {
|
|
3107
|
+
headers: {
|
|
3108
|
+
"content-type": "image/svg+xml; charset=utf-8",
|
|
3109
|
+
"cache-control": "public, max-age=86400"
|
|
3110
|
+
}
|
|
3111
|
+
});
|
|
3112
|
+
}
|
|
2962
3113
|
if (url.pathname === "/api/devices") {
|
|
2963
3114
|
return json3(devicesPayload(db));
|
|
2964
3115
|
}
|
|
@@ -3169,6 +3320,7 @@ async function runDashboard(cfg, transportLabel) {
|
|
|
3169
3320
|
store,
|
|
3170
3321
|
stop() {
|
|
3171
3322
|
stopHealthChecks();
|
|
3323
|
+
stopGeoLookups();
|
|
3172
3324
|
stopUsageSampler();
|
|
3173
3325
|
stopCapsmanSampler();
|
|
3174
3326
|
server.stop(true);
|
|
@@ -3268,7 +3420,18 @@ change, use diff_config_snapshots (from=latest, to=live) to confirm exactly what
|
|
|
3268
3420
|
changed, and if something is wrong, get_config_snapshot returns the prior
|
|
3269
3421
|
\`/export\` text to restore from. Do NOT use create_backup/create_export for this
|
|
3270
3422
|
pre-change restore point \u2014 those write files to the device's flash; prefer the
|
|
3271
|
-
local snapshot to keep the device's disk clean
|
|
3423
|
+
local snapshot to keep the device's disk clean.
|
|
3424
|
+
|
|
3425
|
+
Local backup before high-risk edits \u2014 before CREATING A VPN TUNNEL, or before you
|
|
3426
|
+
start CHANGING ANY MANGLE OR FIREWALL FILTER RULE, ASK the user whether to create a
|
|
3427
|
+
restorable local backup first ("Create a local backup before this change?"). On
|
|
3428
|
+
yes, call create_local_backup for each device you will change (a host-side .rsc in
|
|
3429
|
+
the MCP vault \u2014 NOT on the device's flash \u2014 that you can restore_local_backup if the
|
|
3430
|
+
change cuts you off). These edits (tunnel interfaces/peers/routes, routing marks,
|
|
3431
|
+
filter rules) are the ones most likely to lock you out, which is why the restorable
|
|
3432
|
+
copy is worth it on top of the diff snapshot above. Skip the backup ONLY when the
|
|
3433
|
+
mangle/filter edit is minor and non-critical and the user declines \u2014 do not silently
|
|
3434
|
+
skip it, and never skip it for tunnel creation.`;
|
|
3272
3435
|
var MULTI_DEVICE_INSTRUCTIONS = `
|
|
3273
3436
|
|
|
3274
3437
|
Multiple devices are configured: {{names}} (default: {{default}}). Every tool
|
|
@@ -3359,18 +3522,18 @@ function installToolPagination(server, pageSize) {
|
|
|
3359
3522
|
const sdkHandler = low._requestHandlers?.get("tools/list");
|
|
3360
3523
|
if (typeof sdkHandler !== "function")
|
|
3361
3524
|
return;
|
|
3362
|
-
let
|
|
3525
|
+
let cache2 = null;
|
|
3363
3526
|
server.server.setRequestHandler(ListToolsRequestSchema, async (request, extra) => {
|
|
3364
|
-
if (!
|
|
3365
|
-
|
|
3366
|
-
const total =
|
|
3527
|
+
if (!cache2)
|
|
3528
|
+
cache2 = (await sdkHandler(request, extra)).tools ?? [];
|
|
3529
|
+
const total = cache2.length;
|
|
3367
3530
|
const cursor = request.params?.cursor;
|
|
3368
3531
|
let start = 0;
|
|
3369
3532
|
if (typeof cursor === "string") {
|
|
3370
3533
|
const n = Number.parseInt(cursor, 10);
|
|
3371
3534
|
start = Number.isFinite(n) && n > 0 ? Math.min(n, total) : 0;
|
|
3372
3535
|
}
|
|
3373
|
-
const tools =
|
|
3536
|
+
const tools = cache2.slice(start, start + pageSize);
|
|
3374
3537
|
const end = start + tools.length;
|
|
3375
3538
|
return end < total ? { tools, nextCursor: String(end) } : { tools };
|
|
3376
3539
|
});
|
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
selectToolModules,
|
|
30
30
|
setConfig,
|
|
31
31
|
updateSummaryLine
|
|
32
|
-
} from "./shared/library-
|
|
32
|
+
} from "./shared/library-2144zr9f.js";
|
|
33
33
|
// src/server.ts
|
|
34
34
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
35
35
|
import { ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
@@ -193,7 +193,18 @@ change, use diff_config_snapshots (from=latest, to=live) to confirm exactly what
|
|
|
193
193
|
changed, and if something is wrong, get_config_snapshot returns the prior
|
|
194
194
|
\`/export\` text to restore from. Do NOT use create_backup/create_export for this
|
|
195
195
|
pre-change restore point \u2014 those write files to the device's flash; prefer the
|
|
196
|
-
local snapshot to keep the device's disk clean
|
|
196
|
+
local snapshot to keep the device's disk clean.
|
|
197
|
+
|
|
198
|
+
Local backup before high-risk edits \u2014 before CREATING A VPN TUNNEL, or before you
|
|
199
|
+
start CHANGING ANY MANGLE OR FIREWALL FILTER RULE, ASK the user whether to create a
|
|
200
|
+
restorable local backup first ("Create a local backup before this change?"). On
|
|
201
|
+
yes, call create_local_backup for each device you will change (a host-side .rsc in
|
|
202
|
+
the MCP vault \u2014 NOT on the device's flash \u2014 that you can restore_local_backup if the
|
|
203
|
+
change cuts you off). These edits (tunnel interfaces/peers/routes, routing marks,
|
|
204
|
+
filter rules) are the ones most likely to lock you out, which is why the restorable
|
|
205
|
+
copy is worth it on top of the diff snapshot above. Skip the backup ONLY when the
|
|
206
|
+
mangle/filter edit is minor and non-critical and the user declines \u2014 do not silently
|
|
207
|
+
skip it, and never skip it for tunnel creation.`;
|
|
197
208
|
var MULTI_DEVICE_INSTRUCTIONS = `
|
|
198
209
|
|
|
199
210
|
Multiple devices are configured: {{names}} (default: {{default}}). Every tool
|
|
@@ -2538,7 +2538,7 @@ function deviceSelectorDescription(selectorNames, directory) {
|
|
|
2538
2538
|
if (directory && directory.length > 0) {
|
|
2539
2539
|
const rows = directory.map((d) => `\u2022 ${d.key}${d.label && d.label !== d.key ? ` ("${d.label}")` : ""} \u2192 ${d.target}${d.isDefault ? " [default]" : ""}`).join(`
|
|
2540
2540
|
`);
|
|
2541
|
-
return "Which configured MikroTik device to run this on. Pass the EXACT config key (or its label) " + "that matches the user's wording \u2014 these are different physical routers, so never substitute " +
|
|
2541
|
+
return "Which configured MikroTik device to run this on. Pass the EXACT config key (or its label) " + "that matches the user's wording \u2014 these are different physical routers in different places, " + "so never substitute one for another, and never swap in a different endpoint, country, or " + 'role than the user named (e.g. "Ali Home" is NOT "home"; a Netherlands VPS is NOT a Germany ' + "VPS). If the user's wording does not map to EXACTLY one row below, ask which device instead " + `of guessing. Devices known at startup:
|
|
2542
2542
|
` + `${rows}
|
|
2543
2543
|
` + "This list is a startup snapshot \u2014 devices can be added at runtime (e.g. from the dashboard), " + "so call list_mikrotik_devices for the authoritative current set if a name isn't listed here. " + "Omit only when the user did not name a device (uses the default).";
|
|
2544
2544
|
}
|
|
@@ -9070,7 +9070,7 @@ var cache = null;
|
|
|
9070
9070
|
async function gateway() {
|
|
9071
9071
|
if (cache)
|
|
9072
9072
|
return cache;
|
|
9073
|
-
const { moduleCatalog } = await import("./cli-
|
|
9073
|
+
const { moduleCatalog } = await import("./cli-p673815b.js");
|
|
9074
9074
|
const forIndex = [];
|
|
9075
9075
|
const byName = new Map;
|
|
9076
9076
|
for (const mod of moduleCatalog) {
|
|
@@ -33346,4 +33346,4 @@ function selectToolModules(filter = {}, catalog = moduleCatalog) {
|
|
|
33346
33346
|
}).map((m) => m.tools);
|
|
33347
33347
|
}
|
|
33348
33348
|
|
|
33349
|
-
export { __require, DEFAULT_SNAPSHOT_DB, DEFAULT_CONFIG_HISTORY_DIR, DeviceConfigSchema, ToolFilterSchema, MikrotikConfigSchema, getConfigSource, loadConfig, logger, setConfig, getConfig, listDevices, deviceLabels, resolveDeviceName, deviceDirectory, isMacTelnetDevice, createDeviceClient, describeTransport, isPoolEnabled, closeAll, closeDevice, poolStatus, getMemoryStore, closeMemoryStore, reopenMemoryStore, executeMikrotikCommand, createContext, Cmd, isEmpty, looksLikeError, commandUnsupported, parseKeyValues, parseRouterosDate, parseSize, parseSystemResource, parseRecords, parseLeadingNumber, parseDisks, riskOf, REDACTED, redact, configureRecorder, getEventStore, subscribe, subscriberCount, registerTools, fetchDevices, sampleDeviceTraffic, sampleAllTraffic, setDeviceLimits, blockDevice, allowDevice, makeDeviceStatic, setDeviceIp, setDeviceLabel, removeDeviceLease, devicesView, PROMPTS_DIR, UI_DIST_DIR, registerUiResources, backupDir, listBackups, readBackup, writeBackup, deleteBackup, renameBackup, createLocalBackup, restoreLocalBackup, isS3Configured, getS3Client, presignExpiresIn, s3Target, splitCommands, buildChangePlan, renderPlan, diffLines, normalizeExport, analyzeDrift, attributeChanges, openSnapshotStore, applyWritesSafely, captureSnapshot, DEFAULT_TZSP_PORT, capture2 as capture, AAA_ENTITIES, listAaaEntity, addAaaEntity, updateAaaEntity, removeAaaEntity, toggleAaaEntity, getRadiusIncoming, setRadiusIncoming, resetRadiusCounters, getUmSettings, setUmSettings, VERSION, WEBSITE_URL, LOGO_URL, SERVER_TITLE, SERVER_DESCRIPTION, SERVER_NAME, PKG_META, loadFileCacheSync, fetchLatestRelease, checkForUpdate, updateSummaryLine, fetchAllReleases, buildChannelPlanCommands, reportWeakClients, runCapsmanAudit, steerAlreadyPresent, buildSteerCommands, loadBalancePlan, buildLoadBalanceCommands, buildFtCommands, buildHaCommands, haGuidance, capsmanOverview, fetchCapsmanState, moduleCatalog, allToolModules, ALWAYS_ON_MODULES, selectToolModules };
|
|
33349
|
+
export { __require, DEFAULT_SNAPSHOT_DB, DEFAULT_CONFIG_HISTORY_DIR, DeviceConfigSchema, ToolFilterSchema, MikrotikConfigSchema, getConfigSource, loadConfig, logger, setConfig, getConfig, listDevices, deviceLabels, resolveDeviceName, deviceDirectory, isMacTelnetDevice, createDeviceClient, describeTransport, isPoolEnabled, closeAll, closeDevice, poolStatus, getMemoryStore, closeMemoryStore, reopenMemoryStore, executeMikrotikCommand, createContext, Cmd, isEmpty, looksLikeError, commandUnsupported, parseKeyValues, parseRouterosDate, parseSize, parseSystemResource, parseRecords, parseLeadingNumber, parseDisks, riskOf, REDACTED, redact, configureRecorder, getEventStore, subscribe, subscriberCount, registerTools, fetchDevices, sampleDeviceTraffic, sampleAllTraffic, setDeviceLimits, blockDevice, allowDevice, makeDeviceStatic, setDeviceIp, setDeviceLabel, removeDeviceLease, devicesView, PROMPTS_DIR, PROJECT_ROOT, UI_DIST_DIR, registerUiResources, backupDir, listBackups, readBackup, writeBackup, deleteBackup, renameBackup, createLocalBackup, restoreLocalBackup, isS3Configured, getS3Client, presignExpiresIn, s3Target, splitCommands, buildChangePlan, renderPlan, diffLines, normalizeExport, analyzeDrift, attributeChanges, openSnapshotStore, applyWritesSafely, captureSnapshot, DEFAULT_TZSP_PORT, capture2 as capture, AAA_ENTITIES, listAaaEntity, addAaaEntity, updateAaaEntity, removeAaaEntity, toggleAaaEntity, getRadiusIncoming, setRadiusIncoming, resetRadiusCounters, getUmSettings, setUmSettings, VERSION, WEBSITE_URL, LOGO_URL, SERVER_TITLE, SERVER_DESCRIPTION, SERVER_NAME, PKG_META, loadFileCacheSync, fetchLatestRelease, checkForUpdate, updateSummaryLine, fetchAllReleases, buildChannelPlanCommands, reportWeakClients, runCapsmanAudit, steerAlreadyPresent, buildSteerCommands, loadBalancePlan, buildLoadBalanceCommands, buildFtCommands, buildHaCommands, haGuidance, capsmanOverview, fetchCapsmanState, moduleCatalog, allToolModules, ALWAYS_ON_MODULES, selectToolModules };
|
|
@@ -2460,7 +2460,7 @@ function deviceSelectorDescription(selectorNames, directory) {
|
|
|
2460
2460
|
if (directory && directory.length > 0) {
|
|
2461
2461
|
const rows = directory.map((d) => `\u2022 ${d.key}${d.label && d.label !== d.key ? ` ("${d.label}")` : ""} \u2192 ${d.target}${d.isDefault ? " [default]" : ""}`).join(`
|
|
2462
2462
|
`);
|
|
2463
|
-
return "Which configured MikroTik device to run this on. Pass the EXACT config key (or its label) " + "that matches the user's wording \u2014 these are different physical routers, so never substitute " +
|
|
2463
|
+
return "Which configured MikroTik device to run this on. Pass the EXACT config key (or its label) " + "that matches the user's wording \u2014 these are different physical routers in different places, " + "so never substitute one for another, and never swap in a different endpoint, country, or " + 'role than the user named (e.g. "Ali Home" is NOT "home"; a Netherlands VPS is NOT a Germany ' + "VPS). If the user's wording does not map to EXACTLY one row below, ask which device instead " + `of guessing. Devices known at startup:
|
|
2464
2464
|
` + `${rows}
|
|
2465
2465
|
` + "This list is a startup snapshot \u2014 devices can be added at runtime (e.g. from the dashboard), " + "so call list_mikrotik_devices for the authoritative current set if a name isn't listed here. " + "Omit only when the user did not name a device (uses the default).";
|
|
2466
2466
|
}
|
|
@@ -8849,7 +8849,7 @@ var cache = null;
|
|
|
8849
8849
|
async function gateway() {
|
|
8850
8850
|
if (cache)
|
|
8851
8851
|
return cache;
|
|
8852
|
-
const { moduleCatalog } = await import("./library-
|
|
8852
|
+
const { moduleCatalog } = await import("./library-8f4pbp0x.js");
|
|
8853
8853
|
const forIndex = [];
|
|
8854
8854
|
const byName = new Map;
|
|
8855
8855
|
for (const mod of moduleCatalog) {
|