@usex/mikrotik-mcp 4.10.0 → 4.11.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 CHANGED
@@ -349,6 +349,10 @@ On top of the per-scope tools, the server ships higher-level workflows:
349
349
  CRL, segmentation, DNS) plus an orchestrator. Every audit is read-only; every
350
350
  fix defaults to dry-run and snapshots + Safe-Modes before writing, remediating
351
351
  by explicit `finding_id`.
352
+ - **[Port-Scan Detection](docs/port-scan-detection.md)** — detect (never block) six
353
+ port-scan signatures (psd, Nmap FIN/NULL/Xmas, SYN/FIN, SYN/RST) by tagging the
354
+ source, inside a trust-excluding `detect-portscan` jump-gate; explicit signature
355
+ selection, trust-list pre-flight, snapshot + Safe-Mode apply.
352
356
  - **[Packet Capture Studio](docs/packet-capture.md)** — stream mirrored packets to
353
357
  the host as TZSP, decode them live in the dashboard, and export `.pcap`.
354
358
  - **[Discovery](docs/discovery.md)** — `bun run discover` lists MikroTik devices on
@@ -380,6 +384,7 @@ source** (`bun run gen:schemas`) so they can never drift:
380
384
  | **[Config Snapshots](docs/config-snapshots.md)** | `/export` snapshots + time-travel diff |
381
385
  | **[Firewall Audit](docs/firewall-audit.md)** | Shadowed/broad/dead rules, risk-scored |
382
386
  | **[Security Hardening](docs/security-hardening.md)** | Per-category audit+remediate, fix by finding_id, snapshot + Safe-Mode |
387
+ | **[Port-Scan Detection](docs/port-scan-detection.md)** | Detect+tag six scan signatures behind a trust-excluding jump-gate |
383
388
  | **[Packet Capture Studio](docs/packet-capture.md)** | Live TZSP capture + pcap export |
384
389
  | **[Discovery](docs/discovery.md)** | `bun run discover`, MNDP neighbours, topology map |
385
390
  | **[Config Studio](docs/config-studio.md)** | Edit config in the dashboard with autocomplete |
package/dist/cli.js CHANGED
@@ -106,7 +106,7 @@ import {
106
106
  updateAaaEntity,
107
107
  updateSummaryLine,
108
108
  writeBackup
109
- } from "./shared/cli-vfm5c52q.js";
109
+ } from "./shared/cli-07emrpkr.js";
110
110
 
111
111
  // src/cli.ts
112
112
  import { existsSync as existsSync2 } from "fs";
@@ -1771,6 +1771,29 @@ async function configRoutes(req, url, admin) {
1771
1771
  const rolledBack = admin.rollback(String(body?.pendingId ?? ""));
1772
1772
  return json3({ rolledBack, config: redact(getConfig()) });
1773
1773
  }
1774
+ if (p === "/api/reload" && req.method === "POST") {
1775
+ const body = await readJson(req);
1776
+ if (body?.hard === true) {
1777
+ logger.warn("Dashboard requested a HARD restart \u2014 exiting for supervisor respawn");
1778
+ setTimeout(() => process.exit(0), 300);
1779
+ return json3({
1780
+ ok: true,
1781
+ mode: "restart",
1782
+ note: "Process is exiting now; it only comes back if a supervisor (systemd/docker/pm2/MCP host) respawns it."
1783
+ });
1784
+ }
1785
+ try {
1786
+ const cfg = loadConfig();
1787
+ setConfig(cfg);
1788
+ const devices = Object.keys(cfg.devices);
1789
+ logger.info(`Config reloaded from source \u2014 ${devices.length} device(s): ${devices.join(", ")}`);
1790
+ return json3({ ok: true, mode: "config", count: devices.length, devices });
1791
+ } catch (e) {
1792
+ const error = e instanceof Error ? e.message : String(e);
1793
+ logger.error(`Config reload failed: ${error}`);
1794
+ return json3({ ok: false, error }, 500);
1795
+ }
1796
+ }
1774
1797
  if (p === "/api/config/history" && req.method === "GET") {
1775
1798
  const current = JSON.stringify(redact(getConfig()), null, 2);
1776
1799
  const versions = listVersions().map((v) => {
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  selectToolModules,
30
30
  setConfig,
31
31
  updateSummaryLine
32
- } from "./shared/library-vpg7d53z.js";
32
+ } from "./shared/library-pczgrhdt.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";