@usex/mikrotik-mcp 5.6.0 → 5.7.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 (35) hide show
  1. package/README.md +39 -20
  2. package/dist/cli.js +48117 -616
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.js +55 -55
  5. package/dist/shared/cli-569n3azr.js +13 -0
  6. package/dist/shared/library-3602qc6e.js +11 -0
  7. package/dist/shared/{cli-gyqfq9j6.js → library-v0tysa18.js} +24044 -23708
  8. package/dist/ui/aaa.html +39 -54
  9. package/dist/ui/connected-devices.html +39 -54
  10. package/dist/ui/dashboard.html +39 -54
  11. package/dist/ui/firewall-audit.html +39 -54
  12. package/dist/ui/firewall.html +40 -55
  13. package/dist/ui/interfaces.html +39 -54
  14. package/dist/ui/observability.html +62 -62
  15. package/dist/ui/records.html +40 -55
  16. package/package.json +19 -18
  17. package/schemas/README.md +1 -1
  18. package/schemas/config.schema.json +79 -0
  19. package/schemas/tool-catalog.json +507 -3
  20. package/schemas/tools/audit_service_contracts.json +7 -0
  21. package/schemas/tools/create_investigation.json +42 -0
  22. package/schemas/tools/create_service_contract.json +53 -0
  23. package/schemas/tools/get_investigation.json +14 -0
  24. package/schemas/tools/inspect_flow_path.json +50 -0
  25. package/schemas/tools/list_client_flow_candidates.json +14 -0
  26. package/schemas/tools/list_investigations.json +7 -0
  27. package/schemas/tools/list_service_contracts.json +7 -0
  28. package/schemas/tools/list_service_probe_targets.json +7 -0
  29. package/schemas/tools/run_service_contract.json +14 -0
  30. package/schemas/tools/service_contract_history.json +14 -0
  31. package/schemas/tools/start_rollout.json +21 -0
  32. package/schemas/tools/trace_round_trip.json +129 -0
  33. package/dist/shared/cli-h41j14aw.js +0 -13
  34. package/dist/shared/library-135yzct0.js +0 -45586
  35. package/dist/shared/library-v52e871r.js +0 -13
package/dist/index.d.ts CHANGED
@@ -421,4 +421,4 @@ declare function getSafeModeManager(deviceName: string): SafeModeManager;
421
421
  declare const allToolModules: ToolModule[];
422
422
  declare const VERSION: string;
423
423
  declare const SERVER_NAME = "mikrotik-mcp";
424
- export { setConfig, resolveDeviceName, registerTools, loadConfig, listDevices, getSafeModeManager, getDevice, getConfig, executeMikrotikCommand, defineTool, createServer, allToolModules, VERSION, ToolModule, ToolContext, SafeModeManager, SERVER_NAME, RegisterableTool, MikrotikConfigSchema, MikrotikConfig, MikroTikSSHClient, DeviceConfigSchema, DeviceConfig };
424
+ export { DeviceConfig, DeviceConfigSchema, MikroTikSSHClient, MikrotikConfig, MikrotikConfigSchema, RegisterableTool, SERVER_NAME, SafeModeManager, ToolContext, ToolModule, VERSION, allToolModules, createServer, defineTool, executeMikrotikCommand, getConfig, getDevice, getSafeModeManager, listDevices, loadConfig, registerTools, resolveDeviceName, setConfig };
package/dist/index.js CHANGED
@@ -1,35 +1,35 @@
1
1
  // @bun
2
2
  import {
3
- DeviceConfigSchema,
4
- LOGO_URL,
5
- MikroTikSSHClient,
6
- MikrotikConfigSchema,
3
+ DeviceConfigSchema2,
4
+ MikrotikConfigSchema2,
5
+ loadConfig2,
6
+ logger,
7
+ MikroTikSSHClient2,
8
+ setConfig2,
9
+ getConfig2,
10
+ listDevices2,
11
+ deviceLabels,
12
+ resolveDeviceName2,
13
+ deviceDirectory,
14
+ getDevice2,
15
+ SafeModeManager2,
16
+ getSafeModeManager2,
17
+ executeMikrotikCommand2,
18
+ defineTool2,
19
+ registerTools2,
7
20
  PROMPTS_DIR,
8
- SERVER_DESCRIPTION,
9
- SERVER_NAME,
10
- SERVER_TITLE,
11
- SafeModeManager,
12
- VERSION,
21
+ registerUiResources,
22
+ VERSION2,
13
23
  WEBSITE_URL,
14
- allToolModules,
15
- defineTool,
16
- deviceDirectory,
17
- deviceLabels,
18
- executeMikrotikCommand,
19
- getConfig,
20
- getDevice,
21
- getSafeModeManager,
22
- listDevices,
23
- loadConfig,
24
+ LOGO_URL,
25
+ SERVER_TITLE,
26
+ SERVER_DESCRIPTION,
27
+ SERVER_NAME2,
24
28
  loadFileCacheSync,
25
- logger,
26
- registerTools,
27
- registerUiResources,
28
- resolveDeviceName,
29
- selectToolModules,
30
- setConfig,
31
- updateSummaryLine
32
- } from "./shared/library-135yzct0.js";
29
+ updateSummaryLine,
30
+ allToolModules2,
31
+ selectToolModules2
32
+ } from "./shared/library-v0tysa18.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";
@@ -231,13 +231,13 @@ task so context is never lost between conversations:
231
231
  3. Prefer specific, reusable facts over transient state. Skip one-off command
