@usex/mikrotik-mcp 3.26.0 → 3.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +4108 -3407
- package/dist/index.d.ts +35 -18
- package/dist/index.js +4041 -3376
- package/dist/ui/observability.html +41 -41
- package/package.json +1 -1
- package/schemas/README.md +1 -1
- package/schemas/config.schema.json +17 -2
- package/schemas/tool-catalog.json +793 -24
- package/schemas/tools/add_container.json +93 -0
- package/schemas/tools/add_container_env.json +21 -0
- package/schemas/tools/add_container_mount.json +21 -0
- package/schemas/tools/add_disk.json +38 -0
- package/schemas/tools/disable_sstp_client.json +12 -0
- package/schemas/tools/eject_disk.json +13 -0
- package/schemas/tools/enable_sstp_client.json +12 -0
- package/schemas/tools/format_disk.json +18 -6
- package/schemas/tools/get_container.json +16 -0
- package/schemas/tools/get_container_config.json +7 -0
- package/schemas/tools/get_disk.json +3 -3
- package/schemas/tools/list_container_envs.json +12 -0
- package/schemas/tools/list_container_mounts.json +12 -0
- package/schemas/tools/list_containers.json +26 -0
- package/schemas/tools/list_disks.json +20 -1
- package/schemas/tools/remove_container.json +16 -0
- package/schemas/tools/remove_container_env.json +17 -0
- package/schemas/tools/remove_container_mount.json +13 -0
- package/schemas/tools/remove_disk.json +13 -0
- package/schemas/tools/set_container_config.json +32 -0
- package/schemas/tools/set_disk.json +31 -0
- package/schemas/tools/share_disk.json +29 -0
- package/schemas/tools/sign_certificate.json +2 -6
- package/schemas/tools/start_container.json +16 -0
- package/schemas/tools/stop_container.json +16 -0
- package/schemas/tools/update_container.json +64 -0
package/dist/index.d.ts
CHANGED
|
@@ -46,6 +46,35 @@ interface UiLink {
|
|
|
46
46
|
*/
|
|
47
47
|
visibility?: ("model" | "app")[];
|
|
48
48
|
}
|
|
49
|
+
declare function setConfig(cfg: MikrotikConfig): void;
|
|
50
|
+
declare function getConfig(): MikrotikConfig;
|
|
51
|
+
/** Names of every configured device, plus which one is the default. */
|
|
52
|
+
declare function listDevices(): {
|
|
53
|
+
names: string[];
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Resolve a (possibly undefined) device name to a concrete, existing config key.
|
|
58
|
+
* Accepts a config key OR a device's free-text label; falls back to the default.
|
|
59
|
+
*
|
|
60
|
+
* Matching is EXACT (key first, then label) — never fuzzy/substring — so a name
|
|
61
|
+
* like "Ali Home" can never collapse onto a different device such as "home".
|
|
62
|
+
*/
|
|
63
|
+
declare function resolveDeviceName(name?: string): string;
|
|
64
|
+
/** One row of the human-facing device directory shown in the `device` selector. */
|
|
65
|
+
interface DeviceDirectoryEntry {
|
|
66
|
+
key: string;
|
|
67
|
+
label?: string;
|
|
68
|
+
/** Where it connects: `host:port`, or `MAC <addr>` for a MAC-Telnet device. */
|
|
69
|
+
target: string;
|
|
70
|
+
isDefault: boolean;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Return the connection config for a device by key or label (or the default when
|
|
74
|
+
* `name` is undefined). Throws if an explicit name matches neither a key nor a
|
|
75
|
+
* label.
|
|
76
|
+
*/
|
|
77
|
+
declare function getDevice(name?: string): DeviceConfig;
|
|
49
78
|
/** Options threaded into every tool registration. */
|
|
50
79
|
interface RegisterOptions {
|
|
51
80
|
sendLog?: SendLog;
|
|
@@ -59,6 +88,12 @@ interface RegisterOptions {
|
|
|
59
88
|
*/
|
|
60
89
|
deviceAliases?: string[];
|
|
61
90
|
/**
|
|
91
|
+
* Human-facing directory of every device (key → label → target), used to make
|
|
92
|
+
* the `device` selector's description unambiguous so the model can tell
|
|
93
|
+
* similarly-named routers apart and never substitute one for another.
|
|
94
|
+
*/
|
|
95
|
+
deviceDirectory?: DeviceDirectoryEntry[];
|
|
96
|
+
/**
|
|
62
97
|
* Read-only mode: register only tools annotated `readOnlyHint`. Used to
|
|
63
98
|
* withhold every write/destructive tool from a publicly-exposed surface (e.g.
|
|
64
99
|
* a ChatGPT Apps connector) until authentication is in place.
|
|
@@ -110,24 +145,6 @@ declare function defineTool<Shape extends ZodRawShape>(def: ToolDef<Shape>): Reg
|
|
|
110
145
|
type ToolModule = RegisterableTool[];
|
|
111
146
|
/** Register every tool from every module, returning the total count. */
|
|
112
147
|
declare function registerTools(server: McpServer, modules: ToolModule[], opts?: RegisterOptions): number;
|
|
113
|
-
declare function setConfig(cfg: MikrotikConfig): void;
|
|
114
|
-
declare function getConfig(): MikrotikConfig;
|
|
115
|
-
/** Names of every configured device, plus which one is the default. */
|
|
116
|
-
declare function listDevices(): {
|
|
117
|
-
names: string[];
|
|
118
|
-
default: string;
|
|
119
|
-
};
|
|
120
|
-
/**
|
|
121
|
-
* Resolve a (possibly undefined) device name to a concrete, existing config key.
|
|
122
|
-
* Accepts a config key OR a device's free-text label; falls back to the default.
|
|
123
|
-
*/
|
|
124
|
-
declare function resolveDeviceName(name?: string): string;
|
|
125
|
-
/**
|
|
126
|
-
* Return the connection config for a device by key or label (or the default when
|
|
127
|
-
* `name` is undefined). Throws if an explicit name matches neither a key nor a
|
|
128
|
-
* label.
|
|
129
|
-
*/
|
|
130
|
-
declare function getDevice(name?: string): DeviceConfig;
|
|
131
148
|
import { McpServer as McpServer2 } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
132
149
|
interface CreatedServer {
|
|
133
150
|
server: McpServer2;
|