agentseal 0.9.0 → 0.9.1

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.cts CHANGED
@@ -898,7 +898,7 @@ interface AgentDef {
898
898
  declare function getWellKnownConfigs(): AgentDef[];
899
899
  /** Strip // and /* * / comments from JSONC. Preserves URLs inside strings. */
900
900
  declare function stripJsonComments(text: string): string;
901
- interface MCPServerConfig {
901
+ interface MCPServerConfig$1 {
902
902
  name: string;
903
903
  source_file: string;
904
904
  agent_type: string;
@@ -906,7 +906,7 @@ interface MCPServerConfig {
906
906
  }
907
907
  interface DiscoveryResult {
908
908
  agents: AgentConfigResult[];
909
- mcpServers: MCPServerConfig[];
909
+ mcpServers: MCPServerConfig$1[];
910
910
  skillPaths: string[];
911
911
  }
912
912
  /**
@@ -1337,4 +1337,170 @@ declare class Shield {
1337
1337
  stop(): void;
1338
1338
  }
1339
1339
 
1340
- export { type AffectedProbe, type AgentConfigResult, AgentSealError, AgentValidator, type AttackChain, BACKUPS_DIR, BOUNDARY_CATEGORIES, BOUNDARY_WEIGHT, type BaselineChange, type BaselineChangeResult, type BaselineEntry, BaselineStore, Blocklist, COMMON_WORDS, CONSISTENCY_WEIGHT, type ChainStep, type ChatFn, type CompareResult, type CustomFinding, DANGER_CONCEPTS, DATA_EXTRACTION_WEIGHT, DebouncedHandler, type DefenseProfile, type DeltaEntry, DeltaResult, type DiscoveryResult, EXTRACTION_WEIGHT, type EmbedFn, type FixResult, Guard, type GuardOptions, type GuardProgressFn, type GuardReport, GuardVerdict, HistoryStore, INJECTION_WEIGHT, type IgnoreFindingEntry, KNOWN_SERVER_LABELS, LABEL_DESTRUCTIVE, LABEL_PRIVATE, LABEL_PUBLIC_SINK, LABEL_UNTRUSTED, LLMJudge, type LLMJudgeFinding, type LLMJudgeOptions, type LLMJudgeResult, MAX_CONTENT_BYTES, MCPConfigChecker, type MCPFinding, type MCPRuntimeFinding, type MCPRuntimeResult, type MCPServerResult, Notifier, PROFILES, PROJECT_MCP_CONFIGS, PROJECT_SKILL_DIRS, PROJECT_SKILL_FILES, type Probe, type ProbeResult, ProbeTimeoutError, type ProfileConfig, type ProgressFn, type ProjectConfig, ProviderError, QUARANTINE_DIR, type QuarantineEntry, REFUSAL_PHRASES, REPORTS_DIR, type RemediationItem, type RemediationReport, type Rule, RuleEngine, type RuleTest, type RuleTestResult, SEMANTIC_HIGH_THRESHOLD, SEMANTIC_MODERATE_THRESHOLD, SEVERITY_ORDER, SYSTEM_PROMPT, type ScanReport, type ScoreBreakdown, Severity, Shield, type ShieldCallback, type ShieldOptions, type SkillFinding, type SkillResult, SkillScanner, TRANSFORMS, type ToxicFlowResult, TrustLevel, type UnlistedFinding, ValidationError, type ValidatorOptions, Verdict, allActions, analyzeToxicFlows, applyProfile, base64Wrap, buildExtractionProbes, buildInjectionProbes, buildProbe, bulkCheck, caseScramble, classifyPath, classifyServer, collectWatchPaths, compareReports, computeDelta, computeScores, computeSemanticSimilarity, computeVerdict, customFindingFromDict, customFindingToDict, decodeBase64Blocks, decodeHtmlEntities, deltaEntryToDict, deobfuscate, detectCanary, detectChains, detectExtraction, detectExtractionWithSemantic, detectProvider, enrichMcpResults, expandStringConcat, extractPackageSlug, extractSkillName, extractUniquePhrases, fingerprintDefense, fnmatchCase, fromAnthropic, fromEndpoint, fromLangChain, fromOllama, fromOpenAI, fromVercelAI, fuseVerdicts, generateCanary, generateConfigYaml, generateMutations, generateRemediation, generateUnlistedFindings, getFixableSkills, getWellKnownConfigs, guardReportFromDict, hasCritical, hasInvisibleChars, isRefusal, leetspeak, listProfiles, listQuarantine, loadAllCustomProbes, loadCustomProbes, loadGuardReport, loadProjectConfig, loadScanReport, normalizeSkillPath, normalizeUnicode, parseProbeFile, parseResponse, prefixPadding, quarantineSkill, resolveProfile, resolveProjectConfig, restoreSkill, reverseEmbed, rot13Wrap, runGuardInit, saveReport, scanDirectory, scanMachine, scanSkillFile, sha256, shannonEntropy, shouldFail, shouldIgnoreFinding, shouldIgnorePath, slugify, stripBidiControls, stripHtmlComments, stripJsonComments, stripModelPrefix, stripTagChars, stripVariationSelectors, stripZeroWidth, topMCPFinding, topSkillFinding, totalDangers, totalSafe, totalWarnings, truncateContent, trustLevelFromScore, unescapeSequences, unicodeHomoglyphs, unlistedFindingToDict, validateProbe, verdictFromFindings, verdictScore, zeroWidthInject };
1340
+ interface MCPServerConfig {
1341
+ name: string;
1342
+ command: string;
1343
+ args: string[];
1344
+ env: Record<string, string>;
1345
+ sourceFile: string | null;
1346
+ transport: string;
1347
+ url: string | null;
1348
+ packageId: string | null;
1349
+ agents: string[];
1350
+ }
1351
+ interface SkillPath {
1352
+ path: string;
1353
+ platform: string;
1354
+ format: string;
1355
+ }
1356
+ interface CollectedAgent {
1357
+ name: string;
1358
+ agentType: string;
1359
+ configPath: string;
1360
+ mcpServers: MCPServerConfig[];
1361
+ skills: SkillPath[];
1362
+ status: string;
1363
+ }
1364
+ interface Finding {
1365
+ code: string;
1366
+ title: string;
1367
+ description: string;
1368
+ severity: string;
1369
+ source: string | null;
1370
+ serverName: string;
1371
+ agentNames: string[];
1372
+ evidence: string;
1373
+ remediation: string;
1374
+ confidence: number;
1375
+ }
1376
+ interface RegistryData {
1377
+ trustScore: number;
1378
+ findings: Finding[];
1379
+ capabilityLabels: Set<string>;
1380
+ analyzedVersion: string | null;
1381
+ analyzedAt: string | null;
1382
+ tools: string[];
1383
+ }
1384
+ interface MatchResult {
1385
+ server: MCPServerConfig;
1386
+ registryHit: RegistryData | null;
1387
+ needsRuntime: boolean;
1388
+ versionGap: string | null;
1389
+ analysisMethod: string;
1390
+ }
1391
+ interface GuardScanResult {
1392
+ agents: CollectedAgent[];
1393
+ matchResults: MatchResult[];
1394
+ findings: Finding[];
1395
+ machineScore: number;
1396
+ serversScanned: number;
1397
+ fromRegistry: number;
1398
+ failed: number;
1399
+ scanDurationSeconds: number;
1400
+ deepAnalysis: Record<string, unknown> | null;
1401
+ }
1402
+
1403
+ interface GuardEngineOptions {
1404
+ skipRuntime?: boolean;
1405
+ deep?: boolean;
1406
+ deepAll?: boolean;
1407
+ deepTimeout?: number;
1408
+ model?: string;
1409
+ apiKey?: string;
1410
+ baselinePath?: string;
1411
+ cachePath?: string;
1412
+ projectPath?: string;
1413
+ noProcessScan?: boolean;
1414
+ interactive?: boolean;
1415
+ }
1416
+ declare class GuardEngine {
1417
+ private opts;
1418
+ constructor(opts?: GuardEngineOptions);
1419
+ run(): Promise<GuardScanResult>;
1420
+ private deduplicateServers;
1421
+ static ciExitCode(result: GuardScanResult, failOn?: string): number;
1422
+ }
1423
+
1424
+ declare function formatTerminal(result: GuardScanResult): string;
1425
+
1426
+ declare function formatJson(result: GuardScanResult): string;
1427
+
1428
+ declare function formatSarif(result: GuardScanResult): Record<string, unknown>;
1429
+
1430
+ declare function computeMachineScore(opts: {
1431
+ matchResults: MatchResult[];
1432
+ findings: Finding[];
1433
+ }): number;
1434
+
1435
+ declare function collectAll(): CollectedAgent[];
1436
+
1437
+ declare function extractPackageId(server: MCPServerConfig): string | null;
1438
+
1439
+ interface CacheEntry {
1440
+ trust_score?: number;
1441
+ trustScore?: number;
1442
+ findings?: unknown[];
1443
+ capability_labels?: string[];
1444
+ capabilityLabels?: string[];
1445
+ analyzed_version?: string | null;
1446
+ analyzedVersion?: string | null;
1447
+ analyzed_at?: string | null;
1448
+ analyzedAt?: string | null;
1449
+ tools?: string[];
1450
+ }
1451
+ interface CacheData {
1452
+ fetchedAt?: number;
1453
+ fetched_at?: number;
1454
+ updated_at?: number;
1455
+ servers: Record<string, CacheEntry>;
1456
+ }
1457
+ declare class RegistryCache {
1458
+ private cachePath;
1459
+ private baseUrl;
1460
+ private skipFetch;
1461
+ private data;
1462
+ constructor(opts?: {
1463
+ path?: string;
1464
+ baseUrl?: string;
1465
+ skipFetch?: boolean;
1466
+ });
1467
+ private _loadFromDisk;
1468
+ isStale(): boolean;
1469
+ serverCount(): number;
1470
+ fetchRemote(): Promise<number>;
1471
+ ensureFresh(): Promise<void>;
1472
+ lookup(packageId: string | null): RegistryData | null;
1473
+ _setData(data: CacheData): void;
1474
+ }
1475
+
1476
+ declare abstract class Analyzer {
1477
+ abstract name: string;
1478
+ requiresRuntime: boolean;
1479
+ requiresLlm: boolean;
1480
+ abstract analyze(opts: {
1481
+ agents?: CollectedAgent[];
1482
+ matchResults?: MatchResult[];
1483
+ findings?: Finding[];
1484
+ skills?: SkillPath[];
1485
+ toolHashes?: Record<string, Record<string, [string, string]>>;
1486
+ }): Finding[];
1487
+ }
1488
+
1489
+ declare class PatternAnalyzer extends Analyzer {
1490
+ name: string;
1491
+ analyze(opts: {
1492
+ agents?: CollectedAgent[];
1493
+ }): Finding[];
1494
+ private _checkServer;
1495
+ private _finding;
1496
+ private _checkConf001;
1497
+ private _checkConf002;
1498
+ private _checkConf003;
1499
+ private _checkConf004;
1500
+ private _checkConf005;
1501
+ private _checkConf006;
1502
+ private _checkConf007;
1503
+ private _checkConf008;
1504
+ }
1505
+
1506
+ export { type AffectedProbe, type AgentConfigResult, AgentSealError, AgentValidator, type AttackChain, BACKUPS_DIR, BOUNDARY_CATEGORIES, BOUNDARY_WEIGHT, type BaselineChange, type BaselineChangeResult, type BaselineEntry, BaselineStore, Blocklist, COMMON_WORDS, CONSISTENCY_WEIGHT, type ChainStep, type ChatFn, type CollectedAgent, type CompareResult, type CustomFinding, DANGER_CONCEPTS, DATA_EXTRACTION_WEIGHT, DebouncedHandler, type DefenseProfile, type DeltaEntry, DeltaResult, type DiscoveryResult, EXTRACTION_WEIGHT, type EmbedFn, type FixResult, Guard, GuardEngine, type GuardEngineOptions, type Finding as GuardFinding, type MCPServerConfig as GuardMCPServerConfig, type GuardOptions, type GuardProgressFn, type GuardReport, type GuardScanResult, type SkillPath as GuardSkillPath, GuardVerdict, HistoryStore, INJECTION_WEIGHT, type IgnoreFindingEntry, KNOWN_SERVER_LABELS, LABEL_DESTRUCTIVE, LABEL_PRIVATE, LABEL_PUBLIC_SINK, LABEL_UNTRUSTED, LLMJudge, type LLMJudgeFinding, type LLMJudgeOptions, type LLMJudgeResult, MAX_CONTENT_BYTES, MCPConfigChecker, type MCPFinding, type MCPRuntimeFinding, type MCPRuntimeResult, type MCPServerResult, type MatchResult, Notifier, PROFILES, PROJECT_MCP_CONFIGS, PROJECT_SKILL_DIRS, PROJECT_SKILL_FILES, PatternAnalyzer, type Probe, type ProbeResult, ProbeTimeoutError, type ProfileConfig, type ProgressFn, type ProjectConfig, ProviderError, QUARANTINE_DIR, type QuarantineEntry, REFUSAL_PHRASES, REPORTS_DIR, RegistryCache, type RegistryData, type RemediationItem, type RemediationReport, type Rule, RuleEngine, type RuleTest, type RuleTestResult, SEMANTIC_HIGH_THRESHOLD, SEMANTIC_MODERATE_THRESHOLD, SEVERITY_ORDER, SYSTEM_PROMPT, type ScanReport, type ScoreBreakdown, Severity, Shield, type ShieldCallback, type ShieldOptions, type SkillFinding, type SkillResult, SkillScanner, TRANSFORMS, type ToxicFlowResult, TrustLevel, type UnlistedFinding, ValidationError, type ValidatorOptions, Verdict, allActions, analyzeToxicFlows, applyProfile, base64Wrap, buildExtractionProbes, buildInjectionProbes, buildProbe, bulkCheck, caseScramble, classifyPath, classifyServer, collectAll, collectWatchPaths, compareReports, computeDelta, computeMachineScore, computeScores, computeSemanticSimilarity, computeVerdict, customFindingFromDict, customFindingToDict, decodeBase64Blocks, decodeHtmlEntities, deltaEntryToDict, deobfuscate, detectCanary, detectChains, detectExtraction, detectExtractionWithSemantic, detectProvider, enrichMcpResults, expandStringConcat, extractPackageId, extractPackageSlug, extractSkillName, extractUniquePhrases, fingerprintDefense, fnmatchCase, formatJson, formatSarif, formatTerminal, fromAnthropic, fromEndpoint, fromLangChain, fromOllama, fromOpenAI, fromVercelAI, fuseVerdicts, generateCanary, generateConfigYaml, generateMutations, generateRemediation, generateUnlistedFindings, getFixableSkills, getWellKnownConfigs, guardReportFromDict, hasCritical, hasInvisibleChars, isRefusal, leetspeak, listProfiles, listQuarantine, loadAllCustomProbes, loadCustomProbes, loadGuardReport, loadProjectConfig, loadScanReport, normalizeSkillPath, normalizeUnicode, parseProbeFile, parseResponse, prefixPadding, quarantineSkill, resolveProfile, resolveProjectConfig, restoreSkill, reverseEmbed, rot13Wrap, runGuardInit, saveReport, scanDirectory, scanMachine, scanSkillFile, sha256, shannonEntropy, shouldFail, shouldIgnoreFinding, shouldIgnorePath, slugify, stripBidiControls, stripHtmlComments, stripJsonComments, stripModelPrefix, stripTagChars, stripVariationSelectors, stripZeroWidth, topMCPFinding, topSkillFinding, totalDangers, totalSafe, totalWarnings, truncateContent, trustLevelFromScore, unescapeSequences, unicodeHomoglyphs, unlistedFindingToDict, validateProbe, verdictFromFindings, verdictScore, zeroWidthInject };
package/dist/index.d.ts CHANGED
@@ -898,7 +898,7 @@ interface AgentDef {
898
898
  declare function getWellKnownConfigs(): AgentDef[];
899
899
  /** Strip // and /* * / comments from JSONC. Preserves URLs inside strings. */
900
900
  declare function stripJsonComments(text: string): string;
901
- interface MCPServerConfig {
901
+ interface MCPServerConfig$1 {
902
902
  name: string;
903
903
  source_file: string;
904
904
  agent_type: string;
@@ -906,7 +906,7 @@ interface MCPServerConfig {
906
906
  }
907
907
  interface DiscoveryResult {
908
908
  agents: AgentConfigResult[];
909
- mcpServers: MCPServerConfig[];
909
+ mcpServers: MCPServerConfig$1[];
910
910
  skillPaths: string[];
911
911
  }
912
912
  /**
@@ -1337,4 +1337,170 @@ declare class Shield {
1337
1337
  stop(): void;
1338
1338
  }
1339
1339
 
1340
- export { type AffectedProbe, type AgentConfigResult, AgentSealError, AgentValidator, type AttackChain, BACKUPS_DIR, BOUNDARY_CATEGORIES, BOUNDARY_WEIGHT, type BaselineChange, type BaselineChangeResult, type BaselineEntry, BaselineStore, Blocklist, COMMON_WORDS, CONSISTENCY_WEIGHT, type ChainStep, type ChatFn, type CompareResult, type CustomFinding, DANGER_CONCEPTS, DATA_EXTRACTION_WEIGHT, DebouncedHandler, type DefenseProfile, type DeltaEntry, DeltaResult, type DiscoveryResult, EXTRACTION_WEIGHT, type EmbedFn, type FixResult, Guard, type GuardOptions, type GuardProgressFn, type GuardReport, GuardVerdict, HistoryStore, INJECTION_WEIGHT, type IgnoreFindingEntry, KNOWN_SERVER_LABELS, LABEL_DESTRUCTIVE, LABEL_PRIVATE, LABEL_PUBLIC_SINK, LABEL_UNTRUSTED, LLMJudge, type LLMJudgeFinding, type LLMJudgeOptions, type LLMJudgeResult, MAX_CONTENT_BYTES, MCPConfigChecker, type MCPFinding, type MCPRuntimeFinding, type MCPRuntimeResult, type MCPServerResult, Notifier, PROFILES, PROJECT_MCP_CONFIGS, PROJECT_SKILL_DIRS, PROJECT_SKILL_FILES, type Probe, type ProbeResult, ProbeTimeoutError, type ProfileConfig, type ProgressFn, type ProjectConfig, ProviderError, QUARANTINE_DIR, type QuarantineEntry, REFUSAL_PHRASES, REPORTS_DIR, type RemediationItem, type RemediationReport, type Rule, RuleEngine, type RuleTest, type RuleTestResult, SEMANTIC_HIGH_THRESHOLD, SEMANTIC_MODERATE_THRESHOLD, SEVERITY_ORDER, SYSTEM_PROMPT, type ScanReport, type ScoreBreakdown, Severity, Shield, type ShieldCallback, type ShieldOptions, type SkillFinding, type SkillResult, SkillScanner, TRANSFORMS, type ToxicFlowResult, TrustLevel, type UnlistedFinding, ValidationError, type ValidatorOptions, Verdict, allActions, analyzeToxicFlows, applyProfile, base64Wrap, buildExtractionProbes, buildInjectionProbes, buildProbe, bulkCheck, caseScramble, classifyPath, classifyServer, collectWatchPaths, compareReports, computeDelta, computeScores, computeSemanticSimilarity, computeVerdict, customFindingFromDict, customFindingToDict, decodeBase64Blocks, decodeHtmlEntities, deltaEntryToDict, deobfuscate, detectCanary, detectChains, detectExtraction, detectExtractionWithSemantic, detectProvider, enrichMcpResults, expandStringConcat, extractPackageSlug, extractSkillName, extractUniquePhrases, fingerprintDefense, fnmatchCase, fromAnthropic, fromEndpoint, fromLangChain, fromOllama, fromOpenAI, fromVercelAI, fuseVerdicts, generateCanary, generateConfigYaml, generateMutations, generateRemediation, generateUnlistedFindings, getFixableSkills, getWellKnownConfigs, guardReportFromDict, hasCritical, hasInvisibleChars, isRefusal, leetspeak, listProfiles, listQuarantine, loadAllCustomProbes, loadCustomProbes, loadGuardReport, loadProjectConfig, loadScanReport, normalizeSkillPath, normalizeUnicode, parseProbeFile, parseResponse, prefixPadding, quarantineSkill, resolveProfile, resolveProjectConfig, restoreSkill, reverseEmbed, rot13Wrap, runGuardInit, saveReport, scanDirectory, scanMachine, scanSkillFile, sha256, shannonEntropy, shouldFail, shouldIgnoreFinding, shouldIgnorePath, slugify, stripBidiControls, stripHtmlComments, stripJsonComments, stripModelPrefix, stripTagChars, stripVariationSelectors, stripZeroWidth, topMCPFinding, topSkillFinding, totalDangers, totalSafe, totalWarnings, truncateContent, trustLevelFromScore, unescapeSequences, unicodeHomoglyphs, unlistedFindingToDict, validateProbe, verdictFromFindings, verdictScore, zeroWidthInject };
1340
+ interface MCPServerConfig {
1341
+ name: string;
1342
+ command: string;
1343
+ args: string[];
1344
+ env: Record<string, string>;
1345
+ sourceFile: string | null;
1346
+ transport: string;
1347
+ url: string | null;
1348
+ packageId: string | null;
1349
+ agents: string[];
1350
+ }
1351
+ interface SkillPath {
1352
+ path: string;
1353
+ platform: string;
1354
+ format: string;
1355
+ }
1356
+ interface CollectedAgent {
1357
+ name: string;
1358
+ agentType: string;
1359
+ configPath: string;
1360
+ mcpServers: MCPServerConfig[];
1361
+ skills: SkillPath[];
1362
+ status: string;
1363
+ }
1364
+ interface Finding {
1365
+ code: string;
1366
+ title: string;
1367
+ description: string;
1368
+ severity: string;
1369
+ source: string | null;
1370
+ serverName: string;
1371
+ agentNames: string[];
1372
+ evidence: string;
1373
+ remediation: string;
1374
+ confidence: number;
1375
+ }
1376
+ interface RegistryData {
1377
+ trustScore: number;
1378
+ findings: Finding[];
1379
+ capabilityLabels: Set<string>;
1380
+ analyzedVersion: string | null;
1381
+ analyzedAt: string | null;
1382
+ tools: string[];
1383
+ }
1384
+ interface MatchResult {
1385
+ server: MCPServerConfig;
1386
+ registryHit: RegistryData | null;
1387
+ needsRuntime: boolean;
1388
+ versionGap: string | null;
1389
+ analysisMethod: string;
1390
+ }
1391
+ interface GuardScanResult {
1392
+ agents: CollectedAgent[];
1393
+ matchResults: MatchResult[];
1394
+ findings: Finding[];
1395
+ machineScore: number;
1396
+ serversScanned: number;
1397
+ fromRegistry: number;
1398
+ failed: number;
1399
+ scanDurationSeconds: number;
1400
+ deepAnalysis: Record<string, unknown> | null;
1401
+ }
1402
+
1403
+ interface GuardEngineOptions {
1404
+ skipRuntime?: boolean;
1405
+ deep?: boolean;
1406
+ deepAll?: boolean;
1407
+ deepTimeout?: number;
1408
+ model?: string;
1409
+ apiKey?: string;
1410
+ baselinePath?: string;
1411
+ cachePath?: string;
1412
+ projectPath?: string;
1413
+ noProcessScan?: boolean;
1414
+ interactive?: boolean;
1415
+ }
1416
+ declare class GuardEngine {
1417
+ private opts;
1418
+ constructor(opts?: GuardEngineOptions);
1419
+ run(): Promise<GuardScanResult>;
1420
+ private deduplicateServers;
1421
+ static ciExitCode(result: GuardScanResult, failOn?: string): number;
1422
+ }
1423
+
1424
+ declare function formatTerminal(result: GuardScanResult): string;
1425
+
1426
+ declare function formatJson(result: GuardScanResult): string;
1427
+
1428
+ declare function formatSarif(result: GuardScanResult): Record<string, unknown>;
1429
+
1430
+ declare function computeMachineScore(opts: {
1431
+ matchResults: MatchResult[];
1432
+ findings: Finding[];
1433
+ }): number;
1434
+
1435
+ declare function collectAll(): CollectedAgent[];
1436
+
1437
+ declare function extractPackageId(server: MCPServerConfig): string | null;
1438
+
1439
+ interface CacheEntry {
1440
+ trust_score?: number;
1441
+ trustScore?: number;
1442
+ findings?: unknown[];
1443
+ capability_labels?: string[];
1444
+ capabilityLabels?: string[];
1445
+ analyzed_version?: string | null;
1446
+ analyzedVersion?: string | null;
1447
+ analyzed_at?: string | null;
1448
+ analyzedAt?: string | null;
1449
+ tools?: string[];
1450
+ }
1451
+ interface CacheData {
1452
+ fetchedAt?: number;
1453
+ fetched_at?: number;
1454
+ updated_at?: number;
1455
+ servers: Record<string, CacheEntry>;
1456
+ }
1457
+ declare class RegistryCache {
1458
+ private cachePath;
1459
+ private baseUrl;
1460
+ private skipFetch;
1461
+ private data;
1462
+ constructor(opts?: {
1463
+ path?: string;
1464
+ baseUrl?: string;
1465
+ skipFetch?: boolean;
1466
+ });
1467
+ private _loadFromDisk;
1468
+ isStale(): boolean;
1469
+ serverCount(): number;
1470
+ fetchRemote(): Promise<number>;
1471
+ ensureFresh(): Promise<void>;
1472
+ lookup(packageId: string | null): RegistryData | null;
1473
+ _setData(data: CacheData): void;
1474
+ }
1475
+
1476
+ declare abstract class Analyzer {
1477
+ abstract name: string;
1478
+ requiresRuntime: boolean;
1479
+ requiresLlm: boolean;
1480
+ abstract analyze(opts: {
1481
+ agents?: CollectedAgent[];
1482
+ matchResults?: MatchResult[];
1483
+ findings?: Finding[];
1484
+ skills?: SkillPath[];
1485
+ toolHashes?: Record<string, Record<string, [string, string]>>;
1486
+ }): Finding[];
1487
+ }
1488
+
1489
+ declare class PatternAnalyzer extends Analyzer {
1490
+ name: string;
1491
+ analyze(opts: {
1492
+ agents?: CollectedAgent[];
1493
+ }): Finding[];
1494
+ private _checkServer;
1495
+ private _finding;
1496
+ private _checkConf001;
1497
+ private _checkConf002;
1498
+ private _checkConf003;
1499
+ private _checkConf004;
1500
+ private _checkConf005;
1501
+ private _checkConf006;
1502
+ private _checkConf007;
1503
+ private _checkConf008;
1504
+ }
1505
+
1506
+ export { type AffectedProbe, type AgentConfigResult, AgentSealError, AgentValidator, type AttackChain, BACKUPS_DIR, BOUNDARY_CATEGORIES, BOUNDARY_WEIGHT, type BaselineChange, type BaselineChangeResult, type BaselineEntry, BaselineStore, Blocklist, COMMON_WORDS, CONSISTENCY_WEIGHT, type ChainStep, type ChatFn, type CollectedAgent, type CompareResult, type CustomFinding, DANGER_CONCEPTS, DATA_EXTRACTION_WEIGHT, DebouncedHandler, type DefenseProfile, type DeltaEntry, DeltaResult, type DiscoveryResult, EXTRACTION_WEIGHT, type EmbedFn, type FixResult, Guard, GuardEngine, type GuardEngineOptions, type Finding as GuardFinding, type MCPServerConfig as GuardMCPServerConfig, type GuardOptions, type GuardProgressFn, type GuardReport, type GuardScanResult, type SkillPath as GuardSkillPath, GuardVerdict, HistoryStore, INJECTION_WEIGHT, type IgnoreFindingEntry, KNOWN_SERVER_LABELS, LABEL_DESTRUCTIVE, LABEL_PRIVATE, LABEL_PUBLIC_SINK, LABEL_UNTRUSTED, LLMJudge, type LLMJudgeFinding, type LLMJudgeOptions, type LLMJudgeResult, MAX_CONTENT_BYTES, MCPConfigChecker, type MCPFinding, type MCPRuntimeFinding, type MCPRuntimeResult, type MCPServerResult, type MatchResult, Notifier, PROFILES, PROJECT_MCP_CONFIGS, PROJECT_SKILL_DIRS, PROJECT_SKILL_FILES, PatternAnalyzer, type Probe, type ProbeResult, ProbeTimeoutError, type ProfileConfig, type ProgressFn, type ProjectConfig, ProviderError, QUARANTINE_DIR, type QuarantineEntry, REFUSAL_PHRASES, REPORTS_DIR, RegistryCache, type RegistryData, type RemediationItem, type RemediationReport, type Rule, RuleEngine, type RuleTest, type RuleTestResult, SEMANTIC_HIGH_THRESHOLD, SEMANTIC_MODERATE_THRESHOLD, SEVERITY_ORDER, SYSTEM_PROMPT, type ScanReport, type ScoreBreakdown, Severity, Shield, type ShieldCallback, type ShieldOptions, type SkillFinding, type SkillResult, SkillScanner, TRANSFORMS, type ToxicFlowResult, TrustLevel, type UnlistedFinding, ValidationError, type ValidatorOptions, Verdict, allActions, analyzeToxicFlows, applyProfile, base64Wrap, buildExtractionProbes, buildInjectionProbes, buildProbe, bulkCheck, caseScramble, classifyPath, classifyServer, collectAll, collectWatchPaths, compareReports, computeDelta, computeMachineScore, computeScores, computeSemanticSimilarity, computeVerdict, customFindingFromDict, customFindingToDict, decodeBase64Blocks, decodeHtmlEntities, deltaEntryToDict, deobfuscate, detectCanary, detectChains, detectExtraction, detectExtractionWithSemantic, detectProvider, enrichMcpResults, expandStringConcat, extractPackageId, extractPackageSlug, extractSkillName, extractUniquePhrases, fingerprintDefense, fnmatchCase, formatJson, formatSarif, formatTerminal, fromAnthropic, fromEndpoint, fromLangChain, fromOllama, fromOpenAI, fromVercelAI, fuseVerdicts, generateCanary, generateConfigYaml, generateMutations, generateRemediation, generateUnlistedFindings, getFixableSkills, getWellKnownConfigs, guardReportFromDict, hasCritical, hasInvisibleChars, isRefusal, leetspeak, listProfiles, listQuarantine, loadAllCustomProbes, loadCustomProbes, loadGuardReport, loadProjectConfig, loadScanReport, normalizeSkillPath, normalizeUnicode, parseProbeFile, parseResponse, prefixPadding, quarantineSkill, resolveProfile, resolveProjectConfig, restoreSkill, reverseEmbed, rot13Wrap, runGuardInit, saveReport, scanDirectory, scanMachine, scanSkillFile, sha256, shannonEntropy, shouldFail, shouldIgnoreFinding, shouldIgnorePath, slugify, stripBidiControls, stripHtmlComments, stripJsonComments, stripModelPrefix, stripTagChars, stripVariationSelectors, stripZeroWidth, topMCPFinding, topSkillFinding, totalDangers, totalSafe, totalWarnings, truncateContent, trustLevelFromScore, unescapeSequences, unicodeHomoglyphs, unlistedFindingToDict, validateProbe, verdictFromFindings, verdictScore, zeroWidthInject };