blackveil-dns 2.3.5 → 2.6.2
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/LICENSE +2 -2
- package/README.md +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/stdio.js +105 -62
- package/dist/stdio.js.map +1 -1
- package/package.json +1 -1
package/dist/stdio.js
CHANGED
|
@@ -216,7 +216,8 @@ __export(cache_exports, {
|
|
|
216
216
|
cacheGet: () => cacheGet,
|
|
217
217
|
cacheSet: () => cacheSet,
|
|
218
218
|
cacheSetDeferred: () => cacheSetDeferred,
|
|
219
|
-
runWithCache: () => runWithCache
|
|
219
|
+
runWithCache: () => runWithCache,
|
|
220
|
+
runWithCacheTracked: () => runWithCacheTracked
|
|
220
221
|
});
|
|
221
222
|
async function cacheGet(key, kv) {
|
|
222
223
|
if (kv) {
|
|
@@ -289,6 +290,14 @@ async function runWithCache(key, run, kv, ttlSeconds, skipCache) {
|
|
|
289
290
|
INFLIGHT.set(key, promise);
|
|
290
291
|
return promise;
|
|
291
292
|
}
|
|
293
|
+
async function runWithCacheTracked(key, run, kv, ttlSeconds, skipCache) {
|
|
294
|
+
if (!skipCache) {
|
|
295
|
+
const cached = await cacheGet(key, kv);
|
|
296
|
+
if (cached !== void 0) return { data: cached, cacheStatus: "hit" };
|
|
297
|
+
}
|
|
298
|
+
const data = await runWithCache(key, run, kv, ttlSeconds, true);
|
|
299
|
+
return { data, cacheStatus: "miss" };
|
|
300
|
+
}
|
|
292
301
|
async function pollForResult(key, kv) {
|
|
293
302
|
for (const delay of POLL_DELAYS_MS) {
|
|
294
303
|
await new Promise((r) => setTimeout(r, delay));
|
|
@@ -9684,7 +9693,8 @@ function logToolSuccess(options) {
|
|
|
9684
9693
|
cacheStatus: options.cacheStatus,
|
|
9685
9694
|
country: options.country,
|
|
9686
9695
|
clientType: options.clientType,
|
|
9687
|
-
authTier: options.authTier
|
|
9696
|
+
authTier: options.authTier,
|
|
9697
|
+
keyHash: options.keyHash
|
|
9688
9698
|
});
|
|
9689
9699
|
logEvent({
|
|
9690
9700
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -9707,7 +9717,8 @@ function logToolFailure(options) {
|
|
|
9707
9717
|
cacheStatus: options.cacheStatus,
|
|
9708
9718
|
country: options.country,
|
|
9709
9719
|
clientType: options.clientType,
|
|
9710
|
-
authTier: options.authTier
|
|
9720
|
+
authTier: options.authTier,
|
|
9721
|
+
keyHash: options.keyHash
|
|
9711
9722
|
});
|
|
9712
9723
|
logError(options.error instanceof Error ? options.error : String(options.error), {
|
|
9713
9724
|
tool: options.toolName,
|
|
@@ -9724,6 +9735,15 @@ function mcpError(message) {
|
|
|
9724
9735
|
function mcpText(text) {
|
|
9725
9736
|
return { type: "text", text };
|
|
9726
9737
|
}
|
|
9738
|
+
function buildToolContent(text, structuredData, format) {
|
|
9739
|
+
const content = [mcpText(text)];
|
|
9740
|
+
if (format === "full") {
|
|
9741
|
+
content.push(mcpText(`<!-- STRUCTURED_RESULT
|
|
9742
|
+
${JSON.stringify(structuredData)}
|
|
9743
|
+
STRUCTURED_RESULT -->`));
|
|
9744
|
+
}
|
|
9745
|
+
return content;
|
|
9746
|
+
}
|
|
9727
9747
|
function formatCheckResult(result, format = "full") {
|
|
9728
9748
|
const lines = [];
|
|
9729
9749
|
lines.push(`## ${result.category.toUpperCase()} Check`);
|
|
@@ -10153,7 +10173,8 @@ function handleExplainFindingValidationError(args, durationMs, runtimeOptions) {
|
|
|
10153
10173
|
severity: "warn",
|
|
10154
10174
|
country: runtimeOptions?.country,
|
|
10155
10175
|
clientType: runtimeOptions?.clientType,
|
|
10156
|
-
authTier: runtimeOptions?.authTier
|
|
10176
|
+
authTier: runtimeOptions?.authTier,
|
|
10177
|
+
keyHash: runtimeOptions?.keyHash
|
|
10157
10178
|
});
|
|
10158
10179
|
return buildToolErrorResult(error2.message);
|
|
10159
10180
|
}
|
|
@@ -10179,7 +10200,7 @@ async function handleToolsCall(params, scanCacheKV, runtimeOptions) {
|
|
|
10179
10200
|
if (registeredTool) {
|
|
10180
10201
|
const checkName = registeredTool.cacheKey(validatedArgs);
|
|
10181
10202
|
const cacheKey = `cache:${validDomain}:check:${checkName}`;
|
|
10182
|
-
const result = await
|
|
10203
|
+
const { data: result, cacheStatus } = await runWithCacheTracked(cacheKey, () => registeredTool.execute(validDomain, validatedArgs, runtimeOptions), scanCacheKV, registeredTool.cacheTtlSeconds);
|
|
10183
10204
|
if (result.partial && scanCacheKV) {
|
|
10184
10205
|
try {
|
|
10185
10206
|
await scanCacheKV.delete(cacheKey);
|
|
@@ -10199,9 +10220,11 @@ async function handleToolsCall(params, scanCacheKV, runtimeOptions) {
|
|
|
10199
10220
|
logDetails,
|
|
10200
10221
|
country: runtimeOptions?.country,
|
|
10201
10222
|
clientType: runtimeOptions?.clientType,
|
|
10202
|
-
authTier: runtimeOptions?.authTier
|
|
10223
|
+
authTier: runtimeOptions?.authTier,
|
|
10224
|
+
keyHash: runtimeOptions?.keyHash,
|
|
10225
|
+
cacheStatus
|
|
10203
10226
|
});
|
|
10204
|
-
return { content:
|
|
10227
|
+
return { content: buildToolContent(formatCheckResult(result, effectiveFormat), result, effectiveFormat) };
|
|
10205
10228
|
}
|
|
10206
10229
|
switch (name) {
|
|
10207
10230
|
case "scan_domain": {
|
|
@@ -10222,16 +10245,11 @@ async function handleToolsCall(params, scanCacheKV, runtimeOptions) {
|
|
|
10222
10245
|
severity: "info",
|
|
10223
10246
|
country: runtimeOptions?.country,
|
|
10224
10247
|
clientType: runtimeOptions?.clientType,
|
|
10225
|
-
authTier: runtimeOptions?.authTier
|
|
10248
|
+
authTier: runtimeOptions?.authTier,
|
|
10249
|
+
keyHash: runtimeOptions?.keyHash
|
|
10226
10250
|
});
|
|
10227
|
-
const
|
|
10228
|
-
|
|
10229
|
-
const structured = buildStructuredScanResult(result);
|
|
10230
|
-
content.push(mcpText(`<!-- STRUCTURED_RESULT
|
|
10231
|
-
${JSON.stringify(structured)}
|
|
10232
|
-
STRUCTURED_RESULT -->`));
|
|
10233
|
-
}
|
|
10234
|
-
return { content };
|
|
10251
|
+
const structured = buildStructuredScanResult(result);
|
|
10252
|
+
return { content: buildToolContent(formatScanReport(result, effectiveFormat), structured, effectiveFormat) };
|
|
10235
10253
|
}
|
|
10236
10254
|
case "batch_scan": {
|
|
10237
10255
|
const domains = validatedArgs.domains;
|
|
@@ -10260,9 +10278,10 @@ STRUCTURED_RESULT -->`));
|
|
|
10260
10278
|
severity: "info",
|
|
10261
10279
|
country: runtimeOptions?.country,
|
|
10262
10280
|
clientType: runtimeOptions?.clientType,
|
|
10263
|
-
authTier: runtimeOptions?.authTier
|
|
10281
|
+
authTier: runtimeOptions?.authTier,
|
|
10282
|
+
keyHash: runtimeOptions?.keyHash
|
|
10264
10283
|
});
|
|
10265
|
-
return { content:
|
|
10284
|
+
return { content: buildToolContent(batchText, batchResults, effectiveFormat) };
|
|
10266
10285
|
}
|
|
10267
10286
|
case "compare_domains": {
|
|
10268
10287
|
const domains = validatedArgs.domains;
|
|
@@ -10289,9 +10308,10 @@ STRUCTURED_RESULT -->`));
|
|
|
10289
10308
|
severity: "info",
|
|
10290
10309
|
country: runtimeOptions?.country,
|
|
10291
10310
|
clientType: runtimeOptions?.clientType,
|
|
10292
|
-
authTier: runtimeOptions?.authTier
|
|
10311
|
+
authTier: runtimeOptions?.authTier,
|
|
10312
|
+
keyHash: runtimeOptions?.keyHash
|
|
10293
10313
|
});
|
|
10294
|
-
return { content:
|
|
10314
|
+
return { content: buildToolContent(compareText, compareResults, effectiveFormat) };
|
|
10295
10315
|
}
|
|
10296
10316
|
case "compare_baseline": {
|
|
10297
10317
|
const baseline = extractBaseline(validatedArgs);
|
|
@@ -10310,9 +10330,10 @@ STRUCTURED_RESULT -->`));
|
|
|
10310
10330
|
severity: "info",
|
|
10311
10331
|
country: runtimeOptions?.country,
|
|
10312
10332
|
clientType: runtimeOptions?.clientType,
|
|
10313
|
-
authTier: runtimeOptions?.authTier
|
|
10333
|
+
authTier: runtimeOptions?.authTier,
|
|
10334
|
+
keyHash: runtimeOptions?.keyHash
|
|
10314
10335
|
});
|
|
10315
|
-
return { content:
|
|
10336
|
+
return { content: buildToolContent(formatBaselineResult(result, effectiveFormat), result, effectiveFormat) };
|
|
10316
10337
|
}
|
|
10317
10338
|
case "generate_fix_plan": {
|
|
10318
10339
|
const plan = await generateFixPlan(validDomain, scanCacheKV, runtimeOptions);
|
|
@@ -10329,9 +10350,10 @@ STRUCTURED_RESULT -->`));
|
|
|
10329
10350
|
severity: "info",
|
|
10330
10351
|
country: runtimeOptions?.country,
|
|
10331
10352
|
clientType: runtimeOptions?.clientType,
|
|
10332
|
-
authTier: runtimeOptions?.authTier
|
|
10353
|
+
authTier: runtimeOptions?.authTier,
|
|
10354
|
+
keyHash: runtimeOptions?.keyHash
|
|
10333
10355
|
});
|
|
10334
|
-
return { content:
|
|
10356
|
+
return { content: buildToolContent(formatFixPlan(plan, effectiveFormat), plan, effectiveFormat) };
|
|
10335
10357
|
}
|
|
10336
10358
|
case "generate_spf_record": {
|
|
10337
10359
|
const includeProviders = extractIncludeProviders(validatedArgs);
|
|
@@ -10347,9 +10369,10 @@ STRUCTURED_RESULT -->`));
|
|
|
10347
10369
|
severity: "info",
|
|
10348
10370
|
country: runtimeOptions?.country,
|
|
10349
10371
|
clientType: runtimeOptions?.clientType,
|
|
10350
|
-
authTier: runtimeOptions?.authTier
|
|
10372
|
+
authTier: runtimeOptions?.authTier,
|
|
10373
|
+
keyHash: runtimeOptions?.keyHash
|
|
10351
10374
|
});
|
|
10352
|
-
return { content:
|
|
10375
|
+
return { content: buildToolContent(formatGeneratedRecord(record, effectiveFormat), record, effectiveFormat) };
|
|
10353
10376
|
}
|
|
10354
10377
|
case "generate_dmarc_record": {
|
|
10355
10378
|
const policy = typeof validatedArgs.policy === "string" ? validatedArgs.policy : void 0;
|
|
@@ -10366,9 +10389,10 @@ STRUCTURED_RESULT -->`));
|
|
|
10366
10389
|
severity: "info",
|
|
10367
10390
|
country: runtimeOptions?.country,
|
|
10368
10391
|
clientType: runtimeOptions?.clientType,
|
|
10369
|
-
authTier: runtimeOptions?.authTier
|
|
10392
|
+
authTier: runtimeOptions?.authTier,
|
|
10393
|
+
keyHash: runtimeOptions?.keyHash
|
|
10370
10394
|
});
|
|
10371
|
-
return { content:
|
|
10395
|
+
return { content: buildToolContent(formatGeneratedRecord(record, effectiveFormat), record, effectiveFormat) };
|
|
10372
10396
|
}
|
|
10373
10397
|
case "generate_dkim_config": {
|
|
10374
10398
|
const provider = typeof validatedArgs.provider === "string" ? validatedArgs.provider : void 0;
|
|
@@ -10384,9 +10408,10 @@ STRUCTURED_RESULT -->`));
|
|
|
10384
10408
|
severity: "info",
|
|
10385
10409
|
country: runtimeOptions?.country,
|
|
10386
10410
|
clientType: runtimeOptions?.clientType,
|
|
10387
|
-
authTier: runtimeOptions?.authTier
|
|
10411
|
+
authTier: runtimeOptions?.authTier,
|
|
10412
|
+
keyHash: runtimeOptions?.keyHash
|
|
10388
10413
|
});
|
|
10389
|
-
return { content:
|
|
10414
|
+
return { content: buildToolContent(formatGeneratedRecord(record, effectiveFormat), record, effectiveFormat) };
|
|
10390
10415
|
}
|
|
10391
10416
|
case "generate_mta_sts_policy": {
|
|
10392
10417
|
const mxHosts = extractMxHosts(validatedArgs);
|
|
@@ -10402,9 +10427,10 @@ STRUCTURED_RESULT -->`));
|
|
|
10402
10427
|
severity: "info",
|
|
10403
10428
|
country: runtimeOptions?.country,
|
|
10404
10429
|
clientType: runtimeOptions?.clientType,
|
|
10405
|
-
authTier: runtimeOptions?.authTier
|
|
10430
|
+
authTier: runtimeOptions?.authTier,
|
|
10431
|
+
keyHash: runtimeOptions?.keyHash
|
|
10406
10432
|
});
|
|
10407
|
-
return { content:
|
|
10433
|
+
return { content: buildToolContent(formatGeneratedRecord(record, effectiveFormat), record, effectiveFormat) };
|
|
10408
10434
|
}
|
|
10409
10435
|
case "get_benchmark": {
|
|
10410
10436
|
const profile = typeof validatedArgs.profile === "string" ? validatedArgs.profile : "mail_enabled";
|
|
@@ -10419,9 +10445,10 @@ STRUCTURED_RESULT -->`));
|
|
|
10419
10445
|
severity: "info",
|
|
10420
10446
|
country: runtimeOptions?.country,
|
|
10421
10447
|
clientType: runtimeOptions?.clientType,
|
|
10422
|
-
authTier: runtimeOptions?.authTier
|
|
10448
|
+
authTier: runtimeOptions?.authTier,
|
|
10449
|
+
keyHash: runtimeOptions?.keyHash
|
|
10423
10450
|
});
|
|
10424
|
-
return { content:
|
|
10451
|
+
return { content: buildToolContent(formatBenchmark(result, effectiveFormat), result, effectiveFormat) };
|
|
10425
10452
|
}
|
|
10426
10453
|
case "get_provider_insights": {
|
|
10427
10454
|
const provider = typeof validatedArgs.provider === "string" ? validatedArgs.provider : "";
|
|
@@ -10440,9 +10467,10 @@ STRUCTURED_RESULT -->`));
|
|
|
10440
10467
|
severity: "info",
|
|
10441
10468
|
country: runtimeOptions?.country,
|
|
10442
10469
|
clientType: runtimeOptions?.clientType,
|
|
10443
|
-
authTier: runtimeOptions?.authTier
|
|
10470
|
+
authTier: runtimeOptions?.authTier,
|
|
10471
|
+
keyHash: runtimeOptions?.keyHash
|
|
10444
10472
|
});
|
|
10445
|
-
return { content:
|
|
10473
|
+
return { content: buildToolContent(formatProviderInsights(result, effectiveFormat), result, effectiveFormat) };
|
|
10446
10474
|
}
|
|
10447
10475
|
case "assess_spoofability": {
|
|
10448
10476
|
const result = await assessSpoofability(validDomain, buildDnsOptions(runtimeOptions));
|
|
@@ -10459,9 +10487,10 @@ STRUCTURED_RESULT -->`));
|
|
|
10459
10487
|
severity: "info",
|
|
10460
10488
|
country: runtimeOptions?.country,
|
|
10461
10489
|
clientType: runtimeOptions?.clientType,
|
|
10462
|
-
authTier: runtimeOptions?.authTier
|
|
10490
|
+
authTier: runtimeOptions?.authTier,
|
|
10491
|
+
keyHash: runtimeOptions?.keyHash
|
|
10463
10492
|
});
|
|
10464
|
-
return { content:
|
|
10493
|
+
return { content: buildToolContent(formatSpoofability(result, effectiveFormat), result, effectiveFormat) };
|
|
10465
10494
|
}
|
|
10466
10495
|
case "check_resolver_consistency": {
|
|
10467
10496
|
const recordType = extractRecordType(validatedArgs);
|
|
@@ -10480,9 +10509,10 @@ STRUCTURED_RESULT -->`));
|
|
|
10480
10509
|
severity: "info",
|
|
10481
10510
|
country: runtimeOptions?.country,
|
|
10482
10511
|
clientType: runtimeOptions?.clientType,
|
|
10483
|
-
authTier: runtimeOptions?.authTier
|
|
10512
|
+
authTier: runtimeOptions?.authTier,
|
|
10513
|
+
keyHash: runtimeOptions?.keyHash
|
|
10484
10514
|
});
|
|
10485
|
-
return { content:
|
|
10515
|
+
return { content: buildToolContent(formatResolverConsistency(result, effectiveFormat), result, effectiveFormat) };
|
|
10486
10516
|
}
|
|
10487
10517
|
case "explain_finding": {
|
|
10488
10518
|
let explainArgs;
|
|
@@ -10503,9 +10533,10 @@ STRUCTURED_RESULT -->`));
|
|
|
10503
10533
|
severity: "info",
|
|
10504
10534
|
country: runtimeOptions?.country,
|
|
10505
10535
|
clientType: runtimeOptions?.clientType,
|
|
10506
|
-
authTier: runtimeOptions?.authTier
|
|
10536
|
+
authTier: runtimeOptions?.authTier,
|
|
10537
|
+
keyHash: runtimeOptions?.keyHash
|
|
10507
10538
|
});
|
|
10508
|
-
return { content:
|
|
10539
|
+
return { content: buildToolContent(formatExplanation(result, effectiveFormat), result, effectiveFormat) };
|
|
10509
10540
|
}
|
|
10510
10541
|
case "validate_fix": {
|
|
10511
10542
|
const check = typeof validatedArgs.check === "string" ? validatedArgs.check : "";
|
|
@@ -10524,9 +10555,10 @@ STRUCTURED_RESULT -->`));
|
|
|
10524
10555
|
severity: "info",
|
|
10525
10556
|
country: runtimeOptions?.country,
|
|
10526
10557
|
clientType: runtimeOptions?.clientType,
|
|
10527
|
-
authTier: runtimeOptions?.authTier
|
|
10558
|
+
authTier: runtimeOptions?.authTier,
|
|
10559
|
+
keyHash: runtimeOptions?.keyHash
|
|
10528
10560
|
});
|
|
10529
|
-
return { content:
|
|
10561
|
+
return { content: buildToolContent(formatValidateFix(result, effectiveFormat), result, effectiveFormat) };
|
|
10530
10562
|
}
|
|
10531
10563
|
case "map_supply_chain": {
|
|
10532
10564
|
const result = await mapSupplyChain(validDomain, buildDnsOptions(runtimeOptions));
|
|
@@ -10543,9 +10575,10 @@ STRUCTURED_RESULT -->`));
|
|
|
10543
10575
|
severity: "info",
|
|
10544
10576
|
country: runtimeOptions?.country,
|
|
10545
10577
|
clientType: runtimeOptions?.clientType,
|
|
10546
|
-
authTier: runtimeOptions?.authTier
|
|
10578
|
+
authTier: runtimeOptions?.authTier,
|
|
10579
|
+
keyHash: runtimeOptions?.keyHash
|
|
10547
10580
|
});
|
|
10548
|
-
return { content:
|
|
10581
|
+
return { content: buildToolContent(formatSupplyChain(result, effectiveFormat), result, effectiveFormat) };
|
|
10549
10582
|
}
|
|
10550
10583
|
case "generate_rollout_plan": {
|
|
10551
10584
|
const targetPolicy = typeof validatedArgs.target_policy === "string" ? validatedArgs.target_policy : "reject";
|
|
@@ -10564,9 +10597,10 @@ STRUCTURED_RESULT -->`));
|
|
|
10564
10597
|
severity: "info",
|
|
10565
10598
|
country: runtimeOptions?.country,
|
|
10566
10599
|
clientType: runtimeOptions?.clientType,
|
|
10567
|
-
authTier: runtimeOptions?.authTier
|
|
10600
|
+
authTier: runtimeOptions?.authTier,
|
|
10601
|
+
keyHash: runtimeOptions?.keyHash
|
|
10568
10602
|
});
|
|
10569
|
-
return { content:
|
|
10603
|
+
return { content: buildToolContent(formatRolloutPlan(result, effectiveFormat), result, effectiveFormat) };
|
|
10570
10604
|
}
|
|
10571
10605
|
case "analyze_drift": {
|
|
10572
10606
|
const baselineStr = typeof validatedArgs.baseline === "string" ? validatedArgs.baseline : "";
|
|
@@ -10604,9 +10638,10 @@ STRUCTURED_RESULT -->`));
|
|
|
10604
10638
|
severity: "info",
|
|
10605
10639
|
country: runtimeOptions?.country,
|
|
10606
10640
|
clientType: runtimeOptions?.clientType,
|
|
10607
|
-
authTier: runtimeOptions?.authTier
|
|
10641
|
+
authTier: runtimeOptions?.authTier,
|
|
10642
|
+
keyHash: runtimeOptions?.keyHash
|
|
10608
10643
|
});
|
|
10609
|
-
return { content:
|
|
10644
|
+
return { content: buildToolContent(formatDriftReport(drift, effectiveFormat), drift, effectiveFormat) };
|
|
10610
10645
|
}
|
|
10611
10646
|
case "resolve_spf_chain": {
|
|
10612
10647
|
const result = await resolveSpfChain(validDomain, buildDnsOptions(runtimeOptions));
|
|
@@ -10623,30 +10658,31 @@ STRUCTURED_RESULT -->`));
|
|
|
10623
10658
|
severity: "info",
|
|
10624
10659
|
country: runtimeOptions?.country,
|
|
10625
10660
|
clientType: runtimeOptions?.clientType,
|
|
10626
|
-
authTier: runtimeOptions?.authTier
|
|
10661
|
+
authTier: runtimeOptions?.authTier,
|
|
10662
|
+
keyHash: runtimeOptions?.keyHash
|
|
10627
10663
|
});
|
|
10628
|
-
return { content:
|
|
10664
|
+
return { content: buildToolContent(formatSpfChain(result, effectiveFormat), result, effectiveFormat) };
|
|
10629
10665
|
}
|
|
10630
10666
|
case "discover_subdomains": {
|
|
10631
10667
|
const result = await discoverSubdomains(validDomain, runtimeOptions?.certstream);
|
|
10632
10668
|
logResult = `${result.totalSubdomains} subdomains`;
|
|
10633
10669
|
logDetails = { totalSubdomains: result.totalSubdomains, issues: result.issues.length };
|
|
10634
10670
|
logToolSuccess({ toolName: name, durationMs: Date.now() - startTime, domain, analytics: runtimeOptions?.analytics, status: "pass", logResult, logDetails, severity: "info", country: runtimeOptions?.country, clientType: runtimeOptions?.clientType, authTier: runtimeOptions?.authTier });
|
|
10635
|
-
return { content:
|
|
10671
|
+
return { content: buildToolContent(formatSubdomainDiscovery(result, effectiveFormat), result, effectiveFormat) };
|
|
10636
10672
|
}
|
|
10637
10673
|
case "map_compliance": {
|
|
10638
10674
|
const result = await mapCompliance(validDomain, scanCacheKV, runtimeOptions);
|
|
10639
10675
|
logResult = "mapped";
|
|
10640
10676
|
logDetails = result;
|
|
10641
10677
|
logToolSuccess({ toolName: name, durationMs: Date.now() - startTime, domain, analytics: runtimeOptions?.analytics, status: "pass", logResult, logDetails, severity: "info", country: runtimeOptions?.country, clientType: runtimeOptions?.clientType, authTier: runtimeOptions?.authTier });
|
|
10642
|
-
return { content:
|
|
10678
|
+
return { content: buildToolContent(formatCompliance(result, effectiveFormat), result, effectiveFormat) };
|
|
10643
10679
|
}
|
|
10644
10680
|
case "simulate_attack_paths": {
|
|
10645
10681
|
const result = await simulateAttackPaths(validDomain, buildDnsOptions(runtimeOptions));
|
|
10646
10682
|
logResult = `${result.totalPaths} paths, risk: ${result.overallRisk}`;
|
|
10647
10683
|
logDetails = { totalPaths: result.totalPaths, overallRisk: result.overallRisk };
|
|
10648
10684
|
logToolSuccess({ toolName: name, durationMs: Date.now() - startTime, domain, analytics: runtimeOptions?.analytics, status: result.overallRisk === "low" ? "pass" : "fail", logResult, logDetails, severity: "info", country: runtimeOptions?.country, clientType: runtimeOptions?.clientType, authTier: runtimeOptions?.authTier });
|
|
10649
|
-
return { content:
|
|
10685
|
+
return { content: buildToolContent(formatAttackPaths(result, effectiveFormat), result, effectiveFormat) };
|
|
10650
10686
|
}
|
|
10651
10687
|
default:
|
|
10652
10688
|
logToolFailure({
|
|
@@ -10658,7 +10694,8 @@ STRUCTURED_RESULT -->`));
|
|
|
10658
10694
|
args,
|
|
10659
10695
|
country: runtimeOptions?.country,
|
|
10660
10696
|
clientType: runtimeOptions?.clientType,
|
|
10661
|
-
authTier: runtimeOptions?.authTier
|
|
10697
|
+
authTier: runtimeOptions?.authTier,
|
|
10698
|
+
keyHash: runtimeOptions?.keyHash
|
|
10662
10699
|
});
|
|
10663
10700
|
return buildToolErrorResult(`Unknown tool: ${name}. Call tools/list to see all 44 available tools.`);
|
|
10664
10701
|
}
|
|
@@ -10678,7 +10715,8 @@ STRUCTURED_RESULT -->`));
|
|
|
10678
10715
|
args,
|
|
10679
10716
|
country: runtimeOptions?.country,
|
|
10680
10717
|
clientType: runtimeOptions?.clientType,
|
|
10681
|
-
authTier: runtimeOptions?.authTier
|
|
10718
|
+
authTier: runtimeOptions?.authTier,
|
|
10719
|
+
keyHash: runtimeOptions?.keyHash
|
|
10682
10720
|
});
|
|
10683
10721
|
return {
|
|
10684
10722
|
content: [mcpError(`${name} timed out after ${TOOL_CALL_TIMEOUT_MS / 1e3}s. Try a simpler check or retry \u2014 cached partial results make retries faster.`)],
|
|
@@ -10695,7 +10733,8 @@ STRUCTURED_RESULT -->`));
|
|
|
10695
10733
|
args,
|
|
10696
10734
|
country: runtimeOptions?.country,
|
|
10697
10735
|
clientType: runtimeOptions?.clientType,
|
|
10698
|
-
authTier: runtimeOptions?.authTier
|
|
10736
|
+
authTier: runtimeOptions?.authTier,
|
|
10737
|
+
keyHash: runtimeOptions?.keyHash
|
|
10699
10738
|
});
|
|
10700
10739
|
return buildToolErrorResult(message);
|
|
10701
10740
|
}
|
|
@@ -11207,7 +11246,8 @@ async function dispatchMcpMethod(options) {
|
|
|
11207
11246
|
action: "created",
|
|
11208
11247
|
country: options.country,
|
|
11209
11248
|
clientType: options.clientType,
|
|
11210
|
-
authTier: options.authTier
|
|
11249
|
+
authTier: options.authTier,
|
|
11250
|
+
keyHash: options.keyHash
|
|
11211
11251
|
});
|
|
11212
11252
|
}
|
|
11213
11253
|
return {
|
|
@@ -11253,6 +11293,7 @@ async function dispatchMcpMethod(options) {
|
|
|
11253
11293
|
country: options.country,
|
|
11254
11294
|
clientType: options.clientType,
|
|
11255
11295
|
authTier: options.authTier,
|
|
11296
|
+
keyHash: options.keyHash,
|
|
11256
11297
|
certstream: options.certstream
|
|
11257
11298
|
});
|
|
11258
11299
|
return {
|
|
@@ -11352,7 +11393,8 @@ function emitRequestAnalytics(options, method, status, hasJsonRpcError) {
|
|
|
11352
11393
|
country: options.country,
|
|
11353
11394
|
clientType: options.clientType,
|
|
11354
11395
|
authTier: options.authTier,
|
|
11355
|
-
sessionHash: options.sessionHash
|
|
11396
|
+
sessionHash: options.sessionHash,
|
|
11397
|
+
keyHash: options.keyHash
|
|
11356
11398
|
});
|
|
11357
11399
|
}
|
|
11358
11400
|
async function executeMcpRequest(options) {
|
|
@@ -11585,7 +11627,8 @@ async function executeMcpRequest(options) {
|
|
|
11585
11627
|
method,
|
|
11586
11628
|
country: options.country,
|
|
11587
11629
|
clientType: options.clientType,
|
|
11588
|
-
authTier: options.authTier
|
|
11630
|
+
authTier: options.authTier,
|
|
11631
|
+
keyHash: options.keyHash
|
|
11589
11632
|
});
|
|
11590
11633
|
logEvent({
|
|
11591
11634
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -11809,7 +11852,7 @@ async function executeMcpRequest(options) {
|
|
|
11809
11852
|
}
|
|
11810
11853
|
|
|
11811
11854
|
// src/lib/server-version.ts
|
|
11812
|
-
var SERVER_VERSION = "2.
|
|
11855
|
+
var SERVER_VERSION = "2.6.2";
|
|
11813
11856
|
|
|
11814
11857
|
// src/stdio.ts
|
|
11815
11858
|
function buildNotInitializedError(id) {
|