@usex/mikrotik-mcp 3.27.0 → 3.29.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 +3862 -3241
- package/dist/index.d.ts +16 -1
- package/dist/index.js +4001 -3380
- package/package.json +1 -1
- package/schemas/README.md +1 -1
- package/schemas/tool-catalog.json +750 -19
- 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/eject_disk.json +13 -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/start_container.json +16 -0
- package/schemas/tools/stop_container.json +16 -0
- package/schemas/tools/update_container.json +64 -0
- package/schemas/tools/upload_file.json +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -182,6 +182,14 @@ declare class MikroTikSSHClient {
|
|
|
182
182
|
run(command: string, opts?: {
|
|
183
183
|
maxMs?: number;
|
|
184
184
|
}): Promise<string>;
|
|
185
|
+
/**
|
|
186
|
+
* Upload a file's bytes to the device over SFTP — the file-transfer subsystem
|
|
187
|
+
* RouterOS exposes on its SSH server. `remotePath` is relative to the SFTP
|
|
188
|
+
* default directory (the flash root), so `config.rsc` lands at the root and
|
|
189
|
+
* appears in `/file`; a path like `disk1/config.rsc` targets external disk.
|
|
190
|
+
* Resolves on success; rejects with a clear reason on failure.
|
|
191
|
+
*/
|
|
192
|
+
uploadFile(remotePath: string, data: Buffer): Promise<void>;
|
|
185
193
|
/** Open a persistent interactive shell channel (used by Safe Mode). */
|
|
186
194
|
shell(opts?: {
|
|
187
195
|
term?: string;
|
|
@@ -215,7 +223,14 @@ declare class SafeModeManager {
|
|
|
215
223
|
private lock;
|
|
216
224
|
/** Open a persistent SSH shell and activate MikroTik Safe Mode. */
|
|
217
225
|
enable(): Promise<string>;
|
|
218
|
-
/**
|
|
226
|
+
/**
|
|
227
|
+
* Execute a command through the safe-mode persistent shell session.
|
|
228
|
+
*
|
|
229
|
+
* If the shell never returns a prompt within the timeout, the interactive
|
|
230
|
+
* Safe-Mode session is wedged — this throws immediately so the caller aborts
|
|
231
|
+
* instead of issuing more commands that would each also burn the full timeout
|
|
232
|
+
* (the cumulative effect of which is a multi-minute "hang" to the MCP client).
|
|
233
|
+
*/
|
|
219
234
|
execute(command: string): Promise<string>;
|
|
220
235
|
/**
|
|
221
236
|
* Send Ctrl+X again to exit Safe Mode and persist all changes. Returns a
|