232
232
  output; record what will still be true next session.`;
233
233
  function createServer(opts = {}) {
234
- process.title = `Mikrotik MCP Server v${VERSION}`;
235
- const { names, default: defaultDevice } = listDevices();
236
- const readOnly = getConfig().readOnly;
234
+ process.title = `Mikrotik MCP Server v${VERSION2}`;
235
+ const { names, default: defaultDevice } = listDevices2();
236
+ const readOnly = getConfig2().readOnly;
237
237
  let instructions = names.length > 1 ? INSTRUCTIONS + MULTI_DEVICE_INSTRUCTIONS.replace("{{names}}", names.join(", ")).replace("{{default}}", defaultDevice) : INSTRUCTIONS;
238
- if (getConfig().memory.enabled)
238
+ if (getConfig2().memory.enabled)
239
239
  instructions += MEMORY_INSTRUCTIONS;
240
- if (!getConfig().disableUpdateCheck) {
240
+ if (!getConfig2().disableUpdateCheck) {
241
241
  const cached = loadFileCacheSync();
242
242
  if (cached) {
243
243
  const note = updateSummaryLine(cached);
@@ -248,8 +248,8 @@ ${note}`;
248
248
  }
249
249
  }
250
250
  const server = new McpServer({
251
- name: SERVER_NAME,
252
- version: VERSION,
251
+ name: SERVER_NAME2,
252
+ version: VERSION2,
253
253
  websiteUrl: WEBSITE_URL,
254
254
  title: SERVER_TITLE,
255
255
  description: SERVER_DESCRIPTION,
@@ -270,13 +270,13 @@ ${note}`;
270
270
  server.server.sendLoggingMessage({ level, data: message }).catch(() => {});
271
271
  } catch {}
272
272
  });
273
- const toolModules = selectToolModules(getConfig().tools);
274
- const toolCount = registerTools(server, toolModules, {
273
+ const toolModules = selectToolModules2(getConfig2().tools);
274
+ const toolCount = registerTools2(server, toolModules, {
275
275
  sendLog,
276
276
  deviceNames: names,
277
277
  deviceAliases: deviceLabels(),
278
278
  deviceDirectory: deviceDirectory(),
279
- appViews: getConfig().mcp.appViews,
279
+ appViews: getConfig2().mcp.appViews,
280
280
  readOnly
281
281
  });
282
282
  const promptCount = registerPrompts(server, {
@@ -285,7 +285,7 @@ ${note}`;
285
285
  deviceDirectory: deviceDirectory()
286
286
  });
287
287
  const uiViewCount = registerUiResources(server);
288
- installToolPagination(server, getConfig().mcp.toolPageSize);
288
+ installToolPagination(server, getConfig2().mcp.toolPageSize);
289
289
  return { server, toolCount, promptCount, uiViewCount, readOnly };
290
290
  }
291
291
  function installToolPagination(server, pageSize) {
@@ -312,22 +312,22 @@ function installToolPagination(server, pageSize) {
312
312
  });
313
313
  }
314
314
  export {
315
- setConfig,
316
- resolveDeviceName,
317
- registerTools,
318
- loadConfig,
319
- listDevices,
320
- getSafeModeManager,
321
- getDevice,
322
- getConfig,
323
- executeMikrotikCommand,
324
- defineTool,
315
+ DeviceConfigSchema2 as DeviceConfigSchema,
316
+ MikroTikSSHClient2 as MikroTikSSHClient,
317
+ MikrotikConfigSchema2 as MikrotikConfigSchema,
318
+ SERVER_NAME2 as SERVER_NAME,
319
+ SafeModeManager2 as SafeModeManager,
320
+ VERSION2 as VERSION,
321
+ allToolModules2 as allToolModules,
325
322
  createServer,
326
- allToolModules,
327
- VERSION,
328
- SafeModeManager,
329
- SERVER_NAME,
330
- MikrotikConfigSchema,
331
- MikroTikSSHClient,
332
- DeviceConfigSchema
323
+ defineTool2 as defineTool,
324
+ executeMikrotikCommand2 as executeMikrotikCommand,
325
+ getConfig2 as getConfig,
326
+ getDevice2 as getDevice,
327
+ getSafeModeManager2 as getSafeModeManager,
328
+ listDevices2 as listDevices,
329
+ loadConfig2 as loadConfig,
330
+ registerTools2 as registerTools,
331
+ resolveDeviceName2 as resolveDeviceName,
332
+ setConfig2 as setConfig
333
333
  };
@@ -0,0 +1,13 @@
1
+ // @bun
2
+ import {
3
+ moduleCatalog2,
4
+ allToolModules2,
5
+ ALWAYS_ON_MODULES2,
6
+ selectToolModules2
7
+ } from "../cli.js";
8
+ export {
9
+ ALWAYS_ON_MODULES2 as ALWAYS_ON_MODULES,
10
+ allToolModules2 as allToolModules,
11
+ moduleCatalog2 as moduleCatalog,
12
+ selectToolModules2 as selectToolModules
13
+ };
@@ -0,0 +1,11 @@
1
+ // @bun
2
+ import {
3
+ moduleCatalog2,
4
+ allToolModules2,
5
+ selectToolModules2
6
+ } from "./library-v0tysa18.js";
7
+ export {
8
+ allToolModules2 as allToolModules,
9
+ moduleCatalog2 as moduleCatalog,
10
+ selectToolModules2 as selectToolModules
11
+ };