@usex/mikrotik-mcp 5.15.0 → 5.17.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/README.md +58 -4
- package/dist/cli.js +7008 -4954
- package/dist/index.js +12 -10
- package/dist/shared/cli-51yqa57b.js +25 -0
- package/dist/shared/cli-5rs21zfv.js +13 -0
- package/dist/shared/cli-s1kg75zm.js +7 -0
- package/dist/shared/{library-0ysgbdj6.js → library-85ayxzg9.js} +7657 -6682
- package/dist/shared/library-b7vtz46e.js +7 -0
- package/dist/shared/library-rw1d7smw.js +13 -0
- package/dist/shared/library-xw54vgxq.js +17 -0
- package/dist/shared/{library-pdyv4a32.js → library-y97z4cef.js} +1 -1
- package/dist/ui/client-check.html +80 -0
- package/dist/ui/observability.html +136 -75
- package/package.json +19 -7
- package/schemas/README.md +1 -1
- package/schemas/devtools-manifest.json +11933 -0
- package/schemas/tool-catalog.json +409 -2
- package/schemas/tools/apply_router_migration.json +27 -0
- package/schemas/tools/close_client_check.json +14 -0
- package/schemas/tools/compare_client_checks.json +24 -0
- package/schemas/tools/create_client_check.json +25 -0
- package/schemas/tools/create_support_bundle.json +41 -0
- package/schemas/tools/delete_support_bundle.json +18 -0
- package/schemas/tools/export_support_bundle.json +19 -0
- package/schemas/tools/inspect_router_migration.json +7 -0
- package/schemas/tools/list_client_checks.json +7 -0
- package/schemas/tools/list_router_migrations.json +7 -0
- package/schemas/tools/list_support_bundles.json +7 -0
- package/schemas/tools/preview_router_migration.json +62 -0
- package/schemas/tools/undo_router_migration.json +18 -0
- /package/dist/shared/{cli-p8wka734.js → cli-s5nnez6j.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
updateSummaryLine,
|
|
63
63
|
allToolModules2,
|
|
64
64
|
selectToolModules2
|
|
65
|
-
} from "./shared/library-
|
|
65
|
+
} from "./shared/library-85ayxzg9.js";
|
|
66
66
|
|
|
67
67
|
// node_modules/ajv/dist/compile/codegen/code.js
|
|
68
68
|
var require_code = __commonJS(function(exports) {
|
|
@@ -14998,6 +14998,16 @@ ${TRANSACTION_WORKFLOW}
|
|
|
14998
14998
|
${body}`;
|
|
14999
14999
|
}
|
|
15000
15000
|
|
|
15001
|
+
// src/prompts/compose.ts
|
|
15002
|
+
function substitutePrompt(body, vars) {
|
|
15003
|
+
return body.replace(/\{\{\s*(\w+)\s*\}\}/g, (whole, key) => {
|
|
15004
|
+
const value = Object.hasOwn(vars, key) ? vars[key] : undefined;
|
|
15005
|
+
if (value === undefined || value === null || value === "")
|
|
15006
|
+
return whole;
|
|
15007
|
+
return typeof value === "object" ? JSON.stringify(value) : String(value);
|
|
15008
|
+
});
|
|
15009
|
+
}
|
|
15010
|
+
|
|
15001
15011
|
// src/prompts/index.ts
|
|
15002
15012
|
function parseFrontmatter(raw) {
|
|
15003
15013
|
const match = raw.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);
|
|
@@ -15049,14 +15059,6 @@ function parseFrontmatter(raw) {
|
|
|
15049
15059
|
body: transactionPromptGuidance(meta.name, body.trim())
|
|
15050
15060
|
};
|
|
15051
15061
|
}
|
|
15052
|
-
function substitute(body, vars) {
|
|
15053
|
-
return body.replace(/\{\{\s*(\w+)\s*\}\}/g, (whole, key) => {
|
|
15054
|
-
const v = vars[key];
|
|
15055
|
-
if (v === undefined || v === null || v === "")
|
|
15056
|
-
return whole;
|
|
15057
|
-
return typeof v === "object" ? JSON.stringify(v) : String(v);
|
|
15058
|
-
});
|
|
15059
|
-
}
|
|
15060
15062
|
function deviceArgDescription(directory) {
|
|
15061
15063
|
if (directory && directory.length > 0) {
|
|
15062
15064
|
const rows = directory.map((d) => `\u2022 ${d.key}${d.label && d.label !== d.key ? ` ("${d.label}")` : ""} \u2192 ${d.target}${d.isDefault ? " [default]" : ""}`).join(`
|
|
@@ -15104,7 +15106,7 @@ function registerPrompts(server, opts = {}) {
|
|
|
15104
15106
|
role: "user",
|
|
15105
15107
|
content: {
|
|
15106
15108
|
type: "text",
|
|
15107
|
-
text:
|
|
15109
|
+
text: substitutePrompt(parsed.body, args)
|
|
15108
15110
|
}
|
|
15109
15111
|
}
|
|
15110
15112
|
]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
DEFAULT_DASHBOARD_DB2,
|
|
4
|
+
DEFAULT_SNAPSHOT_DB2,
|
|
5
|
+
DEFAULT_BACKUP_DIR2,
|
|
6
|
+
DEFAULT_CONFIG_HISTORY_DIR2,
|
|
7
|
+
DeviceConfigSchema2,
|
|
8
|
+
ToolFilterSchema2,
|
|
9
|
+
AccessConfigSchema2,
|
|
10
|
+
MikrotikConfigSchema2,
|
|
11
|
+
getConfigSource2,
|
|
12
|
+
loadConfig2
|
|
13
|
+
} from "../cli.js";
|
|
14
|
+
export {
|
|
15
|
+
AccessConfigSchema2 as AccessConfigSchema,
|
|
16
|
+
DEFAULT_BACKUP_DIR2 as DEFAULT_BACKUP_DIR,
|
|
17
|
+
DEFAULT_CONFIG_HISTORY_DIR2 as DEFAULT_CONFIG_HISTORY_DIR,
|
|
18
|
+
DEFAULT_DASHBOARD_DB2 as DEFAULT_DASHBOARD_DB,
|
|
19
|
+
DEFAULT_SNAPSHOT_DB2 as DEFAULT_SNAPSHOT_DB,
|
|
20
|
+
DeviceConfigSchema2 as DeviceConfigSchema,
|
|
21
|
+
MikrotikConfigSchema2 as MikrotikConfigSchema,
|
|
22
|
+
ToolFilterSchema2 as ToolFilterSchema,
|
|
23
|
+
getConfigSource2 as getConfigSource,
|
|
24
|
+
loadConfig2 as loadConfig
|
|
25
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
parseExportMeta2,
|
|
4
|
+
normalizeExport2,
|
|
5
|
+
contentSha2,
|
|
6
|
+
countLines2
|
|
7
|
+
} from "../cli.js";
|
|
8
|
+
export {
|
|
9
|
+
contentSha2 as contentSha,
|
|
10
|
+
countLines2 as countLines,
|
|
11
|
+
normalizeExport2 as normalizeExport,
|
|
12
|
+
parseExportMeta2 as parseExportMeta
|
|
13
|
+
};
|