@usex/mikrotik-mcp 6.8.0 → 6.10.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.
Files changed (31) hide show
  1. package/README.md +2 -0
  2. package/dist/cli.js +630 -25
  3. package/dist/index.js +1 -1
  4. package/dist/shared/{cli-ksq2qr7d.js → cli-0srgjr3v.js} +1 -1
  5. package/dist/shared/{cli-mh3kf1gx.js → cli-81s63cts.js} +124 -33
  6. package/dist/shared/{cli-qszw8tv2.js → cli-b4kkd56k.js} +1 -1
  7. package/dist/shared/{cli-pan4hpjf.js → cli-chcn79z7.js} +1 -1
  8. package/dist/shared/{cli-4a4dxv04.js → cli-twafzgn3.js} +1 -1
  9. package/dist/shared/{library-r8m6ftrj.js → library-2kk6k7zh.js} +1 -1
  10. package/dist/shared/{library-g8fvds7b.js → library-f89nvhan.js} +1 -1
  11. package/dist/shared/{library-5ejy1n1c.js → library-sxxt02xq.js} +1 -1
  12. package/dist/shared/{library-qwkp17zf.js → library-thv5s4bs.js} +112 -21
  13. package/dist/shared/{library-qdh9kmg5.js → library-x66xvb3s.js} +1 -1
  14. package/dist/ui/observability.html +78 -86
  15. package/package.json +8 -8
  16. package/schemas/README.md +1 -1
  17. package/schemas/devtools-manifest.json +23 -1
  18. package/schemas/tool-catalog.json +148 -5
  19. package/schemas/tools/add_bridge_port.json +4 -0
  20. package/schemas/tools/add_dot1x_server.json +4 -0
  21. package/schemas/tools/add_wireguard_peer.json +6 -0
  22. package/schemas/tools/create_bridge.json +21 -0
  23. package/schemas/tools/create_dhcp_server.json +4 -0
  24. package/schemas/tools/create_ipv6_dhcp_server.json +8 -0
  25. package/schemas/tools/create_vlan_interface.json +4 -0
  26. package/schemas/tools/list_bgp_instances.json +7 -0
  27. package/schemas/tools/update_bgp_instance_med_comparison.json +22 -0
  28. package/schemas/tools/update_bridge.json +21 -0
  29. package/schemas/tools/update_dot1x_server.json +4 -0
  30. package/schemas/tools/update_vlan_interface.json +4 -0
  31. package/schemas/tools/update_wireguard_peer.json +17 -3
package/dist/index.js CHANGED
@@ -70,7 +70,7 @@ import {
70
70
  updateSummaryLine,
71
71
  allToolModules2,
72
72
  selectToolModules2
73
- } from "./shared/library-qwkp17zf.js";
73
+ } from "./shared/library-thv5s4bs.js";
74
74
 
75
75
  // node_modules/ajv/dist/compile/codegen/code.js
