@usex/mikrotik-mcp 4.22.0 → 4.24.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/README.md +292 -283
- package/dist/cli.js +54 -24
- package/dist/index.js +13 -2
- package/dist/shared/{cli-8ecncq7y.js → cli-10wtq3xb.js} +5 -5
- package/dist/shared/{cli-73c3hn9f.js → cli-ps0h2mxx.js} +1 -1
- package/dist/shared/{library-v21pwa2g.js → library-2f8ty72a.js} +5 -5
- package/dist/shared/{library-w7gzvedz.js → library-phwm9kqe.js} +1 -1
- package/dist/ui/aaa.html +1 -1
- package/dist/ui/connected-devices.html +1 -1
- package/dist/ui/dashboard.html +1 -1
- package/dist/ui/firewall-audit.html +1 -1
- package/dist/ui/firewall.html +1 -1
- package/dist/ui/interfaces.html +1 -1
- package/dist/ui/observability.html +56 -56
- package/dist/ui/records.html +1 -1
- package/package.json +14 -14
- 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
|
@@ -125,7 +125,7 @@ import {
|
|
|
125
125
|
updateAaaEntity,
|
|
126
126
|
updateSummaryLine,
|
|
127
127
|
writeBackup
|
|
128
|
-
} from "./shared/cli-
|
|
128
|
+
} from "./shared/cli-10wtq3xb.js";
|
|
129
129
|
|
|
130
130
|
// src/cli.ts
|
|
131
131
|
import { existsSync as existsSync2 } from "fs";
|
|
@@ -133,7 +133,7 @@ import { existsSync as existsSync2 } from "fs";
|
|
|
133
133
|
// src/observability/dashboard.ts
|
|
134
134
|
import { spawn } from "child_process";
|
|
135
135
|
import { readFileSync as readFileSync3 } from "fs";
|
|
136
|
-
import { homedir as
|
|
136
|
+
import { homedir as homedir3, networkInterfaces } from "os";
|
|
137
137
|
import { dirname as dirname5, join as join4 } from "path";
|
|
138
138
|
var {serve } = globalThis.Bun;
|
|
139
139
|
import { z as z2 } from "zod";
|
|
@@ -1676,6 +1676,27 @@ function computeStats(events, opts) {
|
|
|
1676
1676
|
};
|
|
1677
1677
|
}
|
|
1678
1678
|
|
|
1679
|
+
// src/observability/http-error.ts
|
|
1680
|
+
import { homedir as homedir2 } from "os";
|
|
1681
|
+
var HOME = homedir2();
|
|
1682
|
+
var MAX_LEN = 300;
|
|
1683
|
+
function sanitizeMessage(raw, home, fallback) {
|
|
1684
|
+
const line = raw.split(`
|
|
1685
|
+
`, 1)[0].trim();
|
|
1686
|
+
const masked = home.length > 1 ? line.split(home).join("~") : line;
|
|
1687
|
+
if (!masked)
|
|
1688
|
+
return fallback;
|
|
1689
|
+
return masked.length > MAX_LEN ? `${masked.slice(0, MAX_LEN)}\u2026` : masked;
|
|
1690
|
+
}
|
|
1691
|
+
function clientError(e, fallback = "unknown error") {
|
|
1692
|
+
return sanitizeMessage(e instanceof Error ? e.message : String(e), HOME, fallback);
|
|
1693
|
+
}
|
|
1694
|
+
function logError(e) {
|
|
1695
|
+
if (e instanceof Error)
|
|
1696
|
+
return e.stack ?? e.message;
|
|
1697
|
+
return String(e);
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1679
1700
|
// src/observability/drift-routes.ts
|
|
1680
1701
|
var storePromise = null;
|
|
1681
1702
|
function getStore() {
|
|
@@ -1810,7 +1831,7 @@ async function driftRoutes(req, url) {
|
|
|
1810
1831
|
} catch {}
|
|
1811
1832
|
return json(report);
|
|
1812
1833
|
} catch (e) {
|
|
1813
|
-
return json({ error:
|
|
1834
|
+
return json({ error: clientError(e) }, 502);
|
|
1814
1835
|
}
|
|
1815
1836
|
}
|
|
1816
1837
|
return null;
|
|
@@ -1958,7 +1979,7 @@ function restartProcess() {
|
|
|
1958
1979
|
ok = true;
|
|
1959
1980
|
logger.warn("Dashboard requested a restart \u2014 relaunched a fresh server process; this one is exiting.");
|
|
1960
1981
|
} catch (e) {
|
|
1961
|
-
logger.error(`Restart relaunch failed: ${
|
|
1982
|
+
logger.error(`Restart relaunch failed: ${logError(e)}. Exiting anyway.`);
|
|
1962
1983
|
}
|
|
1963
1984
|
setTimeout(() => process.exit(0), 500);
|
|
1964
1985
|
return ok;
|
|
@@ -2305,9 +2326,8 @@ async function configRoutes(req, url, admin) {
|
|
|
2305
2326
|
logger.info(`Config reloaded from source \u2014 ${devices.length} device(s): ${devices.join(", ")}`);
|
|
2306
2327
|
return json3({ ok: true, mode: "config", count: devices.length, devices });
|
|
2307
2328
|
} catch (e) {
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
return json3({ ok: false, error }, 500);
|
|
2329
|
+
logger.error(`Config reload failed: ${logError(e)}`);
|
|
2330
|
+
return json3({ ok: false, error: clientError(e) }, 500);
|
|
2311
2331
|
}
|
|
2312
2332
|
}
|
|
2313
2333
|
if (p === "/api/config/history" && req.method === "GET") {
|
|
@@ -2424,7 +2444,7 @@ async function modulesRoutes(req, url) {
|
|
|
2424
2444
|
atomicWrite(getConfigSource().path, serializeConfig(next));
|
|
2425
2445
|
} catch (e) {
|
|
2426
2446
|
persisted = false;
|
|
2427
|
-
warning = `applied live but not saved to disk: ${
|
|
2447
|
+
warning = `applied live but not saved to disk: ${clientError(e)}`;
|
|
2428
2448
|
}
|
|
2429
2449
|
if (persisted) {
|
|
2430
2450
|
recordVersion(getConfig(), "auto", Date.now(), `module ${b.enabled ? "enabled" : "disabled"}: ${mod.slug}`);
|
|
@@ -2455,7 +2475,7 @@ async function modulesRoutes(req, url) {
|
|
|
2455
2475
|
atomicWrite(getConfigSource().path, serializeConfig(next));
|
|
2456
2476
|
} catch (e) {
|
|
2457
2477
|
persisted = false;
|
|
2458
|
-
warning = `applied live but not saved to disk: ${
|
|
2478
|
+
warning = `applied live but not saved to disk: ${clientError(e)}`;
|
|
2459
2479
|
}
|
|
2460
2480
|
if (persisted) {
|
|
2461
2481
|
recordVersion(getConfig(), "auto", Date.now(), `app views ${b.enabled ? "enabled" : "disabled"}`);
|
|
@@ -2827,7 +2847,7 @@ async function featureRoutes(req, url) {
|
|
|
2827
2847
|
}));
|
|
2828
2848
|
return json3({ configured: true, target: s3Target(), objects, truncated: !!res.isTruncated });
|
|
2829
2849
|
} catch (e) {
|
|
2830
|
-
return json3({ error:
|
|
2850
|
+
return json3({ error: clientError(e) }, 502);
|
|
2831
2851
|
}
|
|
2832
2852
|
}
|
|
2833
2853
|
if (p === "/api/s3/presign" && req.method === "GET") {
|
|
@@ -2840,7 +2860,7 @@ async function featureRoutes(req, url) {
|
|
|
2840
2860
|
const link = getS3Client().presign(key, { expiresIn: presignExpiresIn(), method: "GET" });
|
|
2841
2861
|
return json3({ url: link });
|
|
2842
2862
|
} catch (e) {
|
|
2843
|
-
return json3({ error:
|
|
2863
|
+
return json3({ error: clientError(e) }, 502);
|
|
2844
2864
|
}
|
|
2845
2865
|
}
|
|
2846
2866
|
if (p === "/api/s3/delete" && req.method === "POST") {
|
|
@@ -2856,7 +2876,7 @@ async function featureRoutes(req, url) {
|
|
|
2856
2876
|
await client.delete(b.key);
|
|
2857
2877
|
return json3({ ok: true, key: b.key });
|
|
2858
2878
|
} catch (e) {
|
|
2859
|
-
return json3({ error:
|
|
2879
|
+
return json3({ error: clientError(e) }, 502);
|
|
2860
2880
|
}
|
|
2861
2881
|
}
|
|
2862
2882
|
if (p === "/api/backups" && req.method === "GET") {
|
|
@@ -2871,7 +2891,7 @@ async function featureRoutes(req, url) {
|
|
|
2871
2891
|
const raw = b?.dir?.trim();
|
|
2872
2892
|
if (!raw)
|
|
2873
2893
|
return json3({ error: "dir required" }, 400);
|
|
2874
|
-
const dir = raw === "~" || raw.startsWith("~/") ? join4(
|
|
2894
|
+
const dir = raw === "~" || raw.startsWith("~/") ? join4(homedir3(), raw.slice(1)) : raw;
|
|
2875
2895
|
const next = { ...getConfig(), backupDir: dir };
|
|
2876
2896
|
setConfig(next);
|
|
2877
2897
|
try {
|
|
@@ -2881,7 +2901,7 @@ async function featureRoutes(req, url) {
|
|
|
2881
2901
|
ok: true,
|
|
2882
2902
|
dir: backupDir(),
|
|
2883
2903
|
persisted: false,
|
|
2884
|
-
warning: `applied live but not saved: ${
|
|
2904
|
+
warning: `applied live but not saved: ${clientError(e)}`
|
|
2885
2905
|
});
|
|
2886
2906
|
}
|
|
2887
2907
|
recordVersion(getConfig(), "auto", Date.now(), "backup path changed");
|
|
@@ -2921,7 +2941,7 @@ async function featureRoutes(req, url) {
|
|
|
2921
2941
|
const safe = b.name.endsWith(".rsc") ? b.name : `${b.name}.rsc`;
|
|
2922
2942
|
return json3({ ok: true, name: writeBackup(safe, b.content) });
|
|
2923
2943
|
} catch (e) {
|
|
2924
|
-
return json3({ error:
|
|
2944
|
+
return json3({ error: clientError(e) }, 400);
|
|
2925
2945
|
}
|
|
2926
2946
|
}
|
|
2927
2947
|
if (p === "/api/backups/rename" && req.method === "POST") {
|
|
@@ -2931,7 +2951,7 @@ async function featureRoutes(req, url) {
|
|
|
2931
2951
|
try {
|
|
2932
2952
|
return json3({ ok: true, name: renameBackup(b.name, b.new_name) });
|
|
2933
2953
|
} catch (e) {
|
|
2934
|
-
return json3({ error:
|
|
2954
|
+
return json3({ error: clientError(e) }, 400);
|
|
2935
2955
|
}
|
|
2936
2956
|
}
|
|
2937
2957
|
if (p === "/api/backups/delete" && req.method === "POST") {
|
|
@@ -2941,7 +2961,7 @@ async function featureRoutes(req, url) {
|
|
|
2941
2961
|
try {
|
|
2942
2962
|
return deleteBackup(b.name) ? json3({ ok: true }) : json3({ error: "not found" }, 404);
|
|
2943
2963
|
} catch (e) {
|
|
2944
|
-
return json3({ error:
|
|
2964
|
+
return json3({ error: clientError(e) }, 400);
|
|
2945
2965
|
}
|
|
2946
2966
|
}
|
|
2947
2967
|
if (p === "/api/backups/restore" && req.method === "POST") {
|
|
@@ -3136,7 +3156,7 @@ async function runDashboard(cfg, transportLabel) {
|
|
|
3136
3156
|
atomicWrite(getConfigSource().path, serializeConfig(next));
|
|
3137
3157
|
} catch (e) {
|
|
3138
3158
|
persisted = false;
|
|
3139
|
-
warning = `applied live but not saved to disk: ${
|
|
3159
|
+
warning = `applied live but not saved to disk: ${clientError(e)}`;
|
|
3140
3160
|
}
|
|
3141
3161
|
if (persisted) {
|
|
3142
3162
|
recordVersion(getConfig(), "auto", Date.now(), `device ${b.disabled ? "disabled" : "enabled"}: ${b.device}`);
|
|
@@ -3175,7 +3195,7 @@ async function runDashboard(cfg, transportLabel) {
|
|
|
3175
3195
|
try {
|
|
3176
3196
|
return json3(await fetchLatestRelease());
|
|
3177
3197
|
} catch (e) {
|
|
3178
|
-
return json3({ error: e
|
|
3198
|
+
return json3({ error: clientError(e, "fetch failed") }, 502);
|
|
3179
3199
|
}
|
|
3180
3200
|
}
|
|
3181
3201
|
if (url.pathname === "/api/catalog" && req.method === "GET") {
|
|
@@ -3211,7 +3231,7 @@ async function runDashboard(cfg, transportLabel) {
|
|
|
3211
3231
|
try {
|
|
3212
3232
|
return json3(await fetchAllReleases());
|
|
3213
3233
|
} catch (e) {
|
|
3214
|
-
return json3({ error: e
|
|
3234
|
+
return json3({ error: clientError(e, "fetch failed") }, 502);
|
|
3215
3235
|
}
|
|
3216
3236
|
}
|
|
3217
3237
|
if (url.pathname === "/api/upgrade" && req.method === "POST") {
|
|
@@ -3278,9 +3298,8 @@ async function runDashboard(cfg, transportLabel) {
|
|
|
3278
3298
|
try {
|
|
3279
3299
|
return await dashboardRoute(req, url, srv, configAdmin, transportLabel);
|
|
3280
3300
|
} catch (e) {
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
return json3({ error: msg }, 502);
|
|
3301
|
+
logger.error(`Dashboard request failed (${url.pathname}): ${logError(e)}`);
|
|
3302
|
+
return json3({ error: clientError(e) }, 502);
|
|
3284
3303
|
}
|
|
3285
3304
|
},
|
|
3286
3305
|
websocket: {
|
|
@@ -3420,7 +3439,18 @@ change, use diff_config_snapshots (from=latest, to=live) to confirm exactly what
|
|
|
3420
3439
|
changed, and if something is wrong, get_config_snapshot returns the prior
|
|
3421
3440
|
\`/export\` text to restore from. Do NOT use create_backup/create_export for this
|
|
3422
3441
|
pre-change restore point \u2014 those write files to the device's flash; prefer the
|
|
3423
|
-
local snapshot to keep the device's disk clean
|
|
3442
|
+
local snapshot to keep the device's disk clean.
|
|
3443
|
+
|
|
3444
|
+
Local backup before high-risk edits \u2014 before CREATING A VPN TUNNEL, or before you
|
|
3445
|
+
start CHANGING ANY MANGLE OR FIREWALL FILTER RULE, ASK the user whether to create a
|
|
3446
|
+
restorable local backup first ("Create a local backup before this change?"). On
|
|
3447
|
+
yes, call create_local_backup for each device you will change (a host-side .rsc in
|
|
3448
|
+
the MCP vault \u2014 NOT on the device's flash \u2014 that you can restore_local_backup if the
|
|
3449
|
+
change cuts you off). These edits (tunnel interfaces/peers/routes, routing marks,
|
|
3450
|
+
filter rules) are the ones most likely to lock you out, which is why the restorable
|
|
3451
|
+
copy is worth it on top of the diff snapshot above. Skip the backup ONLY when the
|
|
3452
|
+
mangle/filter edit is minor and non-critical and the user declines \u2014 do not silently
|
|
3453
|
+
skip it, and never skip it for tunnel creation.`;
|
|
3424
3454
|
var MULTI_DEVICE_INSTRUCTIONS = `
|
|
3425
3455
|
|
|
3426
3456
|
Multiple devices are configured: {{names}} (default: {{default}}). Every tool
|
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-2f8ty72a.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
|
}
|
|
@@ -3810,7 +3810,7 @@ async function deviceDateStamp(ctx) {
|
|
|
3810
3810
|
|
|
3811
3811
|
// src/core/slug.ts
|
|
3812
3812
|
function deviceSlug(name) {
|
|
3813
|
-
const s = (name ?? "").replace(/[^A-Za-z0-9-]+/g, "-").replace(
|
|
3813
|
+
const s = (name ?? "").replace(/[^A-Za-z0-9-]+/g, "-").replace(/^-+|(?<!-)-+$/g, "");
|
|
3814
3814
|
return s || "device";
|
|
3815
3815
|
}
|
|
3816
3816
|
|
|
@@ -4375,7 +4375,7 @@ function getS3Client() {
|
|
|
4375
4375
|
return new S3Client(opts);
|
|
4376
4376
|
}
|
|
4377
4377
|
function trimSlashes(s) {
|
|
4378
|
-
return s.replace(
|
|
4378
|
+
return s.replace(/^\/+|(?<!\/)\/+$/g, "");
|
|
4379
4379
|
}
|
|
4380
4380
|
function s3DevicePrefix(device) {
|
|
4381
4381
|
const segments = [getS3Config()?.prefix ?? "", device ? deviceSlug(device) : ""].map(trimSlashes).filter(Boolean);
|
|
@@ -8196,7 +8196,7 @@ function num(s) {
|
|
|
8196
8196
|
function orMatch(field, values, op = "~") {
|
|
8197
8197
|
if (values.length === 0)
|
|
8198
8198
|
return "";
|
|
8199
|
-
const terms = values.map((v) => `${field}${op}"${v.replace(/"/g, "
|
|
8199
|
+
const terms = values.map((v) => `${field}${op}"${v.replace(/[\\"]/g, "\\$&")}"`);
|
|
8200
8200
|
return `(${terms.join(" or ")})`;
|
|
8201
8201
|
}
|
|
8202
8202
|
// src/utils/redact-secrets.ts
|
|
@@ -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-ps0h2mxx.js");
|
|
9074
9074
|
const forIndex = [];
|
|
9075
9075
|
const byName = new Map;
|
|
9076
9076
|
for (const mod of moduleCatalog) {
|
|
@@ -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
|
}
|
|
@@ -3589,7 +3589,7 @@ async function deviceDateStamp(ctx) {
|
|
|
3589
3589
|
|
|
3590
3590
|
// src/core/slug.ts
|
|
3591
3591
|
function deviceSlug(name) {
|
|
3592
|
-
const s = (name ?? "").replace(/[^A-Za-z0-9-]+/g, "-").replace(
|
|
3592
|
+
const s = (name ?? "").replace(/[^A-Za-z0-9-]+/g, "-").replace(/^-+|(?<!-)-+$/g, "");
|
|
3593
3593
|
return s || "device";
|
|
3594
3594
|
}
|
|
3595
3595
|
|
|
@@ -4154,7 +4154,7 @@ function getS3Client() {
|
|
|
4154
4154
|
return new S3Client(opts);
|
|
4155
4155
|
}
|
|
4156
4156
|
function trimSlashes(s) {
|
|
4157
|
-
return s.replace(
|
|
4157
|
+
return s.replace(/^\/+|(?<!\/)\/+$/g, "");
|
|
4158
4158
|
}
|
|
4159
4159
|
function s3DevicePrefix(device) {
|
|
4160
4160
|
const segments = [getS3Config()?.prefix ?? "", device ? deviceSlug(device) : ""].map(trimSlashes).filter(Boolean);
|
|
@@ -7975,7 +7975,7 @@ function num(s) {
|
|
|
7975
7975
|
function orMatch(field, values, op = "~") {
|
|
7976
7976
|
if (values.length === 0)
|
|
7977
7977
|
return "";
|
|
7978
|
-
const terms = values.map((v) => `${field}${op}"${v.replace(/"/g, "
|
|
7978
|
+
const terms = values.map((v) => `${field}${op}"${v.replace(/[\\"]/g, "\\$&")}"`);
|
|
7979
7979
|
return `(${terms.join(" or ")})`;
|
|
7980
7980
|
}
|
|
7981
7981
|
// src/utils/redact-secrets.ts
|
|
@@ -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-phwm9kqe.js");
|
|
8853
8853
|
const forIndex = [];
|
|
8854
8854
|
const byName = new Map;
|
|
8855
8855
|
for (const mod of moduleCatalog) {
|
package/dist/ui/aaa.html
CHANGED
|
@@ -99,7 +99,7 @@ Maps to Permission Policy \`microphone\` feature.`),geolocation:I({}).optional()
|
|
|
99
99
|
|
|
100
100
|
Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:I({}).optional().describe(`Request clipboard write access.
|
|
101
101
|
|
|
102
|
-
Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var Sv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Cv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),wv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),Tv=I({fonts:j().optional()}),Ev=I({variables:gv.optional().describe(`CSS variables for theming the app.`),css:Tv.optional().describe(`CSS blocks that apps can inject.`)}),Dv=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Ov=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var kv=I({experimental:
|
|
102
|
+
Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var Sv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Cv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),wv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),Tv=I({fonts:j().optional()}),Ev=I({variables:gv.optional().describe(`CSS variables for theming the app.`),css:Tv.optional().describe(`CSS blocks that apps can inject.`)}),Dv=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Ov=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var kv=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:xv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:bv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Ov.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Ov.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Av=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(hv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:bv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:xv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
|
|
103
103
|
|
|
104
104
|
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
105
105
|
|
|
@@ -99,7 +99,7 @@ Maps to Permission Policy \`microphone\` feature.`),geolocation:I({}).optional()
|
|
|
99
99
|
|
|
100
100
|
Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:I({}).optional().describe(`Request clipboard write access.
|
|
101
101
|
|
|
102
|
-
Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:
|
|
102
|
+
Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:bv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:yv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Dv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Dv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),kv=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(mv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:yv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:bv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
|
|
103
103
|
|
|
104
104
|
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
105
105
|
|
package/dist/ui/dashboard.html
CHANGED
|
@@ -99,7 +99,7 @@ Maps to Permission Policy \`microphone\` feature.`),geolocation:I({}).optional()
|
|
|
99
99
|
|
|
100
100
|
Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:I({}).optional().describe(`Request clipboard write access.
|
|
101
101
|
|
|
102
|
-
Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:
|
|
102
|
+
Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:bv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:yv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Dv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Dv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),kv=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(mv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:yv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:bv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
|
|
103
103
|
|
|
104
104
|
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
105
105
|
|
|
@@ -99,7 +99,7 @@ Maps to Permission Policy \`microphone\` feature.`),geolocation:I({}).optional()
|
|
|
99
99
|
|
|
100
100
|
Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:I({}).optional().describe(`Request clipboard write access.
|
|
101
101
|
|
|
102
|
-
Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:
|
|
102
|
+
Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:bv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:yv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Dv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Dv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),kv=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(mv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:yv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:bv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
|
|
103
103
|
|
|
104
104
|
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
105
105
|
|
package/dist/ui/firewall.html
CHANGED
|
@@ -99,7 +99,7 @@ Maps to Permission Policy \`microphone\` feature.`),geolocation:I({}).optional()
|
|
|
99
99
|
|
|
100
100
|
Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:I({}).optional().describe(`Request clipboard write access.
|
|
101
101
|
|
|
102
|
-
Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:
|
|
102
|
+
Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:bv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:yv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Dv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Dv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),kv=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(mv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:yv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:bv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
|
|
103
103
|
|
|
104
104
|
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
105
105
|
|
package/dist/ui/interfaces.html
CHANGED
|
@@ -99,7 +99,7 @@ Maps to Permission Policy \`microphone\` feature.`),geolocation:I({}).optional()
|
|
|
99
99
|
|
|
100
100
|
Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:I({}).optional().describe(`Request clipboard write access.
|
|
101
101
|
|
|
102
|
-
Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:
|
|
102
|
+
Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var xv=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Sv=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Cv=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),wv=I({fonts:j().optional()}),Tv=I({variables:hv.optional().describe(`CSS variables for theming the app.`),css:wv.optional().describe(`CSS blocks that apps can inject.`)}),Ev=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var Dv=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var Ov=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:bv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:yv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Dv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Dv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),kv=I({experimental:z(j(),z(j(),qf()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(mv).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:yv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:bv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
|
|
103
103
|
|
|
104
104
|
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
105
105
|
|