@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/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
- /** Execute a command through the safe-mode persistent shell session. */
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