76
76
  var require_code = __commonJS(function(exports) {
@@ -4,7 +4,7 @@ import {
4
4
  allToolModules2,
5
5
  ALWAYS_ON_MODULES2,
6
6
  selectToolModules2
7
- } from "./cli-mh3kf1gx.js";
7
+ } from "./cli-81s63cts.js";
8
8
  export {
9
9
  ALWAYS_ON_MODULES2 as ALWAYS_ON_MODULES,
10
10
  allToolModules2 as allToolModules,
@@ -78,7 +78,7 @@ __export(exports_regexes, {
78
78
  idnEmail: () => idnEmail,
79
79
  integer: () => integer,
80
80
  ipv4: () => ipv4,
81
- ipv6: () => ipv6,
81
+ ipv6: () => ipv62,
82
82
  ksuid: () => ksuid,
83
83
  lowercase: () => lowercase,
84
84
  mac: () => mac,
@@ -238,7 +238,7 @@ __export(exports_schemas2, {
238
238
  intersection: () => intersection,
239
239
  invertCodec: () => invertCodec,
240
240
  ipv4: () => ipv42,
241
- ipv6: () => ipv62,
241
+ ipv6: () => ipv63,
242
242
  json: () => json,
243
243
  jwt: () => jwt,
244
244
  keyof: () => keyof,
@@ -1369,7 +1369,7 @@ function emoji() {
1369
1369
  return new RegExp(_emoji, "u");
1370
1370
  }
1371
1371
  var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
1372
- var ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
1372
+ var ipv62 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
1373
1373
  var mac = (delimiter) => {
1374
1374
  const escapedDelim = escapeRegex(delimiter ?? ":");
1375
1375
  return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
@@ -2313,7 +2313,7 @@ function isValidIPv6(value) {
2313
2313
  return canParseURL(`http://[${value}]`);
2314
2314
  }
2315
2315
  var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
2316
- def.pattern ?? (def.pattern = ipv6);
2316
+ def.pattern ?? (def.pattern = ipv62);
2317
2317
  $ZodStringFormat.init(inst, def);
2318
2318
  inst._zod.check = (payload) => {
2319
2319
  if (!isValidIPv6(payload.value)) {
@@ -7400,7 +7400,7 @@ var ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => {
7400
7400
  $ZodIPv6.init(inst, def);
7401
7401
  ZodStringFormat.init(inst, def);
7402
7402
  });
7403
- function ipv62(params) {
7403
+ function ipv63(params) {
7404
7404
  return _ipv6(ZodIPv6, params);
7405
7405
  }
7406
7406
  var ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => {
@@ -8516,7 +8516,7 @@ var JumpHostSchema = object({
8516
8516
  });
8517
8517
  var DeviceConfigSchema2 = object({
8518
8518
  host: string().default("127.0.0.1"),
8519
- fallbackHosts: array(union([ipv42(), ipv62()])).max(7).optional(),
8519
+ fallbackHosts: array(union([ipv42(), ipv63()])).max(7).optional(),
8520
8520
  username: string().default("admin"),
8521
8521
  password: string().default(""),
8522
8522
  port: exports_coerce.number().int().positive().default(22),
@@ -8547,10 +8547,10 @@ var DeviceConfigSchema2 = object({
8547
8547
  });
8548
8548
  const canonical = (host) => host.includes(":") ? new URL(`http://[${host}]/`).hostname : host.toLowerCase();
8549
8549
  const seen = new Set([
8550
- device.host.includes(":") && !ipv62().safeParse(device.host).success ? device.host : canonical(device.host)
8550
+ device.host.includes(":") && !ipv63().safeParse(device.host).success ? device.host : canonical(device.host)
8551
8551
  ]);
8552
8552
  device.fallbackHosts.forEach((host, i) => {
8553
- if (!union([ipv42(), ipv62()]).safeParse(host).success)
8553
+ if (!union([ipv42(), ipv63()]).safeParse(host).success)
8554
8554
  return;
8555
8555
  const key = canonical(host);
8556
8556
  if (seen.has(key))
@@ -16688,13 +16688,13 @@ async function undoMigration(id, confirm, selected) {
16688
16688
  throw new Error("Undo lost Safe Mode or exceeded its time budget.");
16689
16689
  await checkedRead(item.undo, createContext(undefined, device));
16690
16690
  }
16691
- const beforeTarget = (await import("./cli-pan4hpjf.js")).openSnapshotStore;
16692
- const db = await beforeTarget((await import("./cli-qszw8tv2.js")).DEFAULT_SNAPSHOT_DB);
16691
+ const beforeTarget = (await import("./cli-chcn79z7.js")).openSnapshotStore;
16692
+ const db = await beforeTarget((await import("./cli-b4kkd56k.js")).DEFAULT_SNAPSHOT_DB);
16693
16693
  try {
16694
16694
  const original = db.get(p.snapshots.target);
16695
16695
  if (!original)
16696
16696
  throw new Error("Original target snapshot unavailable.");
16697
- const { normalizeExport } = await import("./cli-4a4dxv04.js");
16697
+ const { normalizeExport } = await import("./cli-twafzgn3.js");
16698
16698
  if (normalizeExport((await migrationInventory(device)).export) !== normalizeExport(original.body))
16699
16699
  throw new Error("Target differs from its backup. Undo verification failed.");
16700
16700
  } finally {
@@ -18437,7 +18437,7 @@ function uint(b, o, len) {
18437
18437
  function ipv43(b, o) {
18438
18438
  return `${b[o]}.${b[o + 1]}.${b[o + 2]}.${b[o + 3]}`;
18439
18439
  }
18440
- function ipv63(b, o) {
18440
+ function ipv6(b, o) {
18441
18441
  const groups = [];
18442
18442
  for (let i = 0;i < 8; i++)
18443
18443
  groups.push(u16(b, o + i * 2));
@@ -18619,11 +18619,11 @@ function decodeRecord(buf, offset, template, ctx, warnings) {
18619
18619
  break;
18620
18620
  case IE.IPV6_SRC_ADDR:
18621
18621
  if (length >= 16)
18622
- record.src = ipv63(buf, start);
18622
+ record.src = ipv6(buf, start);
18623
18623
  break;
18624
18624
  case IE.IPV6_DST_ADDR:
18625
18625
  if (length >= 16)
18626
- record.dst = ipv63(buf, start);
18626
+ record.dst = ipv6(buf, start);
18627
18627
  break;
18628
18628
  case IE.INPUT_SNMP:
18629
18629
  record.inputIf = uint(buf, start, length);
@@ -18647,10 +18647,15 @@ function decodeRecord(buf, offset, template, ctx, warnings) {
18647
18647
  break;
18648
18648
  }
18649
18649
  }
18650
- if (record.start === 0 && relativeStart !== undefined)
18651
- record.start = bootTime + relativeStart;
18652
- if (record.end === 0 && relativeEnd !== undefined)
18653
- record.end = bootTime + relativeEnd;
18650
+ if (ctx.version === 10 && record.start === 0 && record.end === 0 && relativeStart !== undefined && relativeEnd !== undefined) {
18651
+ record.end = ctx.receivedAt;
18652
+ record.start = record.end - Math.max(0, relativeEnd - relativeStart);
18653
+ } else {
18654
+ if (record.start === 0 && relativeStart !== undefined)
18655
+ record.start = bootTime + relativeStart;
18656
+ if (record.end === 0 && relativeEnd !== undefined)
18657
+ record.end = bootTime + relativeEnd;
18658
+ }
18654
18659
  if (record.start === 0)
18655
18660
  record.start = ctx.unixSecs > 0 ? ctx.unixSecs * 1000 : ctx.receivedAt;
18656
18661
  if (record.end === 0)
@@ -18946,6 +18951,7 @@ class FlowCollector {
18946
18951
  decoder = new ExporterFlowDecoder;
18947
18952
  store = null;
18948
18953
  queue = [];
18954
+ subscribers = new Set;
18949
18955
  flushTimer = null;
18950
18956
  pruneTimer = null;
18951
18957
  packets = 0;
@@ -19038,6 +19044,13 @@ class FlowCollector {
19038
19044
  this.queue = [];
19039
19045
  try {
19040
19046
  this.store.insert(batch);
19047
+ for (const subscriber of this.subscribers) {
19048
+ try {
19049
+ subscriber(batch);
19050
+ } catch (e) {
19051
+ logger.warn(`Flow activity subscriber failed: ${String(e)}`);
19052
+ }
19053
+ }
19041
19054
  } catch (e) {
19042
19055
  this.storageDropped += batch.length;
19043
19056
  logger.error(`Flow store insert failed (${batch.length} records dropped): ${String(e)}`);
@@ -19073,6 +19086,10 @@ class FlowCollector {
19073
19086
  drain() {
19074
19087
  this.flush();
19075
19088
  }
19089
+ subscribe(subscriber) {
19090
+ this.subscribers.add(subscriber);
19091
+ return () => this.subscribers.delete(subscriber);
19092
+ }
19076
19093
  }
19077
19094
  var collector = new FlowCollector;
19078
19095
  function getFlowCollector() {
@@ -24193,6 +24210,11 @@ var bridgeTools = [
24193
24210
  frame_types: FrameTypes.optional().describe("Default accepted frame types for ports"),
24194
24211
  ingress_filtering: boolean().optional().describe("Default ingress VLAN filtering for ports"),
24195
24212
  dhcp_snooping: boolean().optional().describe("Enable DHCP snooping"),
24213
+ arp_inspection: boolean().optional().describe("RouterOS 7.25+ validate ARP against DHCP snooping bindings"),
24214
+ ip_source_guard: boolean().optional().describe("RouterOS 7.25+ validate IPv4 source against DHCP snooping bindings"),
24215
+ mlag_init_delay: string().optional().describe("RouterOS 7.25+ MLAG LACP initialization delay"),
24216
+ mlag_lacp_fallback: boolean().optional().describe("RouterOS 7.25+ MLAG LACP fallback after peer loss"),
24217
+ confirm_security_disruption: literal(true).optional().describe("Required when enabling ARP inspection or IP source guard; DHCP bindings may be cleared and traffic interrupted"),
24196
24218
  igmp_snooping: boolean().optional().describe("Enable IGMP/MLD snooping"),
24197
24219
  fast_forward: boolean().optional().describe("Enable Fast Forward optimization"),
24198
24220
  mvrp: boolean().optional().describe("Enable Multiple VLAN Registration Protocol"),
@@ -24201,8 +24223,10 @@ var bridgeTools = [
24201
24223
  transmit_hold_count: number().int().optional().describe("STP transmit hold count")
24202
24224
  },
24203
24225
  async handler(a, ctx) {
24226
+ if ((a.arp_inspection || a.ip_source_guard) && !a.confirm_security_disruption)
24227
+ return "Enabling ARP inspection or IP source guard can clear DHCP bindings and interrupt clients. Review DHCP snooping and trusted ports, then set confirm_security_disruption=true.";
24204
24228
  ctx.info(`Creating bridge: name=${a.name}, vlan_filtering=${a.vlan_filtering}`);
24205
- const cmd = new Cmd("/interface bridge add").set("name", a.name).opt("comment", a.comment).flag("vlan-filtering", a.vlan_filtering).opt("protocol-mode", a.protocol_mode).opt("mtu", a.mtu).opt("ageing-time", a.ageing_time).opt("arp", a.arp).opt("arp-timeout", a.arp_timeout).bool("auto-mac", a.auto_mac).opt("admin-mac", a.admin_mac).opt("priority", a.priority).opt("ether-type", a.ether_type).opt("pvid", a.pvid).opt("frame-types", a.frame_types).bool("ingress-filtering", a.ingress_filtering).bool("dhcp-snooping", a.dhcp_snooping).bool("igmp-snooping", a.igmp_snooping).bool("fast-forward", a.fast_forward).bool("mvrp", a.mvrp).opt("forward-delay", a.forward_delay).opt("max-message-age", a.max_message_age).opt("transmit-hold-count", a.transmit_hold_count).flag("disabled", a.disabled).build();
24229
+ const cmd = new Cmd("/interface bridge add").set("name", a.name).opt("comment", a.comment).flag("vlan-filtering", a.vlan_filtering).opt("protocol-mode", a.protocol_mode).opt("mtu", a.mtu).opt("ageing-time", a.ageing_time).opt("arp", a.arp).opt("arp-timeout", a.arp_timeout).bool("auto-mac", a.auto_mac).opt("admin-mac", a.admin_mac).opt("priority", a.priority).opt("ether-type", a.ether_type).opt("pvid", a.pvid).opt("frame-types", a.frame_types).bool("ingress-filtering", a.ingress_filtering).bool("dhcp-snooping", a.dhcp_snooping).bool("arp-inspection", a.arp_inspection).bool("ip-source-guard", a.ip_source_guard).opt("mlag-init-delay", a.mlag_init_delay).bool("mlag-lacp-fallback", a.mlag_lacp_fallback).bool("igmp-snooping", a.igmp_snooping).bool("fast-forward", a.fast_forward).bool("mvrp", a.mvrp).opt("forward-delay", a.forward_delay).opt("max-message-age", a.max_message_age).opt("transmit-hold-count", a.transmit_hold_count).flag("disabled", a.disabled).build();
24206
24230
  const result = await executeMikrotikCommand(cmd, ctx);
24207
24231
  if (looksLikeError(result))
24208
24232
  return `Failed to create bridge: ${result}`;
@@ -24269,6 +24293,11 @@ ${result}`;
24269
24293
  frame_types: FrameTypes.optional().describe("Default accepted frame types for ports"),
24270
24294
  ingress_filtering: boolean().optional().describe("Default ingress VLAN filtering for ports"),
24271
24295
  dhcp_snooping: boolean().optional().describe("Enable DHCP snooping"),
24296
+ arp_inspection: boolean().optional().describe("RouterOS 7.25+ validate ARP against DHCP snooping bindings"),
24297
+ ip_source_guard: boolean().optional().describe("RouterOS 7.25+ validate IPv4 source against DHCP snooping bindings"),
24298
+ mlag_init_delay: string().optional().describe("RouterOS 7.25+ MLAG LACP initialization delay"),
24299
+ mlag_lacp_fallback: boolean().optional().describe("RouterOS 7.25+ MLAG LACP fallback after peer loss"),
24300
+ confirm_security_disruption: literal(true).optional().describe("Required when enabling ARP inspection or IP source guard; DHCP bindings may be cleared and traffic interrupted"),
24272
24301
  igmp_snooping: boolean().optional().describe("Enable IGMP/MLD snooping"),
24273
24302
  fast_forward: boolean().optional().describe("Enable Fast Forward optimization"),
24274
24303
  mvrp: boolean().optional().describe("Enable Multiple VLAN Registration Protocol"),
@@ -24277,15 +24306,17 @@ ${result}`;
24277
24306
  transmit_hold_count: number().int().optional().describe("STP transmit hold count")
24278
24307
  },
24279
24308
  async handler(a, ctx) {
24309
+ if ((a.arp_inspection || a.ip_source_guard) && !a.confirm_security_disruption)
24310
+ return "Enabling ARP inspection or IP source guard can clear DHCP bindings and interrupt clients. Review DHCP snooping and trusted ports, then set confirm_security_disruption=true.";
24280
24311
  ctx.info(`Updating bridge: name=${a.name}`);
24281
- const cmd = new Cmd(`/interface bridge set [find name="${a.name}"]`).opt("name", a.new_name).opt("comment", a.comment).bool("vlan-filtering", a.vlan_filtering).opt("protocol-mode", a.protocol_mode).bool("disabled", a.disabled).opt("mtu", a.mtu).opt("ageing-time", a.ageing_time).opt("arp", a.arp).opt("arp-timeout", a.arp_timeout).bool("auto-mac", a.auto_mac).opt("admin-mac", a.admin_mac).opt("priority", a.priority).opt("ether-type", a.ether_type).opt("pvid", a.pvid).opt("frame-types", a.frame_types).bool("ingress-filtering", a.ingress_filtering).bool("dhcp-snooping", a.dhcp_snooping).bool("igmp-snooping", a.igmp_snooping).bool("fast-forward", a.fast_forward).bool("mvrp", a.mvrp).opt("forward-delay", a.forward_delay).opt("max-message-age", a.max_message_age).opt("transmit-hold-count", a.transmit_hold_count).build();
24312
+ const cmd = new Cmd(`/interface bridge set [find name=${quoteValue(a.name)}]`).opt("name", a.new_name).opt("comment", a.comment).bool("vlan-filtering", a.vlan_filtering).opt("protocol-mode", a.protocol_mode).bool("disabled", a.disabled).opt("mtu", a.mtu).opt("ageing-time", a.ageing_time).opt("arp", a.arp).opt("arp-timeout", a.arp_timeout).bool("auto-mac", a.auto_mac).opt("admin-mac", a.admin_mac).opt("priority", a.priority).opt("ether-type", a.ether_type).opt("pvid", a.pvid).opt("frame-types", a.frame_types).bool("ingress-filtering", a.ingress_filtering).bool("dhcp-snooping", a.dhcp_snooping).bool("arp-inspection", a.arp_inspection).bool("ip-source-guard", a.ip_source_guard).opt("mlag-init-delay", a.mlag_init_delay).bool("mlag-lacp-fallback", a.mlag_lacp_fallback).bool("igmp-snooping", a.igmp_snooping).bool("fast-forward", a.fast_forward).bool("mvrp", a.mvrp).opt("forward-delay", a.forward_delay).opt("max-message-age", a.max_message_age).opt("transmit-hold-count", a.transmit_hold_count).build();
24282
24313
  if (!cmd.includes("=", cmd.indexOf("]")))
24283
24314
  return "No updates specified.";
24284
24315
  const result = await executeMikrotikCommand(cmd, ctx);
24285
24316
  if (looksLikeError(result))
24286
24317
  return `Failed to update bridge: ${result}`;
24287
24318
  const target = a.new_name ?? a.name;
24288
- const details = await executeMikrotikCommand(`/interface bridge print detail where name="${target}"`, ctx);
24319
+ const details = await executeMikrotikCommand(new Cmd("/interface bridge print detail where").set("name", target).build(), ctx);
24289
24320
  return `Bridge updated successfully:
24290
24321
 
24291
24322
  ${details}`;
@@ -24335,6 +24366,7 @@ ${details}`;
24335
24366
  restricted_role: boolean().optional().describe("Exclude port from becoming the root port"),
24336
24367
  restricted_tcn: boolean().optional().describe("Block topology change notifications from this port"),
24337
24368
  trusted: boolean().optional().describe("Trust DHCP server replies on this port (DHCP snooping)"),
24369
+ trusted_arp: boolean().optional().describe("RouterOS 7.25+ exempt this port from ARP inspection"),
24338
24370
  multicast_router: MulticastRouter.optional().describe("IGMP-snooping multicast router state"),
24339
24371
  fast_leave: boolean().optional().describe("IGMP-snooping fast leave"),
24340
24372
  unknown_unicast_flood: boolean().optional().describe("Flood unknown-unicast frames to this port"),
@@ -24343,7 +24375,7 @@ ${details}`;
24343
24375
  },
24344
24376
  async handler(a, ctx) {
24345
24377
  ctx.info(`Adding bridge port: bridge=${a.bridge}, interface=${a.interface}`);
24346
- const cmd = new Cmd("/interface bridge port add").set("bridge", a.bridge).set("interface", a.interface).opt("pvid", a.pvid).opt("comment", a.comment).bool("hw", a.hw).bool("disabled", a.disabled).opt("frame-types", a.frame_types).bool("ingress-filtering", a.ingress_filtering).bool("tag-stacking", a.tag_stacking).opt("priority", a.priority).opt("path-cost", a.path_cost).opt("internal-path-cost", a.internal_path_cost).opt("horizon", a.horizon).opt("learn", a.learn).opt("edge", a.edge).opt("point-to-point", a.point_to_point).bool("auto-isolate", a.auto_isolate).bool("bpdu-guard", a.bpdu_guard).bool("restricted-role", a.restricted_role).bool("restricted-tcn", a.restricted_tcn).bool("trusted", a.trusted).opt("multicast-router", a.multicast_router).bool("fast-leave", a.fast_leave).bool("unknown-unicast-flood", a.unknown_unicast_flood).bool("unknown-multicast-flood", a.unknown_multicast_flood).bool("broadcast-flood", a.broadcast_flood).build();
24378
+ const cmd = new Cmd("/interface bridge port add").set("bridge", a.bridge).set("interface", a.interface).opt("pvid", a.pvid).opt("comment", a.comment).bool("hw", a.hw).bool("disabled", a.disabled).opt("frame-types", a.frame_types).bool("ingress-filtering", a.ingress_filtering).bool("tag-stacking", a.tag_stacking).opt("priority", a.priority).opt("path-cost", a.path_cost).opt("internal-path-cost", a.internal_path_cost).opt("horizon", a.horizon).opt("learn", a.learn).opt("edge", a.edge).opt("point-to-point", a.point_to_point).bool("auto-isolate", a.auto_isolate).bool("bpdu-guard", a.bpdu_guard).bool("restricted-role", a.restricted_role).bool("restricted-tcn", a.restricted_tcn).bool("trusted", a.trusted).bool("trusted-arp", a.trusted_arp).opt("multicast-router", a.multicast_router).bool("fast-leave", a.fast_leave).bool("unknown-unicast-flood", a.unknown_unicast_flood).bool("unknown-multicast-flood", a.unknown_multicast_flood).bool("broadcast-flood", a.broadcast_flood).build();
24347
24379
  const result = await executeMikrotikCommand(cmd, ctx);
24348
24380
  if (looksLikeError(result))
24349
24381
  return `Failed to add bridge port: ${result}`;
@@ -26986,6 +27018,7 @@ var dhcpTools = [
26986
27018
  delay_threshold: string().optional(),
26987
27019
  add_arp: boolean().optional().describe("Add dynamic ARP entry for each lease (use with reply-only ARP on the interface)"),
26988
27020
  always_broadcast: boolean().optional().describe("Always send replies as broadcast"),
27021
+ ipv6_only_preferred: boolean().optional().describe("RouterOS 7.25+ advertise DHCP option 108 for IPv6-only preferred clients"),
26989
27022
  bootp_support: _enum(["none", "static", "dynamic"]).optional().describe("Which BOOTP requests to answer"),
26990
27023
  conflict_detection: boolean().optional().describe("Ping/ARP-probe an address before offering it to detect conflicts"),
26991
27024
  use_radius: _enum(["yes", "no", "accounting"]).optional().describe("Use RADIUS for leases (accounting = RADIUS accounting only)"),
@@ -26996,7 +27029,7 @@ var dhcpTools = [
26996
27029
  },
26997
27030
  async handler(a, ctx) {
26998
27031
  ctx.info(`Creating DHCP server: name=${a.name}, interface=${a.interface}`);
26999
- const cmd = new Cmd("/ip dhcp-server add").set("name", a.name).set("interface", a.interface).set("lease-time", a.lease_time).opt("address-pool", a.address_pool).flag("disabled", a.disabled).raw(a.authoritative !== "yes" ? `authoritative=${a.authoritative}` : null).opt("delay-threshold", a.delay_threshold).bool("add-arp", a.add_arp).bool("always-broadcast", a.always_broadcast).opt("bootp-support", a.bootp_support).bool("conflict-detection", a.conflict_detection).opt("use-radius", a.use_radius).opt("relay", a.relay).opt("server-address", a.server_address).opt("lease-script", a.lease_script).opt("comment", a.comment).build();
27032
+ const cmd = new Cmd("/ip dhcp-server add").set("name", a.name).set("interface", a.interface).set("lease-time", a.lease_time).opt("address-pool", a.address_pool).flag("disabled", a.disabled).raw(a.authoritative !== "yes" ? `authoritative=${a.authoritative}` : null).opt("delay-threshold", a.delay_threshold).bool("add-arp", a.add_arp).bool("always-broadcast", a.always_broadcast).bool("ipv6-only-preferred", a.ipv6_only_preferred).opt("bootp-support", a.bootp_support).bool("conflict-detection", a.conflict_detection).opt("use-radius", a.use_radius).opt("relay", a.relay).opt("server-address", a.server_address).opt("lease-script", a.lease_script).opt("comment", a.comment).build();
27000
27033
  const result = await executeMikrotikCommand(cmd, ctx);
27001
27034
  if (looksLikeError(result))
27002
27035
  return `Failed to create DHCP server: ${result}`;
@@ -28731,7 +28764,7 @@ var cache3 = null;
28731
28764
  async function gateway() {
28732
28765
  if (cache3)
28733
28766
  return cache3;
28734
- const { moduleCatalog } = await import("./cli-ksq2qr7d.js");
28767
+ const { moduleCatalog } = await import("./cli-0srgjr3v.js");
28735
28768
  const forIndex = [];
28736
28769
  const byName = new Map;
28737
28770
  for (const mod of moduleCatalog) {
@@ -29453,12 +29486,15 @@ var dot1xServerTools = [
29453
29486
  reject_vlan_id: string().optional().describe("VLAN id or 'none'"),
29454
29487
  server_fail_vlan_id: string().optional().describe("VLAN id or 'none'"),
29455
29488
  reauth_timeout: string().optional().describe("Re-auth period or 'none'"),
29489
+ reauth_period: string().optional().describe("RouterOS 7.25+ re-authentication period"),
29456
29490
  comment: string().optional(),
29457
29491
  disabled: boolean().default(false)
29458
29492
  },
29459
29493
  async handler(a, ctx) {
29494
+ if (a.reauth_period !== undefined && a.reauth_timeout !== undefined)
29495
+ return "Specify either reauth_period (RouterOS 7.25+) or reauth_timeout (older RouterOS), not both.";
29460
29496
  ctx.info(`Adding dot1x server: interface=${a.interface}`);
29461
- const cmd = new Cmd("/interface dot1x server add").set("interface", a.interface).opt("auth-types", a.auth_types).bool("accounting", a.accounting).opt("interim-update", a.interim_update).opt("mac-auth-mode", a.mac_auth_mode).opt("guest-vlan-id", a.guest_vlan_id).opt("reject-vlan-id", a.reject_vlan_id).opt("server-fail-vlan-id", a.server_fail_vlan_id).opt("reauth-timeout", a.reauth_timeout).opt("comment", a.comment).flag("disabled", a.disabled).build();
29497
+ const cmd = new Cmd("/interface dot1x server add").set("interface", a.interface).opt("auth-types", a.auth_types).bool("accounting", a.accounting).opt("interim-update", a.interim_update).opt("mac-auth-mode", a.mac_auth_mode).opt("guest-vlan-id", a.guest_vlan_id).opt("reject-vlan-id", a.reject_vlan_id).opt("server-fail-vlan-id", a.server_fail_vlan_id).opt("reauth-timeout", a.reauth_timeout).opt("reauth-period", a.reauth_period).opt("comment", a.comment).flag("disabled", a.disabled).build();
29462
29498
  const result = await executeMikrotikCommand(cmd, ctx);
29463
29499
  if (looksLikeError(result))
29464
29500
  return `Failed to add dot1x server: ${result}`;
@@ -29524,14 +29560,18 @@ ${result}`;
29524
29560
  reject_vlan_id: string().optional(),
29525
29561
  server_fail_vlan_id: string().optional(),
29526
29562
  reauth_timeout: string().optional(),
29563
+ reauth_period: string().optional().describe("RouterOS 7.25+ re-authentication period"),
29527
29564
  comment: string().optional(),
29528
29565
  disabled: boolean().optional()
29529
29566
  },
29530
29567
  async handler(a, ctx) {
29568
+ if (a.reauth_period !== undefined && a.reauth_timeout !== undefined)
29569
+ return "Specify either reauth_period (RouterOS 7.25+) or reauth_timeout (older RouterOS), not both.";
29531
29570
  ctx.info(`Updating dot1x server: server_id=${a.server_id}`);
29532
29571
  const selector = a.server_id.startsWith("*") ? `.id="${a.server_id}"` : `interface="${a.server_id}"`;
29533
29572
  const base = `/interface dot1x server set [find ${selector}]`;
29534
29573
  const cmd = new Cmd(base).opt("auth-types", a.auth_types).bool("accounting", a.accounting).opt("interim-update", a.interim_update).opt("mac-auth-mode", a.mac_auth_mode).opt("guest-vlan-id", a.guest_vlan_id).opt("reject-vlan-id", a.reject_vlan_id).opt("server-fail-vlan-id", a.server_fail_vlan_id).opt("reauth-timeout", a.reauth_timeout);
29574
+ cmd.opt("reauth-period", a.reauth_period);
29535
29575
  if (a.comment !== undefined)
29536
29576
  cmd.raw(`comment=${quoteValue(a.comment)}`);
29537
29577
  if (a.disabled !== undefined)
@@ -36208,6 +36248,8 @@ var ipv6DhcpServerTools = [
36208
36248
  lease_time: string().default("3d").describe("Lease duration e.g. '1d', '12h', '30m'"),
36209
36249
  binding_script: string().optional(),
36210
36250
  rapid_commit: boolean().optional(),
36251
+ add_dns_entries: boolean().optional().describe("RouterOS 7.25+ create AAAA DNS entries for client FQDNs"),
36252
+ add_dns_entries_suffix: string().optional().describe("Suffix for dynamically created DHCPv6 DNS entries"),
36211
36253
  preference: number().int().min(0).max(255).optional(),
36212
36254
  route_distance: number().int().optional(),
36213
36255
  use_radius: boolean().optional().describe("Authenticate clients via RADIUS"),
@@ -36219,7 +36261,7 @@ var ipv6DhcpServerTools = [
36219
36261
  },
36220
36262
  async handler(a, ctx) {
36221
36263
  ctx.info(`Creating DHCPv6 server: name=${a.name}, interface=${a.interface}`);
36222
- const cmd = new Cmd("/ipv6 dhcp-server add").set("name", a.name).set("interface", a.interface).set("address-pool", a.address_pool).set("lease-time", a.lease_time).opt("binding-script", a.binding_script).bool("rapid-commit", a.rapid_commit).opt("preference", a.preference).opt("route-distance", a.route_distance).bool("use-radius", a.use_radius).bool("allow-dual-stack-queue", a.allow_dual_stack_queue).opt("parent-queue", a.parent_queue).opt("dhcp-option", a.dhcp_option?.length ? a.dhcp_option.join(",") : undefined).opt("comment", a.comment).flag("disabled", a.disabled).build();
36264
+ const cmd = new Cmd("/ipv6 dhcp-server add").set("name", a.name).set("interface", a.interface).set("address-pool", a.address_pool).set("lease-time", a.lease_time).opt("binding-script", a.binding_script).bool("rapid-commit", a.rapid_commit).bool("add-dns-entries", a.add_dns_entries).opt("add-dns-entries-suffix", a.add_dns_entries_suffix).opt("preference", a.preference).opt("route-distance", a.route_distance).bool("use-radius", a.use_radius).bool("allow-dual-stack-queue", a.allow_dual_stack_queue).opt("parent-queue", a.parent_queue).opt("dhcp-option", a.dhcp_option?.length ? a.dhcp_option.join(",") : undefined).opt("comment", a.comment).flag("disabled", a.disabled).build();
36223
36265
  const result = await executeMikrotikCommand(cmd, ctx);
36224
36266
  if (looksLikeError(result))
36225
36267
  return `Failed to create DHCPv6 server: ${result}`;
@@ -49279,6 +49321,51 @@ ${result}`;
49279
49321
  // src/tools/routing-bgp.ts
49280
49322
  var UNSUPPORTED2 = "BGP is not available on this device (requires RouterOS v7 with the routing package).";
49281
49323
  var routingBgpTools = [
49324
+ defineTool({
49325
+ name: "list_bgp_instances",
49326
+ title: "List BGP Instances",
49327
+ annotations: READ,
49328
+ description: "Read BGP instances and their best-path selection settings, including RouterOS 7.25+ always-compare-med. Use before changing an instance.",
49329
+ async handler(_a, ctx) {
49330
+ const result = await executeMikrotikCommand("/routing bgp instance print detail", ctx);
49331
+ if (commandUnsupported(result))
49332
+ return UNSUPPORTED2;
49333
+ return isEmpty(result) ? "No BGP instances found." : `BGP INSTANCES:
49334
+
49335
+ ${result}`;
49336
+ }
49337
+ }),
49338
+ defineTool({
49339
+ name: "update_bgp_instance_med_comparison",
49340
+ title: "Set BGP Instance MED Comparison",
49341
+ annotations: WRITE_IDEMPOTENT,
49342
+ description: "Set RouterOS 7.25+ always-compare-med on one named BGP instance. This changes best-path selection and can reroute traffic; inspect list_bgp_instances and obtain operator approval first.",
49343
+ inputSchema: {
49344
+ name: string().min(1).describe("Exact BGP instance name"),
49345
+ always_compare_med: boolean(),
49346
+ confirm_routing_change: literal(true).describe("Operator approved the best-path behavior change")
49347
+ },
49348
+ async handler(a, ctx) {
49349
+ const selector = new Cmd("/routing bgp instance print count-only where").set("name", a.name).build();
49350
+ const count = await executeMikrotikCommand(selector, ctx);
49351
+ if (commandUnsupported(count))
49352
+ return UNSUPPORTED2;
49353
+ if (looksLikeError(count))
49354
+ return `Failed to inspect BGP instance: ${count}`;
49355
+ if (isEmpty(count) || count.trim() === "0")
49356
+ return `BGP instance '${a.name}' not found.`;
49357
+ const cmd = new Cmd(`/routing bgp instance set [find name=${quoteValue(a.name)}]`).bool("always-compare-med", a.always_compare_med).build();
49358
+ const result = await executeMikrotikCommand(cmd, ctx);
49359
+ if (looksLikeError(result))
49360
+ return `Failed to update BGP instance: ${result}`;
49361
+ const details = await executeMikrotikCommand(new Cmd("/routing bgp instance print detail where").set("name", a.name).build(), ctx);
49362
+ if (looksLikeError(details) || isEmpty(details))
49363
+ return `BGP instance update was sent, but read-back failed: ${details || "no details returned"}`;
49364
+ return `BGP instance '${a.name}' MED comparison updated:
49365
+
49366
+ ${details}`;
49367
+ }
49368
+ }),
49282
49369
  defineTool({
49283
49370
  name: "list_bgp_connections",
49284
49371
  title: "List BGP Connections",
@@ -54336,7 +54423,7 @@ var riskByTool = null;
54336
54423
  async function riskIndex() {
54337
54424
  if (riskByTool)
54338
54425
  return riskByTool;
54339
- const { moduleCatalog } = await import("./cli-ksq2qr7d.js");
54426
+ const { moduleCatalog } = await import("./cli-0srgjr3v.js");
54340
54427
  const index = new Map;
54341
54428
  for (const mod of moduleCatalog) {
54342
54429
  for (const tool of mod.tools)
@@ -61742,6 +61829,7 @@ var vlanTools = [
61742
61829
  comment: string().optional(),
61743
61830
  disabled: boolean().default(false),
61744
61831
  mtu: number().int().optional(),
61832
+ forced_mac_address: string().optional().describe("RouterOS 7.25+ forced VLAN interface MAC address"),
61745
61833
  use_service_tag: boolean().default(false).describe("Use 802.1ad service tag (QinQ)"),
61746
61834
  arp: ArpMode2.default("enabled"),
61747
61835
  arp_timeout: string().optional(),
@@ -61751,7 +61839,7 @@ var vlanTools = [
61751
61839
  },
61752
61840
  async handler(a, ctx) {
61753
61841
  ctx.info(`Creating VLAN interface: name=${a.name}, vlan_id=${a.vlan_id}, interface=${a.interface}`);
61754
- const cmd = new Cmd("/interface vlan add").set("name", a.name).set("vlan-id", a.vlan_id).set("interface", a.interface).opt("comment", a.comment).flag("disabled", a.disabled).opt("mtu", a.mtu).flag("use-service-tag", a.use_service_tag).raw(a.arp !== "enabled" ? `arp=${a.arp}` : null).opt("arp-timeout", a.arp_timeout).opt("loop-protect", a.loop_protect).opt("loop-protect-disable-time", a.loop_protect_disable_time).opt("loop-protect-send-interval", a.loop_protect_send_interval).build();
61842
+ const cmd = new Cmd("/interface vlan add").set("name", a.name).set("vlan-id", a.vlan_id).set("interface", a.interface).opt("comment", a.comment).flag("disabled", a.disabled).opt("mtu", a.mtu).opt("forced-mac-address", a.forced_mac_address).flag("use-service-tag", a.use_service_tag).raw(a.arp !== "enabled" ? `arp=${a.arp}` : null).opt("arp-timeout", a.arp_timeout).opt("loop-protect", a.loop_protect).opt("loop-protect-disable-time", a.loop_protect_disable_time).opt("loop-protect-send-interval", a.loop_protect_send_interval).build();
61755
61843
  const result = await executeMikrotikCommand(cmd, ctx);
61756
61844
  if (looksLikeError(result))
61757
61845
  return `Failed to create VLAN interface: ${result}`;
@@ -61816,6 +61904,7 @@ ${result}`;
61816
61904
  comment: string().optional(),
61817
61905
  disabled: boolean().optional(),
61818
61906
  mtu: number().int().optional(),
61907
+ forced_mac_address: string().optional().describe("RouterOS 7.25+ forced VLAN interface MAC address"),
61819
61908
  use_service_tag: boolean().optional(),
61820
61909
  arp: ArpMode2.optional(),
61821
61910
  arp_timeout: string().optional(),
@@ -61825,7 +61914,7 @@ ${result}`;
61825
61914
  },
61826
61915
  async handler(a, ctx) {
61827
61916
  ctx.info(`Updating VLAN interface: name=${a.name}`);
61828
- const cmd = new Cmd(`/interface vlan set [find name="${a.name}"]`).opt("name", a.new_name).opt("vlan-id", a.vlan_id).opt("interface", a.interface).opt("comment", a.comment).bool("disabled", a.disabled).opt("mtu", a.mtu).bool("use-service-tag", a.use_service_tag).opt("arp", a.arp).opt("arp-timeout", a.arp_timeout).opt("loop-protect", a.loop_protect).opt("loop-protect-disable-time", a.loop_protect_disable_time).opt("loop-protect-send-interval", a.loop_protect_send_interval).build();
61917
+ const cmd = new Cmd(`/interface vlan set [find name="${a.name}"]`).opt("name", a.new_name).opt("vlan-id", a.vlan_id).opt("interface", a.interface).opt("comment", a.comment).bool("disabled", a.disabled).opt("mtu", a.mtu).opt("forced-mac-address", a.forced_mac_address).bool("use-service-tag", a.use_service_tag).opt("arp", a.arp).opt("arp-timeout", a.arp_timeout).opt("loop-protect", a.loop_protect).opt("loop-protect-disable-time", a.loop_protect_disable_time).opt("loop-protect-send-interval", a.loop_protect_send_interval).build();
61829
61918
  if (!cmd.includes("=", cmd.indexOf("]")))
61830
61919
  return "No updates specified.";
61831
61920
  const result = await executeMikrotikCommand(cmd, ctx);
@@ -62250,12 +62339,13 @@ ${details}`;
62250
62339
  client_endpoint: string().optional().describe("server endpoint host[:port] written into the generated client config"),
62251
62340
  client_keepalive: string().optional().describe('client persistent-keepalive for the generated config e.g. "25s"'),
62252
62341
  client_listen_port: number().int().optional().describe("listen-port written into the generated client config"),
62342
+ client_mtu: number().int().min(576).max(65535).optional().describe("RouterOS 7.25+ MTU in generated client configuration"),
62253
62343
  comment: string().optional(),
62254
62344
  disabled: boolean().default(false)
62255
62345
  },
62256
62346
  async handler(a, ctx) {
62257
62347
  ctx.info(`Adding WireGuard peer: interface=${a.interface}, public_key=${a.public_key.slice(0, 12)}...`);
62258
- const cmd = new Cmd("/interface wireguard peers add").set("interface", a.interface).set("public-key", a.public_key).set("allowed-address", a.allowed_address).opt("endpoint-address", a.endpoint_address).opt("endpoint-port", a.endpoint_port).opt("preshared-key", a.preshared_key).opt("persistent-keepalive", a.persistent_keepalive).opt("name", a.name).opt("private-key", a.private_key).bool("responder", a.responder).opt("client-address", a.client_address).opt("client-dns", a.client_dns).opt("client-endpoint", a.client_endpoint).opt("client-keepalive", a.client_keepalive).opt("client-listen-port", a.client_listen_port).opt("comment", a.comment).flag("disabled", a.disabled).build();
62348
+ const cmd = new Cmd("/interface wireguard peers add").set("interface", a.interface).set("public-key", a.public_key).set("allowed-address", a.allowed_address).opt("endpoint-address", a.endpoint_address).opt("endpoint-port", a.endpoint_port).opt("preshared-key", a.preshared_key).opt("persistent-keepalive", a.persistent_keepalive).opt("name", a.name).opt("private-key", a.private_key).bool("responder", a.responder).opt("client-address", a.client_address).opt("client-dns", a.client_dns).opt("client-endpoint", a.client_endpoint).opt("client-keepalive", a.client_keepalive).opt("client-listen-port", a.client_listen_port).opt("client-mtu", a.client_mtu).opt("comment", a.comment).flag("disabled", a.disabled).build();
62259
62349
  const result = await executeMikrotikCommand(cmd, ctx);
62260
62350
  if (looksLikeError(result))
62261
62351
  return `Failed to add WireGuard peer: ${result}`;
@@ -62335,7 +62425,8 @@ ${result}`;
62335
62425
  client_dns: string().optional().describe("DNS server(s) written into the generated client config"),
62336
62426
  client_endpoint: string().optional().describe("server endpoint host[:port] written into the generated client config"),
62337
62427
  client_keepalive: string().optional().describe('client persistent-keepalive for the generated config e.g. "25s"'),
62338
- client_listen_port: number().int().optional().describe("listen-port written into the generated client config"),
62428
+ client_listen_port: union([number().int(), literal("")]).optional().describe("Client listen port; empty string unsets it on RouterOS 7.25+"),
62429
+ client_mtu: number().int().min(576).max(65535).optional().describe("RouterOS 7.25+ MTU in generated client configuration"),
62339
62430
  comment: string().optional(),
62340
62431
  disabled: boolean().optional()
62341
62432
  },
@@ -62345,7 +62436,7 @@ ${result}`;
62345
62436
  if (!id)
62346
62437
  return peerNotFound(a.peer_id);
62347
62438
  const base = `/interface wireguard peers set ${id}`;
62348
- const cmd = new Cmd(base).raw(a.public_key !== undefined ? `public-key=${quoteValue(a.public_key)}` : null).raw(a.allowed_address !== undefined ? `allowed-address=${quoteValue(a.allowed_address)}` : null).raw(a.endpoint_address !== undefined ? a.endpoint_address === "" ? "!endpoint-address" : `endpoint-address=${quoteValue(a.endpoint_address)}` : null).opt("endpoint-port", a.endpoint_port).raw(a.preshared_key !== undefined ? a.preshared_key === "" ? "!preshared-key" : `preshared-key=${quoteValue(a.preshared_key)}` : null).raw(a.persistent_keepalive !== undefined ? `persistent-keepalive=${a.persistent_keepalive}` : null).opt("name", a.name).opt("private-key", a.private_key).bool("responder", a.responder).raw(a.client_address !== undefined ? a.client_address === "" ? "!client-address" : `client-address=${quoteValue(a.client_address)}` : null).raw(a.client_dns !== undefined ? a.client_dns === "" ? "!client-dns" : `client-dns=${quoteValue(a.client_dns)}` : null).raw(a.client_endpoint !== undefined ? a.client_endpoint === "" ? "!client-endpoint" : `client-endpoint=${quoteValue(a.client_endpoint)}` : null).opt("client-keepalive", a.client_keepalive).opt("client-listen-port", a.client_listen_port).raw(a.comment !== undefined ? `comment=${quoteValue(a.comment)}` : null).bool("disabled", a.disabled).build();
62439
+ const cmd = new Cmd(base).raw(a.public_key !== undefined ? `public-key=${quoteValue(a.public_key)}` : null).raw(a.allowed_address !== undefined ? `allowed-address=${quoteValue(a.allowed_address)}` : null).raw(a.endpoint_address !== undefined ? a.endpoint_address === "" ? "!endpoint-address" : `endpoint-address=${quoteValue(a.endpoint_address)}` : null).opt("endpoint-port", a.endpoint_port).raw(a.preshared_key !== undefined ? a.preshared_key === "" ? "!preshared-key" : `preshared-key=${quoteValue(a.preshared_key)}` : null).raw(a.persistent_keepalive !== undefined ? `persistent-keepalive=${a.persistent_keepalive}` : null).opt("name", a.name).opt("private-key", a.private_key).bool("responder", a.responder).raw(a.client_address !== undefined ? a.client_address === "" ? "!client-address" : `client-address=${quoteValue(a.client_address)}` : null).raw(a.client_dns !== undefined ? a.client_dns === "" ? "!client-dns" : `client-dns=${quoteValue(a.client_dns)}` : null).raw(a.client_endpoint !== undefined ? a.client_endpoint === "" ? "!client-endpoint" : `client-endpoint=${quoteValue(a.client_endpoint)}` : null).opt("client-keepalive", a.client_keepalive).raw(a.client_listen_port === "" ? "!client-listen-port" : null).opt("client-listen-port", a.client_listen_port === "" ? undefined : a.client_listen_port).opt("client-mtu", a.client_mtu).raw(a.comment !== undefined ? `comment=${quoteValue(a.comment)}` : null).bool("disabled", a.disabled).build();
62349
62440
  if (cmd === base)
62350
62441
  return "No updates specified.";
62351
62442
  const result = await executeMikrotikCommand(cmd, ctx);
@@ -65503,4 +65594,4 @@ function selectToolModules2(filter = {}, catalog = moduleCatalog2) {
65503
65594
  }).map((m) => m.tools);
65504
65595
  }
65505
65596
 
65506
- export { __toESM, __commonJS, clone, normalizeParams, own, installLazyProp, $constructor, parse, parseAsync, safeParse, safeParseAsync, $ZodType, $ZodObject, toJSONSchema, ZodError, string, number, boolean, _null, unknown, array, object, looseObject, union, discriminatedUnion, intersection, record, _enum, literal, ZodOptional, optional, custom, preprocess, datetime, exports_coerce, DEFAULT_DASHBOARD_DB2, DEFAULT_SNAPSHOT_DB2, DEFAULT_BACKUP_DIR2, DEFAULT_CONFIG_HISTORY_DIR2, McpServerSettingsSchema2, DeviceConfigSchema2, DashboardConfigSchema2, MemoryConfigSchema2, SSHConfigSchema2, ToolFilterSchema2, AccessConfigSchema2, MikrotikConfigSchema2, getConfigSource2, loadConfig2, logger, deviceEndpoints, onConfigChanged, setConfig, getConfig, listDevices, deviceLabels, resolveDeviceName, deviceDirectory, DeviceConnectionError, isMacTelnetDevice, createDeviceClient, describeTransport, isPoolEnabled, closeAll, closeDevice, poolStatus, ScopeSchema, RememberSchema, ReviseSchema, RecallSchema, BrowseSchema, openMemoryStore, getMemoryStore, closeMemoryStore, installMemoryStore, Cmd, isEmpty, looksLikeError, commandUnsupported, riskOf, redact, createContext, evaluateAccess, previewAccessPolicy, getAccessPolicy, hasSessionNarrowing, recentDenials, assertDeviceAccess, getSafeModeManager, parseKeyValues, parseRouterosDate, parseSize, parseRecords, parseLeadingNumber, executeMikrotikCommand, isYes, parseExportMeta2, normalizeExport2, contentSha2, countLines2, openSnapshotStore2, captureSnapshot, startRoutingMonitor, stopRoutingMonitor, configureRecorder, getEventStore, subscribe, subscriberCount, startFlightRecorder, stopFlightRecorder, explainUnmet, serializeCapabilities, getCapabilities, peekCapabilities, invalidateCapabilities, redactChannels, setMcpAlertSender, deliver, parseDuration, AlertRuleSchema, isEventTrigger, ruleWarnings, eventMet, initialState, step, isMuted, parseRules, AlertEngine, setAlertEngine, getAlertEngine, registerTools, clientCheckOrigin, noteClientPresence, authorizedCheck, saveCheckRun, clientCheckTools, parseExport, routerMigrationTools, supportBundleTools, addressSetTools, fetchDevices, sampleDeviceTraffic, KID_CONTROL_COUNTERS_COMMAND, parseKidControlOutput, sampleAllTraffic, setDeviceLimits, blockDevice, allowDevice, makeDeviceStatic, setDeviceIp, setDeviceLabel, removeDeviceLease, devicesView, getFlowCollector, topTalkers, conversations, protocolMix, timeline, summarize, flowStore, FlowPathError, investigationTools, homeInternetTools, buildModel, unreachableRules, tracePacket, diffTraces, listSuites, getSuite, saveSuite, serviceContractTools, serviceRoutingTools, flightRecorderTools, recoveryLabTools, roundTripTools, PROMPTS_DIR, PROJECT_ROOT, UI_DIST_DIR, registerUiResources, backupDir, listBackups, readBackup, writeBackup, deleteBackup, renameBackup, createLocalBackup, restoreLocalBackup, isS3Configured, getS3Client, presignExpiresIn, s3Target, splitCommands, buildChangePlan, renderPlan, diffLines, noteDriftResult, analyzeDrift, attributeChanges, CONTAINER_GUIDE_URI, getRouterosContainerGuide, CONTAINER_INSTRUCTIONS, containerPromptGuidance, applyWritesSafely, evaluatePolicies, validatePolicyText, renderReport, rememberReport, currentPolicySet, verificationSchema, verifyPolicy, buildFabricMap, collectFabric, ADVISORY_DATASET_DATE, ADVISORIES, matchAdvisories, collectDeviceFacts, getDeviceGeo, sourceIpLiteral, getIpGeo, ipGeoRoute, startGeoLookups, stopGeoLookups, IpIntelligenceInput, lookupIpIntelligence, DEFAULT_TZSP_PORT, capture, OpenVpnOperationError, disconnectOpenVpnInput, listOpenVpnSessions, disconnectOpenVpnSession, AAA_ENTITIES, listAaaEntity, addAaaEntity, updateAaaEntity, removeAaaEntity, toggleAaaEntity, getRadiusIncoming, setRadiusIncoming, resetRadiusCounters, getUmSettings, setUmSettings, requestAbort, runTransaction, createDeviceExecutor, subscribeTxn, liveTxnUpdates, toRecord, getTxn, dropTxn, listTxns, txnStore, persistTxn, publishRollout, subscribeRollout, liveRolloutUpdates, requestHold, resume, requestAbort2, summarize2, buildTopology, getDeviceStatus, getDeviceNeighbors, getDeviceHistory, probeDevice, startHealthChecks, stopHealthChecks, runRollout, createDeviceExecutor2, toRecord2, getRollout, dropRollout, listRollouts, rolloutStore, persistRollout, auditAdapter, schedulableTools, nextRun, describeCron, diffFindings, describeDiff, worstSeverity, severityCounts, JobSchema, scheduleStore, runJob, armJob, nextRunOf, forgetJob, primeRiskIndex, liveExecutor, runnerOptions, startScheduler, stopScheduler, analyzeDevice, diffNarratives, renderDiff, topologyMermaid, NARRATIVE_SECTIONS, renderNarrative, isPlan, neverBlockSet, isNeverBlock, decide, executePlan, revokeBlock, attackStore, buildGuards, policyFromConfig, sweep, startAttackDetection, stopAttackDetection, VERSION, WEBSITE_URL, LOGO_URL, SERVER_TITLE, SERVER_DESCRIPTION, SERVER_NAME, PKG_META, loadFileCacheSync, fetchLatestRelease, checkForUpdate, updateSummaryLine, fetchAllReleases, scopeConfigDraft, mergeDeviceDraft, mergeConfigDraft, serializeConfig, atomicWrite, validateConfig, getConfigAdmin, VLAN_GUIDE_URI, getVlanSegmentationGuide, VLAN_INSTRUCTIONS, vlanPromptGuidance, buildChannelPlanCommands, reportWeakClients, runCapsmanAudit, steerAlreadyPresent, buildSteerCommands, loadBalancePlan, buildLoadBalanceCommands, buildFtCommands, buildHaCommands, haGuidance, capsmanOverview, fetchCapsmanState, moduleCatalog2, allToolModules2, ALWAYS_ON_MODULES2, selectToolModules2 };
65597
+ export { __toESM, __commonJS, clone, normalizeParams, own, installLazyProp, $constructor, parse, parseAsync, safeParse, safeParseAsync, $ZodType, $ZodObject, toJSONSchema, ZodError, string, number, boolean, _null, unknown, array, object, looseObject, union, discriminatedUnion, intersection, record, _enum, literal, ZodOptional, optional, custom, preprocess, datetime, exports_coerce, DEFAULT_DASHBOARD_DB2, DEFAULT_SNAPSHOT_DB2, DEFAULT_BACKUP_DIR2, DEFAULT_CONFIG_HISTORY_DIR2, McpServerSettingsSchema2, DeviceConfigSchema2, DashboardConfigSchema2, MemoryConfigSchema2, SSHConfigSchema2, ToolFilterSchema2, AccessConfigSchema2, MikrotikConfigSchema2, getConfigSource2, loadConfig2, logger, deviceEndpoints, onConfigChanged, setConfig, getConfig, listDevices, deviceLabels, resolveDeviceName, deviceDirectory, DeviceConnectionError, isMacTelnetDevice, createDeviceClient, describeTransport, isPoolEnabled, closeAll, closeDevice, poolStatus, ScopeSchema, RememberSchema, ReviseSchema, RecallSchema, BrowseSchema, openMemoryStore, getMemoryStore, closeMemoryStore, installMemoryStore, Cmd, isEmpty, looksLikeError, commandUnsupported, riskOf, redact, createContext, evaluateAccess, previewAccessPolicy, getAccessPolicy, hasSessionNarrowing, recentDenials, assertDeviceAccess, getSafeModeManager, parseKeyValues, parseRouterosDate, parseSize, parseRecords, parseLeadingNumber, executeMikrotikCommand, isYes, parseExportMeta2, normalizeExport2, contentSha2, countLines2, openSnapshotStore2, captureSnapshot, startRoutingMonitor, stopRoutingMonitor, configureRecorder, getEventStore, subscribe, subscriberCount, startFlightRecorder, stopFlightRecorder, explainUnmet, serializeCapabilities, getCapabilities, peekCapabilities, invalidateCapabilities, redactChannels, setMcpAlertSender, deliver, parseDuration, AlertRuleSchema, isEventTrigger, ruleWarnings, eventMet, initialState, step, isMuted, parseRules, AlertEngine, setAlertEngine, getAlertEngine, registerTools, clientCheckOrigin, noteClientPresence, authorizedCheck, saveCheckRun, clientCheckTools, parseExport, routerMigrationTools, supportBundleTools, addressSetTools, fetchDevices, sampleDeviceTraffic, KID_CONTROL_COUNTERS_COMMAND, parseKidControlOutput, sampleAllTraffic, setDeviceLimits, blockDevice, allowDevice, makeDeviceStatic, setDeviceIp, setDeviceLabel, removeDeviceLease, devicesView, ipv6, getFlowCollector, topTalkers, conversations, protocolMix, timeline, summarize, flowStore, FlowPathError, investigationTools, homeInternetTools, buildModel, unreachableRules, tracePacket, diffTraces, listSuites, getSuite, saveSuite, serviceContractTools, serviceRoutingTools, flightRecorderTools, recoveryLabTools, roundTripTools, PROMPTS_DIR, PROJECT_ROOT, UI_DIST_DIR, registerUiResources, backupDir, listBackups, readBackup, writeBackup, deleteBackup, renameBackup, createLocalBackup, restoreLocalBackup, isS3Configured, getS3Client, presignExpiresIn, s3Target, splitCommands, buildChangePlan, renderPlan, diffLines, noteDriftResult, analyzeDrift, attributeChanges, CONTAINER_GUIDE_URI, getRouterosContainerGuide, CONTAINER_INSTRUCTIONS, containerPromptGuidance, applyWritesSafely, evaluatePolicies, validatePolicyText, renderReport, rememberReport, currentPolicySet, verificationSchema, verifyPolicy, buildFabricMap, collectFabric, ADVISORY_DATASET_DATE, ADVISORIES, matchAdvisories, collectDeviceFacts, getDeviceGeo, isPublicIpLiteral, sourceIpLiteral, getIpGeo, ipGeoRoute, startGeoLookups, stopGeoLookups, IpIntelligenceInput, lookupIpIntelligence, decodeTzsp, DEFAULT_TZSP_PORT, capture, OpenVpnOperationError, disconnectOpenVpnInput, listOpenVpnSessions, disconnectOpenVpnSession, AAA_ENTITIES, listAaaEntity, addAaaEntity, updateAaaEntity, removeAaaEntity, toggleAaaEntity, getRadiusIncoming, setRadiusIncoming, resetRadiusCounters, getUmSettings, setUmSettings, requestAbort, runTransaction, createDeviceExecutor, subscribeTxn, liveTxnUpdates, toRecord, getTxn, dropTxn, listTxns, txnStore, persistTxn, publishRollout, subscribeRollout, liveRolloutUpdates, requestHold, resume, requestAbort2, summarize2, buildTopology, getDeviceStatus, getDeviceNeighbors, getDeviceHistory, probeDevice, startHealthChecks, stopHealthChecks, runRollout, createDeviceExecutor2, toRecord2, getRollout, dropRollout, listRollouts, rolloutStore, persistRollout, auditAdapter, schedulableTools, nextRun, describeCron, diffFindings, describeDiff, worstSeverity, severityCounts, JobSchema, scheduleStore, runJob, armJob, nextRunOf, forgetJob, primeRiskIndex, liveExecutor, runnerOptions, startScheduler, stopScheduler, analyzeDevice, diffNarratives, renderDiff, topologyMermaid, NARRATIVE_SECTIONS, renderNarrative, isPlan, neverBlockSet, isNeverBlock, decide, executePlan, revokeBlock, attackStore, buildGuards, policyFromConfig, sweep, startAttackDetection, stopAttackDetection, VERSION, WEBSITE_URL, LOGO_URL, SERVER_TITLE, SERVER_DESCRIPTION, SERVER_NAME, PKG_META, loadFileCacheSync, fetchLatestRelease, checkForUpdate, updateSummaryLine, fetchAllReleases, scopeConfigDraft, mergeDeviceDraft, mergeConfigDraft, serializeConfig, atomicWrite, validateConfig, getConfigAdmin, VLAN_GUIDE_URI, getVlanSegmentationGuide, VLAN_INSTRUCTIONS, vlanPromptGuidance, buildChannelPlanCommands, reportWeakClients, runCapsmanAudit, steerAlreadyPresent, buildSteerCommands, loadBalancePlan, buildLoadBalanceCommands, buildFtCommands, buildHaCommands, haGuidance, capsmanOverview, fetchCapsmanState, moduleCatalog2, allToolModules2, ALWAYS_ON_MODULES2, selectToolModules2 };
@@ -14,7 +14,7 @@ import {
14
14
  MikrotikConfigSchema2,
15
15
  getConfigSource2,
16
16
  loadConfig2
17
- } from "./cli-mh3kf1gx.js";
17
+ } from "./cli-81s63cts.js";
18
18
  export {
19
19
  AccessConfigSchema2 as AccessConfigSchema,
20
20
  DEFAULT_BACKUP_DIR2 as DEFAULT_BACKUP_DIR,
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  openSnapshotStore2
4
- } from "./cli-mh3kf1gx.js";
4
+ } from "./cli-81s63cts.js";
5
5
  export {
6
6
  openSnapshotStore2 as openSnapshotStore
7
7
  };
@@ -4,7 +4,7 @@ import {
4
4
  normalizeExport2,
5
5
  contentSha2,
6
6
  countLines2
7
- } from "./cli-mh3kf1gx.js";
7
+ } from "./cli-81s63cts.js";
8
8
  export {
9
9
  contentSha2 as contentSha,
10
10
  countLines2 as countLines,
@@ -3,7 +3,7 @@ import {
3
3
  moduleCatalog2,
4
4
  allToolModules2,
5
5
  selectToolModules2
6
- } from "./library-qwkp17zf.js";
6
+ } from "./library-thv5s4bs.js";
7
7
  export {
8
8
  allToolModules2 as allToolModules,
9
9
  moduleCatalog2 as moduleCatalog,
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  openSnapshotStore2
4
- } from "./library-qwkp17zf.js";
4
+ } from "./library-thv5s4bs.js";
5
5
  export {
6
6
  openSnapshotStore2 as openSnapshotStore
7
7
  };
@@ -4,7 +4,7 @@ import {
4
4
  normalizeExport2,
5
5
  contentSha2,
6
6
  countLines2
7
- } from "./library-qwkp17zf.js";
7
+ } from "./library-thv5s4bs.js";
8
8
  export {
9
9
  contentSha2 as contentSha,
10
10
  countLines2 as countLines,