@usex/mikrotik-mcp 4.24.0 → 5.0.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 (74) hide show
  1. package/README.md +108 -51
  2. package/dist/cli.js +1839 -554
  3. package/dist/index.d.ts +57 -0
  4. package/dist/index.js +1 -1
  5. package/dist/shared/{library-2f8ty72a.js → cli-2dj736ma.js} +34321 -22476
  6. package/dist/shared/{cli-ps0h2mxx.js → cli-vvy7yfyg.js} +1 -1
  7. package/dist/shared/{cli-10wtq3xb.js → library-13dhfdnq.js} +29451 -18574
  8. package/dist/shared/{library-phwm9kqe.js → library-syt5fmtj.js} +1 -1
  9. package/dist/ui/observability.html +70 -62
  10. package/package.json +3 -2
  11. package/policies/baseline.yaml +180 -0
  12. package/prompts/backup-and-document.md +28 -18
  13. package/prompts/build-tunnel-transactionally.md +74 -0
  14. package/prompts/fleet-rollout.md +68 -0
  15. package/prompts/setup-traffic-flow.md +68 -0
  16. package/schemas/README.md +1 -1
  17. package/schemas/config.schema.json +367 -4
  18. package/schemas/tool-catalog.json +3044 -1152
  19. package/schemas/tools/abort_rollout.json +17 -0
  20. package/schemas/tools/abort_transaction.json +17 -0
  21. package/schemas/tools/add_alert_rule.json +45 -0
  22. package/schemas/tools/add_ipv6_route.json +1 -1
  23. package/schemas/tools/add_route.json +3 -2
  24. package/schemas/tools/add_schedule.json +50 -0
  25. package/schemas/tools/add_script.json +1 -1
  26. package/schemas/tools/add_traffic_flow_target.json +36 -0
  27. package/schemas/tools/add_transaction_step.json +21 -0
  28. package/schemas/tools/analyze_flows.json +25 -0
  29. package/schemas/tools/begin_transaction.json +109 -0
  30. package/schemas/tools/block_attacker.json +22 -0
  31. package/schemas/tools/check_policy_snapshot.json +20 -0
  32. package/schemas/tools/commit_transaction.json +13 -0
  33. package/schemas/tools/configure_attack_response.json +12 -0
  34. package/schemas/tools/diff_explanations.json +24 -0
  35. package/schemas/tools/explain_device.json +22 -0
  36. package/schemas/tools/explain_policy_finding.json +17 -0
  37. package/schemas/tools/explain_rule_reachability.json +18 -0
  38. package/schemas/tools/explain_section.json +32 -0
  39. package/schemas/tools/export_policy_report.json +22 -0
  40. package/schemas/tools/flow_top_talkers.json +31 -0
  41. package/schemas/tools/get_alert_history.json +26 -0
  42. package/schemas/tools/get_attack_incident.json +13 -0
  43. package/schemas/tools/get_audit_timeline.json +24 -0
  44. package/schemas/tools/get_device_capabilities.json +7 -0
  45. package/schemas/tools/get_traffic_flow_settings.json +7 -0
  46. package/schemas/tools/list_alert_rules.json +7 -0
  47. package/schemas/tools/list_attack_incidents.json +27 -0
  48. package/schemas/tools/list_attack_responses.json +20 -0
  49. package/schemas/tools/list_policies.json +17 -0
  50. package/schemas/tools/list_schedules.json +12 -0
  51. package/schemas/tools/list_traffic_flow_targets.json +7 -0
  52. package/schemas/tools/mute_alert_rule.json +18 -0
  53. package/schemas/tools/plan_rollout.json +95 -0
  54. package/schemas/tools/refresh_device_capabilities.json +7 -0
  55. package/schemas/tools/remove_alert_rule.json +13 -0
  56. package/schemas/tools/remove_schedule.json +13 -0
  57. package/schemas/tools/remove_traffic_flow_target.json +13 -0
  58. package/schemas/tools/rollout_status.json +12 -0
  59. package/schemas/tools/run_policy_check.json +12 -0
  60. package/schemas/tools/run_schedule_now.json +13 -0
  61. package/schemas/tools/scan_for_attacks.json +21 -0
  62. package/schemas/tools/set_traffic_flow_settings.json +28 -0
  63. package/schemas/tools/simulate_change.json +72 -0
  64. package/schemas/tools/simulate_packet.json +53 -0
  65. package/schemas/tools/simulate_suite.json +71 -0
  66. package/schemas/tools/start_flow_collector.json +14 -0
  67. package/schemas/tools/start_rollout.json +98 -0
  68. package/schemas/tools/stop_flow_collector.json +7 -0
  69. package/schemas/tools/test_alert_channel.json +14 -0
  70. package/schemas/tools/unblock_attacker.json +20 -0
  71. package/schemas/tools/update_alert_rule.json +41 -0
  72. package/schemas/tools/update_route.json +3 -2
  73. package/schemas/tools/validate_policy_file.json +16 -0
  74. package/schemas/tools/verify_transaction.json +13 -0
