@usex/mikrotik-mcp 6.9.0 → 6.10.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 +2 -0
- package/dist/cli.js +630 -25
- package/dist/index.js +1 -1
- package/dist/shared/{cli-7en5gay6.js → cli-0srgjr3v.js} +1 -1
- package/dist/shared/{cli-v5tym2a3.js → cli-81s63cts.js} +38 -21
- package/dist/shared/{cli-0ckmf678.js → cli-b4kkd56k.js} +1 -1
- package/dist/shared/{cli-fb8k4p45.js → cli-chcn79z7.js} +1 -1
- package/dist/shared/{cli-amd43kc5.js → cli-twafzgn3.js} +1 -1
- package/dist/shared/{library-j1ptdg4x.js → library-2kk6k7zh.js} +1 -1
- package/dist/shared/{library-5mbnzvye.js → library-f89nvhan.js} +1 -1
- package/dist/shared/{library-znv72s94.js → library-sxxt02xq.js} +1 -1
- package/dist/shared/{library-3hjxj4ph.js → library-thv5s4bs.js} +26 -9
- package/dist/shared/{library-8fxp8mc8.js → library-x66xvb3s.js} +1 -1
- package/dist/ui/observability.html +78 -86
- package/package.json +8 -8
- package/schemas/devtools-manifest.json +1 -1
- package/schemas/tool-catalog.json +1 -1
package/dist/index.js
CHANGED
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
updateSummaryLine,
|
|
71
71
|
allToolModules2,
|
|
72
72
|
selectToolModules2
|
|
73
|
-
} from "./shared/library-
|
|
73
|
+
} from "./shared/library-thv5s4bs.js";
|
|
74
74
|
|
|
75
75
|
// node_modules/ajv/dist/compile/codegen/code.js
|
|
76
76
|
var require_code = __commonJS(function(exports) {
|
|
@@ -78,7 +78,7 @@ __export(exports_regexes, {
|
|
|
78
78
|
idnEmail: () => idnEmail,
|
|
79
79
|
integer: () => integer,
|
|
80
80
|
ipv4: () => ipv4,
|
|
81
|
-
ipv6: () =>
|
|
81
|
+
ipv6: () => ipv62,
|
|
82
82
|
ksuid: () => ksuid,
|
|
83
83
|
lowercase: () => lowercase,
|
|
84
84
|
mac: () => mac,
|
|
@@ -238,7 +238,7 @@ __export(exports_schemas2, {
|
|
|
238
238
|
intersection: () => intersection,
|
|
239
239
|
invertCodec: () => invertCodec,
|
|
240
240
|
ipv4: () => ipv42,
|
|
241
|
-
ipv6: () =>
|
|
241
|
+
ipv6: () => ipv63,
|
|
242
242
|
json: () => json,
|
|
243
243
|
jwt: () => jwt,
|
|
244
244
|
keyof: () => keyof,
|
|
@@ -1369,7 +1369,7 @@ function emoji() {
|
|
|
1369
1369
|
return new RegExp(_emoji, "u");
|
|
1370
1370
|
}
|
|
1371
1371
|
var ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
|
|
1372
|
-
var
|
|
1372
|
+
var ipv62 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
|
|
1373
1373
|
var mac = (delimiter) => {
|
|
1374
1374
|
const escapedDelim = escapeRegex(delimiter ?? ":");
|
|
1375
1375
|
return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
|
|
@@ -2313,7 +2313,7 @@ function isValidIPv6(value) {
|
|
|
2313
2313
|
return canParseURL(`http://[${value}]`);
|
|
2314
2314
|
}
|
|
2315
2315
|
var $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
|
|
2316
|
-
def.pattern ?? (def.pattern =
|
|
2316
|
+
def.pattern ?? (def.pattern = ipv62);
|
|
2317
2317
|
$ZodStringFormat.init(inst, def);
|
|
2318
2318
|
inst._zod.check = (payload) => {
|
|
2319
2319
|
if (!isValidIPv6(payload.value)) {
|
|
@@ -7400,7 +7400,7 @@ var ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => {
|
|
|
7400
7400
|
$ZodIPv6.init(inst, def);
|
|
7401
7401
|
ZodStringFormat.init(inst, def);
|
|
7402
7402
|
});
|
|
7403
|
-
function
|
|
7403
|
+
function ipv63(params) {
|
|
7404
7404
|
return _ipv6(ZodIPv6, params);
|
|
7405
7405
|
}
|
|
7406
7406
|
var ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => {
|
|
@@ -8516,7 +8516,7 @@ var JumpHostSchema = object({
|
|
|
8516
8516
|
});
|
|
8517
8517
|
var DeviceConfigSchema2 = object({
|
|
8518
8518
|
host: string().default("127.0.0.1"),
|
|
8519
|
-
fallbackHosts: array(union([ipv42(),
|
|
8519
|
+
fallbackHosts: array(union([ipv42(), ipv63()])).max(7).optional(),
|
|
8520
8520
|
username: string().default("admin"),
|
|
8521
8521
|
password: string().default(""),
|
|
8522
8522
|
port: exports_coerce.number().int().positive().default(22),
|
|
@@ -8547,10 +8547,10 @@ var DeviceConfigSchema2 = object({
|
|
|
8547
8547
|
});
|
|
8548
8548
|
const canonical = (host) => host.includes(":") ? new URL(`http://[${host}]/`).hostname : host.toLowerCase();
|
|
8549
8549
|
const seen = new Set([
|
|
8550
|
-
device.host.includes(":") && !
|
|
8550
|
+
device.host.includes(":") && !ipv63().safeParse(device.host).success ? device.host : canonical(device.host)
|
|
8551
8551
|
]);
|
|
8552
8552
|
device.fallbackHosts.forEach((host, i) => {
|
|
8553
|
-
if (!union([ipv42(),
|
|
8553
|
+
if (!union([ipv42(), ipv63()]).safeParse(host).success)
|
|
8554
8554
|
return;
|
|
8555
8555
|
const key = canonical(host);
|
|
8556
8556
|
if (seen.has(key))
|
|
@@ -16688,13 +16688,13 @@ async function undoMigration(id, confirm, selected) {
|
|
|
16688
16688
|
throw new Error("Undo lost Safe Mode or exceeded its time budget.");
|
|
16689
16689
|
await checkedRead(item.undo, createContext(undefined, device));
|
|
16690
16690
|
}
|
|
16691
|
-
const beforeTarget = (await import("./cli-
|
|
16692
|
-
const db = await beforeTarget((await import("./cli-
|
|
16691
|
+
const beforeTarget = (await import("./cli-chcn79z7.js")).openSnapshotStore;
|
|
16692
|
+
const db = await beforeTarget((await import("./cli-b4kkd56k.js")).DEFAULT_SNAPSHOT_DB);
|
|
16693
16693
|
try {
|
|
16694
16694
|
const original = db.get(p.snapshots.target);
|
|
16695
16695
|
if (!original)
|
|
16696
16696
|
throw new Error("Original target snapshot unavailable.");
|
|
16697
|
-
const { normalizeExport } = await import("./cli-
|
|
16697
|
+
const { normalizeExport } = await import("./cli-twafzgn3.js");
|
|
16698
16698
|
if (normalizeExport((await migrationInventory(device)).export) !== normalizeExport(original.body))
|
|
16699
16699
|
throw new Error("Target differs from its backup. Undo verification failed.");
|
|
16700
16700
|
} finally {
|
|
@@ -18437,7 +18437,7 @@ function uint(b, o, len) {
|
|
|
18437
18437
|
function ipv43(b, o) {
|
|
18438
18438
|
return `${b[o]}.${b[o + 1]}.${b[o + 2]}.${b[o + 3]}`;
|
|
18439
18439
|
}
|
|
18440
|
-
function
|
|
18440
|
+
function ipv6(b, o) {
|
|
18441
18441
|
const groups = [];
|
|
18442
18442
|
for (let i = 0;i < 8; i++)
|
|
18443
18443
|
groups.push(u16(b, o + i * 2));
|
|
@@ -18619,11 +18619,11 @@ function decodeRecord(buf, offset, template, ctx, warnings) {
|
|
|
18619
18619
|
break;
|
|
18620
18620
|
case IE.IPV6_SRC_ADDR:
|
|
18621
18621
|
if (length >= 16)
|
|
18622
|
-
record.src =
|
|
18622
|
+
record.src = ipv6(buf, start);
|
|
18623
18623
|
break;
|
|
18624
18624
|
case IE.IPV6_DST_ADDR:
|
|
18625
18625
|
if (length >= 16)
|
|
18626
|
-
record.dst =
|
|
18626
|
+
record.dst = ipv6(buf, start);
|
|
18627
18627
|
break;
|
|
18628
18628
|
case IE.INPUT_SNMP:
|
|
18629
18629
|
record.inputIf = uint(buf, start, length);
|
|
@@ -18647,10 +18647,15 @@ function decodeRecord(buf, offset, template, ctx, warnings) {
|
|
|
18647
18647
|
break;
|
|
18648
18648
|
}
|
|
18649
18649
|
}
|
|
18650
|
-
if (record.start === 0 && relativeStart !== undefined)
|
|
18651
|
-
record.
|
|
18652
|
-
|
|
18653
|
-
|
|
18650
|
+
if (ctx.version === 10 && record.start === 0 && record.end === 0 && relativeStart !== undefined && relativeEnd !== undefined) {
|
|
18651
|
+
record.end = ctx.receivedAt;
|
|
18652
|
+
record.start = record.end - Math.max(0, relativeEnd - relativeStart);
|
|
18653
|
+
} else {
|
|
18654
|
+
if (record.start === 0 && relativeStart !== undefined)
|
|
18655
|
+
record.start = bootTime + relativeStart;
|
|
18656
|
+
if (record.end === 0 && relativeEnd !== undefined)
|
|
18657
|
+
record.end = bootTime + relativeEnd;
|
|
18658
|
+
}
|
|
18654
18659
|
if (record.start === 0)
|
|
18655
18660
|
record.start = ctx.unixSecs > 0 ? ctx.unixSecs * 1000 : ctx.receivedAt;
|
|
18656
18661
|
if (record.end === 0)
|
|
@@ -18946,6 +18951,7 @@ class FlowCollector {
|
|
|
18946
18951
|
decoder = new ExporterFlowDecoder;
|
|
18947
18952
|
store = null;
|
|
18948
18953
|
queue = [];
|
|
18954
|
+
subscribers = new Set;
|
|
18949
18955
|
flushTimer = null;
|
|
18950
18956
|
pruneTimer = null;
|
|
18951
18957
|
packets = 0;
|
|
@@ -19038,6 +19044,13 @@ class FlowCollector {
|
|
|
19038
19044
|
this.queue = [];
|
|
19039
19045
|
try {
|
|
19040
19046
|
this.store.insert(batch);
|
|
19047
|
+
for (const subscriber of this.subscribers) {
|
|
19048
|
+
try {
|
|
19049
|
+
subscriber(batch);
|
|
19050
|
+
} catch (e) {
|
|
19051
|
+
logger.warn(`Flow activity subscriber failed: ${String(e)}`);
|
|
19052
|
+
}
|
|
19053
|
+
}
|
|
19041
19054
|
} catch (e) {
|
|
19042
19055
|
this.storageDropped += batch.length;
|
|
19043
19056
|
logger.error(`Flow store insert failed (${batch.length} records dropped): ${String(e)}`);
|
|
@@ -19073,6 +19086,10 @@ class FlowCollector {
|
|
|
19073
19086
|
drain() {
|
|
19074
19087
|
this.flush();
|
|
19075
19088
|
}
|
|
19089
|
+
subscribe(subscriber) {
|
|
19090
|
+
this.subscribers.add(subscriber);
|
|
19091
|
+
return () => this.subscribers.delete(subscriber);
|
|
19092
|
+
}
|
|
19076
19093
|
}
|
|
19077
19094
|
var collector = new FlowCollector;
|
|
19078
19095
|
function getFlowCollector() {
|
|
@@ -28747,7 +28764,7 @@ var cache3 = null;
|
|
|
28747
28764
|
async function gateway() {
|
|
28748
28765
|
if (cache3)
|
|
28749
28766
|
return cache3;
|
|
28750
|
-
const { moduleCatalog } = await import("./cli-
|
|
28767
|
+
const { moduleCatalog } = await import("./cli-0srgjr3v.js");
|
|
28751
28768
|
const forIndex = [];
|
|
28752
28769
|
const byName = new Map;
|
|
28753
28770
|
for (const mod of moduleCatalog) {
|
|
@@ -54406,7 +54423,7 @@ var riskByTool = null;
|
|
|
54406
54423
|
async function riskIndex() {
|
|
54407
54424
|
if (riskByTool)
|
|
54408
54425
|
return riskByTool;
|
|
54409
|
-
const { moduleCatalog } = await import("./cli-
|
|
54426
|
+
const { moduleCatalog } = await import("./cli-0srgjr3v.js");
|
|
54410
54427
|
const index = new Map;
|
|
54411
54428
|
for (const mod of moduleCatalog) {
|
|
54412
54429
|
for (const tool of mod.tools)
|
|
@@ -65577,4 +65594,4 @@ function selectToolModules2(filter = {}, catalog = moduleCatalog2) {
|
|
|
65577
65594
|
}).map((m) => m.tools);
|
|
65578
65595
|
}
|
|
65579
65596
|
|
|
65580
|
-
export { __toESM, __commonJS, clone, normalizeParams, own, installLazyProp, $constructor, parse, parseAsync, safeParse, safeParseAsync, $ZodType, $ZodObject, toJSONSchema, ZodError, string, number, boolean, _null, unknown, array, object, looseObject, union, discriminatedUnion, intersection, record, _enum, literal, ZodOptional, optional, custom, preprocess, datetime, exports_coerce, DEFAULT_DASHBOARD_DB2, DEFAULT_SNAPSHOT_DB2, DEFAULT_BACKUP_DIR2, DEFAULT_CONFIG_HISTORY_DIR2, McpServerSettingsSchema2, DeviceConfigSchema2, DashboardConfigSchema2, MemoryConfigSchema2, SSHConfigSchema2, ToolFilterSchema2, AccessConfigSchema2, MikrotikConfigSchema2, getConfigSource2, loadConfig2, logger, deviceEndpoints, onConfigChanged, setConfig, getConfig, listDevices, deviceLabels, resolveDeviceName, deviceDirectory, DeviceConnectionError, isMacTelnetDevice, createDeviceClient, describeTransport, isPoolEnabled, closeAll, closeDevice, poolStatus, ScopeSchema, RememberSchema, ReviseSchema, RecallSchema, BrowseSchema, openMemoryStore, getMemoryStore, closeMemoryStore, installMemoryStore, Cmd, isEmpty, looksLikeError, commandUnsupported, riskOf, redact, createContext, evaluateAccess, previewAccessPolicy, getAccessPolicy, hasSessionNarrowing, recentDenials, assertDeviceAccess, getSafeModeManager, parseKeyValues, parseRouterosDate, parseSize, parseRecords, parseLeadingNumber, executeMikrotikCommand, isYes, parseExportMeta2, normalizeExport2, contentSha2, countLines2, openSnapshotStore2, captureSnapshot, startRoutingMonitor, stopRoutingMonitor, configureRecorder, getEventStore, subscribe, subscriberCount, startFlightRecorder, stopFlightRecorder, explainUnmet, serializeCapabilities, getCapabilities, peekCapabilities, invalidateCapabilities, redactChannels, setMcpAlertSender, deliver, parseDuration, AlertRuleSchema, isEventTrigger, ruleWarnings, eventMet, initialState, step, isMuted, parseRules, AlertEngine, setAlertEngine, getAlertEngine, registerTools, clientCheckOrigin, noteClientPresence, authorizedCheck, saveCheckRun, clientCheckTools, parseExport, routerMigrationTools, supportBundleTools, addressSetTools, fetchDevices, sampleDeviceTraffic, KID_CONTROL_COUNTERS_COMMAND, parseKidControlOutput, sampleAllTraffic, setDeviceLimits, blockDevice, allowDevice, makeDeviceStatic, setDeviceIp, setDeviceLabel, removeDeviceLease, devicesView, getFlowCollector, topTalkers, conversations, protocolMix, timeline, summarize, flowStore, FlowPathError, investigationTools, homeInternetTools, buildModel, unreachableRules, tracePacket, diffTraces, listSuites, getSuite, saveSuite, serviceContractTools, serviceRoutingTools, flightRecorderTools, recoveryLabTools, roundTripTools, PROMPTS_DIR, PROJECT_ROOT, UI_DIST_DIR, registerUiResources, backupDir, listBackups, readBackup, writeBackup, deleteBackup, renameBackup, createLocalBackup, restoreLocalBackup, isS3Configured, getS3Client, presignExpiresIn, s3Target, splitCommands, buildChangePlan, renderPlan, diffLines, noteDriftResult, analyzeDrift, attributeChanges, CONTAINER_GUIDE_URI, getRouterosContainerGuide, CONTAINER_INSTRUCTIONS, containerPromptGuidance, applyWritesSafely, evaluatePolicies, validatePolicyText, renderReport, rememberReport, currentPolicySet, verificationSchema, verifyPolicy, buildFabricMap, collectFabric, ADVISORY_DATASET_DATE, ADVISORIES, matchAdvisories, collectDeviceFacts, getDeviceGeo, sourceIpLiteral, getIpGeo, ipGeoRoute, startGeoLookups, stopGeoLookups, IpIntelligenceInput, lookupIpIntelligence, DEFAULT_TZSP_PORT, capture, OpenVpnOperationError, disconnectOpenVpnInput, listOpenVpnSessions, disconnectOpenVpnSession, AAA_ENTITIES, listAaaEntity, addAaaEntity, updateAaaEntity, removeAaaEntity, toggleAaaEntity, getRadiusIncoming, setRadiusIncoming, resetRadiusCounters, getUmSettings, setUmSettings, requestAbort, runTransaction, createDeviceExecutor, subscribeTxn, liveTxnUpdates, toRecord, getTxn, dropTxn, listTxns, txnStore, persistTxn, publishRollout, subscribeRollout, liveRolloutUpdates, requestHold, resume, requestAbort2, summarize2, buildTopology, getDeviceStatus, getDeviceNeighbors, getDeviceHistory, probeDevice, startHealthChecks, stopHealthChecks, runRollout, createDeviceExecutor2, toRecord2, getRollout, dropRollout, listRollouts, rolloutStore, persistRollout, auditAdapter, schedulableTools, nextRun, describeCron, diffFindings, describeDiff, worstSeverity, severityCounts, JobSchema, scheduleStore, runJob, armJob, nextRunOf, forgetJob, primeRiskIndex, liveExecutor, runnerOptions, startScheduler, stopScheduler, analyzeDevice, diffNarratives, renderDiff, topologyMermaid, NARRATIVE_SECTIONS, renderNarrative, isPlan, neverBlockSet, isNeverBlock, decide, executePlan, revokeBlock, attackStore, buildGuards, policyFromConfig, sweep, startAttackDetection, stopAttackDetection, VERSION, WEBSITE_URL, LOGO_URL, SERVER_TITLE, SERVER_DESCRIPTION, SERVER_NAME, PKG_META, loadFileCacheSync, fetchLatestRelease, checkForUpdate, updateSummaryLine, fetchAllReleases, scopeConfigDraft, mergeDeviceDraft, mergeConfigDraft, serializeConfig, atomicWrite, validateConfig, getConfigAdmin, VLAN_GUIDE_URI, getVlanSegmentationGuide, VLAN_INSTRUCTIONS, vlanPromptGuidance, buildChannelPlanCommands, reportWeakClients, runCapsmanAudit, steerAlreadyPresent, buildSteerCommands, loadBalancePlan, buildLoadBalanceCommands, buildFtCommands, buildHaCommands, haGuidance, capsmanOverview, fetchCapsmanState, moduleCatalog2, allToolModules2, ALWAYS_ON_MODULES2, selectToolModules2 };
|
|
65597
|
+
export { __toESM, __commonJS, clone, normalizeParams, own, installLazyProp, $constructor, parse, parseAsync, safeParse, safeParseAsync, $ZodType, $ZodObject, toJSONSchema, ZodError, string, number, boolean, _null, unknown, array, object, looseObject, union, discriminatedUnion, intersection, record, _enum, literal, ZodOptional, optional, custom, preprocess, datetime, exports_coerce, DEFAULT_DASHBOARD_DB2, DEFAULT_SNAPSHOT_DB2, DEFAULT_BACKUP_DIR2, DEFAULT_CONFIG_HISTORY_DIR2, McpServerSettingsSchema2, DeviceConfigSchema2, DashboardConfigSchema2, MemoryConfigSchema2, SSHConfigSchema2, ToolFilterSchema2, AccessConfigSchema2, MikrotikConfigSchema2, getConfigSource2, loadConfig2, logger, deviceEndpoints, onConfigChanged, setConfig, getConfig, listDevices, deviceLabels, resolveDeviceName, deviceDirectory, DeviceConnectionError, isMacTelnetDevice, createDeviceClient, describeTransport, isPoolEnabled, closeAll, closeDevice, poolStatus, ScopeSchema, RememberSchema, ReviseSchema, RecallSchema, BrowseSchema, openMemoryStore, getMemoryStore, closeMemoryStore, installMemoryStore, Cmd, isEmpty, looksLikeError, commandUnsupported, riskOf, redact, createContext, evaluateAccess, previewAccessPolicy, getAccessPolicy, hasSessionNarrowing, recentDenials, assertDeviceAccess, getSafeModeManager, parseKeyValues, parseRouterosDate, parseSize, parseRecords, parseLeadingNumber, executeMikrotikCommand, isYes, parseExportMeta2, normalizeExport2, contentSha2, countLines2, openSnapshotStore2, captureSnapshot, startRoutingMonitor, stopRoutingMonitor, configureRecorder, getEventStore, subscribe, subscriberCount, startFlightRecorder, stopFlightRecorder, explainUnmet, serializeCapabilities, getCapabilities, peekCapabilities, invalidateCapabilities, redactChannels, setMcpAlertSender, deliver, parseDuration, AlertRuleSchema, isEventTrigger, ruleWarnings, eventMet, initialState, step, isMuted, parseRules, AlertEngine, setAlertEngine, getAlertEngine, registerTools, clientCheckOrigin, noteClientPresence, authorizedCheck, saveCheckRun, clientCheckTools, parseExport, routerMigrationTools, supportBundleTools, addressSetTools, fetchDevices, sampleDeviceTraffic, KID_CONTROL_COUNTERS_COMMAND, parseKidControlOutput, sampleAllTraffic, setDeviceLimits, blockDevice, allowDevice, makeDeviceStatic, setDeviceIp, setDeviceLabel, removeDeviceLease, devicesView, ipv6, getFlowCollector, topTalkers, conversations, protocolMix, timeline, summarize, flowStore, FlowPathError, investigationTools, homeInternetTools, buildModel, unreachableRules, tracePacket, diffTraces, listSuites, getSuite, saveSuite, serviceContractTools, serviceRoutingTools, flightRecorderTools, recoveryLabTools, roundTripTools, PROMPTS_DIR, PROJECT_ROOT, UI_DIST_DIR, registerUiResources, backupDir, listBackups, readBackup, writeBackup, deleteBackup, renameBackup, createLocalBackup, restoreLocalBackup, isS3Configured, getS3Client, presignExpiresIn, s3Target, splitCommands, buildChangePlan, renderPlan, diffLines, noteDriftResult, analyzeDrift, attributeChanges, CONTAINER_GUIDE_URI, getRouterosContainerGuide, CONTAINER_INSTRUCTIONS, containerPromptGuidance, applyWritesSafely, evaluatePolicies, validatePolicyText, renderReport, rememberReport, currentPolicySet, verificationSchema, verifyPolicy, buildFabricMap, collectFabric, ADVISORY_DATASET_DATE, ADVISORIES, matchAdvisories, collectDeviceFacts, getDeviceGeo, isPublicIpLiteral, sourceIpLiteral, getIpGeo, ipGeoRoute, startGeoLookups, stopGeoLookups, IpIntelligenceInput, lookupIpIntelligence, decodeTzsp, DEFAULT_TZSP_PORT, capture, OpenVpnOperationError, disconnectOpenVpnInput, listOpenVpnSessions, disconnectOpenVpnSession, AAA_ENTITIES, listAaaEntity, addAaaEntity, updateAaaEntity, removeAaaEntity, toggleAaaEntity, getRadiusIncoming, setRadiusIncoming, resetRadiusCounters, getUmSettings, setUmSettings, requestAbort, runTransaction, createDeviceExecutor, subscribeTxn, liveTxnUpdates, toRecord, getTxn, dropTxn, listTxns, txnStore, persistTxn, publishRollout, subscribeRollout, liveRolloutUpdates, requestHold, resume, requestAbort2, summarize2, buildTopology, getDeviceStatus, getDeviceNeighbors, getDeviceHistory, probeDevice, startHealthChecks, stopHealthChecks, runRollout, createDeviceExecutor2, toRecord2, getRollout, dropRollout, listRollouts, rolloutStore, persistRollout, auditAdapter, schedulableTools, nextRun, describeCron, diffFindings, describeDiff, worstSeverity, severityCounts, JobSchema, scheduleStore, runJob, armJob, nextRunOf, forgetJob, primeRiskIndex, liveExecutor, runnerOptions, startScheduler, stopScheduler, analyzeDevice, diffNarratives, renderDiff, topologyMermaid, NARRATIVE_SECTIONS, renderNarrative, isPlan, neverBlockSet, isNeverBlock, decide, executePlan, revokeBlock, attackStore, buildGuards, policyFromConfig, sweep, startAttackDetection, stopAttackDetection, VERSION, WEBSITE_URL, LOGO_URL, SERVER_TITLE, SERVER_DESCRIPTION, SERVER_NAME, PKG_META, loadFileCacheSync, fetchLatestRelease, checkForUpdate, updateSummaryLine, fetchAllReleases, scopeConfigDraft, mergeDeviceDraft, mergeConfigDraft, serializeConfig, atomicWrite, validateConfig, getConfigAdmin, VLAN_GUIDE_URI, getVlanSegmentationGuide, VLAN_INSTRUCTIONS, vlanPromptGuidance, buildChannelPlanCommands, reportWeakClients, runCapsmanAudit, steerAlreadyPresent, buildSteerCommands, loadBalancePlan, buildLoadBalanceCommands, buildFtCommands, buildHaCommands, haGuidance, capsmanOverview, fetchCapsmanState, moduleCatalog2, allToolModules2, ALWAYS_ON_MODULES2, selectToolModules2 };
|
|
@@ -15606,13 +15606,13 @@ async function undoMigration(id, confirm, selected) {
|
|
|
15606
15606
|
throw new Error("Undo lost Safe Mode or exceeded its time budget.");
|
|
15607
15607
|
await checkedRead(item.undo, createContext(undefined, device));
|
|
15608
15608
|
}
|
|
15609
|
-
const beforeTarget = (await import("./library-
|
|
15610
|
-
const db = await beforeTarget((await import("./library-
|
|
15609
|
+
const beforeTarget = (await import("./library-f89nvhan.js")).openSnapshotStore;
|
|
15610
|
+
const db = await beforeTarget((await import("./library-x66xvb3s.js")).DEFAULT_SNAPSHOT_DB);
|
|
15611
15611
|
try {
|
|
15612
15612
|
const original = db.get(p.snapshots.target);
|
|
15613
15613
|
if (!original)
|
|
15614
15614
|
throw new Error("Original target snapshot unavailable.");
|
|
15615
|
-
const { normalizeExport } = await import("./library-
|
|
15615
|
+
const { normalizeExport } = await import("./library-sxxt02xq.js");
|
|
15616
15616
|
if (normalizeExport((await migrationInventory(device)).export) !== normalizeExport(original.body))
|
|
15617
15617
|
throw new Error("Target differs from its backup. Undo verification failed.");
|
|
15618
15618
|
} finally {
|
|
@@ -17547,10 +17547,15 @@ function decodeRecord(buf, offset, template, ctx, warnings) {
|
|
|
17547
17547
|
break;
|
|
17548
17548
|
}
|
|
17549
17549
|
}
|
|
17550
|
-
if (record.start === 0 && relativeStart !== undefined)
|
|
17551
|
-
record.
|
|
17552
|
-
|
|
17553
|
-
|
|
17550
|
+
if (ctx.version === 10 && record.start === 0 && record.end === 0 && relativeStart !== undefined && relativeEnd !== undefined) {
|
|
17551
|
+
record.end = ctx.receivedAt;
|
|
17552
|
+
record.start = record.end - Math.max(0, relativeEnd - relativeStart);
|
|
17553
|
+
} else {
|
|
17554
|
+
if (record.start === 0 && relativeStart !== undefined)
|
|
17555
|
+
record.start = bootTime + relativeStart;
|
|
17556
|
+
if (record.end === 0 && relativeEnd !== undefined)
|
|
17557
|
+
record.end = bootTime + relativeEnd;
|
|
17558
|
+
}
|
|
17554
17559
|
if (record.start === 0)
|
|
17555
17560
|
record.start = ctx.unixSecs > 0 ? ctx.unixSecs * 1000 : ctx.receivedAt;
|
|
17556
17561
|
if (record.end === 0)
|
|
@@ -17846,6 +17851,7 @@ class FlowCollector {
|
|
|
17846
17851
|
decoder = new ExporterFlowDecoder;
|
|
17847
17852
|
store = null;
|
|
17848
17853
|
queue = [];
|
|
17854
|
+
subscribers = new Set;
|
|
17849
17855
|
flushTimer = null;
|
|
17850
17856
|
pruneTimer = null;
|
|
17851
17857
|
packets = 0;
|
|
@@ -17938,6 +17944,13 @@ class FlowCollector {
|
|
|
17938
17944
|
this.queue = [];
|
|
17939
17945
|
try {
|
|
17940
17946
|
this.store.insert(batch);
|
|
17947
|
+
for (const subscriber of this.subscribers) {
|
|
17948
|
+
try {
|
|
17949
|
+
subscriber(batch);
|
|
17950
|
+
} catch (e) {
|
|
17951
|
+
logger.warn(`Flow activity subscriber failed: ${String(e)}`);
|
|
17952
|
+
}
|
|
17953
|
+
}
|
|
17941
17954
|
} catch (e) {
|
|
17942
17955
|
this.storageDropped += batch.length;
|
|
17943
17956
|
logger.error(`Flow store insert failed (${batch.length} records dropped): ${String(e)}`);
|
|
@@ -17973,6 +17986,10 @@ class FlowCollector {
|
|
|
17973
17986
|
drain() {
|
|
17974
17987
|
this.flush();
|
|
17975
17988
|
}
|
|
17989
|
+
subscribe(subscriber) {
|
|
17990
|
+
this.subscribers.add(subscriber);
|
|
17991
|
+
return () => this.subscribers.delete(subscriber);
|
|
17992
|
+
}
|
|
17976
17993
|
}
|
|
17977
17994
|
var collector = new FlowCollector;
|
|
17978
17995
|
function getFlowCollector() {
|
|
@@ -28157,7 +28174,7 @@ var cache3 = null;
|
|
|
28157
28174
|
async function gateway() {
|
|
28158
28175
|
if (cache3)
|
|
28159
28176
|
return cache3;
|
|
28160
|
-
const { moduleCatalog } = await import("./library-
|
|
28177
|
+
const { moduleCatalog } = await import("./library-2kk6k7zh.js");
|
|
28161
28178
|
const forIndex = [];
|
|
28162
28179
|
const byName = new Map;
|
|
28163
28180
|
for (const mod of moduleCatalog) {
|
|
@@ -53387,7 +53404,7 @@ var riskByTool = null;
|
|
|
53387
53404
|
async function riskIndex() {
|
|
53388
53405
|
if (riskByTool)
|
|
53389
53406
|
return riskByTool;
|
|
53390
|
-
const { moduleCatalog } = await import("./library-
|
|
53407
|
+
const { moduleCatalog } = await import("./library-2kk6k7zh.js");
|
|
53391
53408
|
const index = new Map;
|
|
53392
53409
|
for (const mod of moduleCatalog) {
|
|
53393
53410
|
for (const tool of mod.tools)
|