@@ -0,0 +1,98 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "start_rollout",
4
+ "type": "object",
5
+ "properties": {
6
+ "commands": {
7
+ "anyOf": [
8
+ {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "string"
12
+ }
13
+ },
14
+ {
15
+ "type": "string"
16
+ }
17
+ ],
18
+ "description": "RouterOS commands to apply to every device"
19
+ },
20
+ "targets": {
21
+ "anyOf": [
22
+ {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "string"
26
+ }
27
+ },
28
+ {
29
+ "type": "object",
30
+ "properties": {
31
+ "all": {
32
+ "description": "Every configured, enabled device",
33
+ "type": "boolean"
34
+ },
35
+ "tags": {
36
+ "description": "Devices carrying ALL of these config tags",
37
+ "type": "array",
38
+ "items": {
39
+ "type": "string"
40
+ }
41
+ },
42
+ "versionBelow": {
43
+ "description": "Devices whose RouterOS version is below this, e.g. \"7.14\" (uses the capability cache)",
44
+ "type": "string"
45
+ },
46
+ "exclude": {
47
+ "description": "Device names to leave out — composable",
48
+ "type": "array",
49
+ "items": {
50
+ "type": "string"
51
+ }
52
+ }
53
+ },
54
+ "additionalProperties": false
55
+ }
56
+ ]
57
+ },
58
+ "strategy": {
59
+ "type": "object",
60
+ "properties": {
61
+ "canary": {
62
+ "description": "Devices in wave 1 (default 1)",
63
+ "type": "integer",
64
+ "exclusiveMinimum": 0,
65
+ "maximum": 9007199254740991
66
+ },
67
+ "wavePercent": {
68
+ "description": "Percent of the remaining devices in wave 2 (default 25)",
69
+ "type": "integer",
70
+ "minimum": 1,
71
+ "maximum": 100
72
+ },
73
+ "soakSeconds": {
74
+ "description": "Wait after each wave's health check before continuing (default 30)",
75
+ "type": "integer",
76
+ "minimum": 0,
77
+ "maximum": 9007199254740991
78
+ },
79
+ "onFailure": {
80
+ "description": "What to do when a wave's gate fails (default halt-and-revert)",
81
+ "type": "string",
82
+ "enum": ["halt-and-revert", "halt-and-hold", "continue"]
83
+ }
84
+ },
85
+ "additionalProperties": false
86
+ },
87
+ "label": {
88
+ "type": "string"
89
+ },
90
+ "confirm": {
91
+ "default": false,
92
+ "description": "Must be true to execute — false returns the plan instead",
93
+ "type": "boolean"
94
+ }
95
+ },
96
+ "required": ["commands", "targets", "confirm"],
97
+ "additionalProperties": false
98
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "stop_flow_collector",
4
+ "type": "object",
5
+ "properties": {},
6
+ "additionalProperties": false
7
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "test_alert_channel",
4
+ "type": "object",
5
+ "properties": {
6
+ "channel": {
7
+ "type": "string",
8
+ "enum": ["slack", "discord", "ntfy", "webhook", "mcp"],
9
+ "description": "Which configured channel to test."
10
+ }
11
+ },
12
+ "required": ["channel"],
13
+ "additionalProperties": false
14
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "unblock_attacker",
4
+ "type": "object",
5
+ "properties": {
6
+ "address": {
7
+ "type": "string",
8
+ "description": "The blocked address."
9
+ },
10
+ "devices": {
11
+ "description": "Devices to clear (default: the ones the block was applied to).",
12
+ "type": "array",
13
+ "items": {
14
+ "type": "string"
15
+ }
16
+ }
17
+ },
18
+ "required": ["address"],
19
+ "additionalProperties": false
20
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "update_alert_rule",
4
+ "type": "object",
5
+ "properties": {
6
+ "id": {
7
+ "type": "string",
8
+ "minLength": 1
9
+ },
10
+ "trigger": {
11
+ "description": "Replacement trigger, as a JSON object.",
12
+ "type": "string"
13
+ },
14
+ "channels": {
15
+ "minItems": 1,
16
+ "type": "array",
17
+ "items": {
18
+ "type": "string",
19
+ "enum": ["slack", "discord", "ntfy", "webhook", "mcp"]
20
+ }
21
+ },
22
+ "severity": {
23
+ "type": "string",
24
+ "enum": ["low", "medium", "high", "critical"]
25
+ },
26
+ "description": {
27
+ "type": "string"
28
+ },
29
+ "for": {
30
+ "type": "string"
31
+ },
32
+ "cooldown": {
33
+ "type": "string"
34
+ },
35
+ "enabled": {
36
+ "type": "boolean"
37
+ }
38
+ },
39
+ "required": ["id"],
40
+ "additionalProperties": false
41
+ }
@@ -59,8 +59,9 @@
59
59
  "type": "boolean"
60
60
  },
61
61
  "type": {
62
- "description": "\"unicast\", \"blackhole\", \"unreachable\", or \"prohibit\"",
63
- "type": "string"
62
+ "description": "\"blackhole\" makes the route drop traffic; \"unicast\" turns a blackhole route back into a normal next-hop route.",
63
+ "type": "string",
64
+ "enum": ["unicast", "blackhole"]
64
65
  }
65
66
  },
66
67
  "required": ["route_id"],
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "validate_policy_file",
4
+ "type": "object",
5
+ "properties": {
6
+ "content": {
7
+ "description": "Rule file text (YAML or JSON)",
8
+ "type": "string"
9
+ },
10
+ "path": {
11
+ "description": "Path to a rule file to read instead",
12
+ "type": "string"
13
+ }
14
+ },
15
+ "additionalProperties": false
16
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "verify_transaction",
4
+ "type": "object",
5
+ "properties": {
6
+ "txn_id": {
7
+ "type": "string",
8
+ "description": "Transaction id from begin_transaction"
9
+ }
10
+ },
11
+ "required": ["txn_id"],
12
+ "additionalProperties": false
13
+ }