@webdecoy/node 0.21.3 → 0.22.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.js CHANGED
@@ -72,6 +72,7 @@ __export(index_exports, {
72
72
  createAgentVerifier: () => createAgentVerifier,
73
73
  createCaptchaEndpoints: () => createCaptchaEndpoints,
74
74
  createClearanceGate: () => createClearanceGate,
75
+ createDetectAndGate: () => createDetectAndGate,
75
76
  createFetchGuard: () => createFetchGuard,
76
77
  deriveAndArm: () => deriveAndArm,
77
78
  deriveKey: () => deriveKey,
@@ -348,6 +349,268 @@ function toWireDetectionRequest(request) {
348
349
  return { ...request, request_metadata: metadata };
349
350
  }
350
351
 
352
+ // src/bots/registry.generated.ts
353
+ var BOT_CATEGORIES = [
354
+ "training_crawler",
355
+ "ai_search_crawler",
356
+ "ai_agent",
357
+ "ai_assistant",
358
+ "search_crawler",
359
+ "seo_crawler",
360
+ "security_scanner",
361
+ "generic_scraper",
362
+ "archiver",
363
+ "fetcher",
364
+ "monitoring",
365
+ "headless_browser",
366
+ "feed_reader",
367
+ "commercial_scraper",
368
+ "none"
369
+ ];
370
+ var BOT_REGISTRY = [
371
+ { id: "reflectionbot", name: "Reflectionbot", category: "training_crawler", organization: "Reflection AI", baseScore: 70, respectsRobots: true, uaPatterns: ["reflectionbot"] },
372
+ { id: "gptbot", name: "GPTBot", category: "training_crawler", organization: "OpenAI", baseScore: 85, respectsRobots: true, uaPatterns: ["gptbot"] },
373
+ { id: "claudebot", name: "ClaudeBot", category: "training_crawler", organization: "Anthropic", baseScore: 85, respectsRobots: true, uaPatterns: ["claudebot"] },
374
+ { id: "anthropic", name: "Anthropic", category: "training_crawler", organization: "Anthropic", baseScore: 85, respectsRobots: true, uaPatterns: ["anthropic-ai"] },
375
+ { id: "claude-web", name: "Claude-Web", category: "training_crawler", organization: "Anthropic", baseScore: 85, respectsRobots: true, uaPatterns: ["claude-web"] },
376
+ { id: "ccbot", name: "CCBot", category: "training_crawler", organization: "Common Crawl", baseScore: 80, respectsRobots: true, uaPatterns: ["ccbot"] },
377
+ { id: "google-extended", name: "Google-Extended", category: "training_crawler", organization: "Google", baseScore: 80, respectsRobots: true, uaPatterns: ["google-extended"] },
378
+ { id: "bytespider", name: "ByteSpider", category: "training_crawler", organization: "ByteDance", baseScore: 75, respectsRobots: false, uaPatterns: ["bytespider"] },
379
+ { id: "amazonbot", name: "Amazonbot", category: "training_crawler", organization: "Amazon", baseScore: 70, respectsRobots: true, uaPatterns: ["amazonbot"] },
380
+ { id: "facebookbot", name: "FacebookBot", category: "training_crawler", organization: "Meta", baseScore: 70, respectsRobots: true, uaPatterns: ["facebookbot"] },
381
+ { id: "meta-externalagent", name: "Meta-ExternalAgent", category: "training_crawler", organization: "Meta", baseScore: 75, respectsRobots: true, uaPatterns: ["meta-externalagent"] },
382
+ { id: "cohere-ai", name: "Cohere", category: "training_crawler", organization: "Cohere", baseScore: 80, respectsRobots: true, uaPatterns: ["cohere-ai", "cohere"] },
383
+ { id: "applebot-extended", name: "Applebot-Extended", category: "training_crawler", organization: "Apple", baseScore: 75, respectsRobots: true, uaPatterns: ["applebot-extended"] },
384
+ { id: "youbot", name: "YouBot", category: "training_crawler", organization: "You.com", baseScore: 75, respectsRobots: true, uaPatterns: ["youbot"] },
385
+ { id: "mistral", name: "MistralBot", category: "training_crawler", organization: "Mistral AI", baseScore: 80, respectsRobots: true, uaPatterns: ["mistralbot"] },
386
+ { id: "gemini", name: "Gemini", category: "training_crawler", organization: "Google", baseScore: 80, respectsRobots: true, uaPatterns: ["gemini"] },
387
+ { id: "ai2bot", name: "AI2Bot", category: "training_crawler", organization: "Allen Institute for AI", baseScore: 75, respectsRobots: true, uaPatterns: ["ai2bot"] },
388
+ { id: "deepseek", name: "DeepSeek", category: "training_crawler", organization: "DeepSeek", baseScore: 80, respectsRobots: true, uaPatterns: ["deepseek"] },
389
+ { id: "qwen", name: "Qwen", category: "training_crawler", organization: "Alibaba", baseScore: 75, respectsRobots: true, uaPatterns: ["qwen"] },
390
+ { id: "webzio", name: "Webz.io", category: "training_crawler", organization: "Webz.io", baseScore: 70, respectsRobots: false, uaPatterns: ["webzio"] },
391
+ { id: "sentibot", name: "Sentibot", category: "training_crawler", organization: "Sentibot", baseScore: 70, respectsRobots: false, uaPatterns: ["sentibot"] },
392
+ { id: "omgili", name: "Omgili", category: "training_crawler", organization: "Webz.io", baseScore: 70, respectsRobots: false, uaPatterns: ["omgili"] },
393
+ { id: "img2dataset", name: "img2dataset", category: "training_crawler", organization: "LAION", baseScore: 75, respectsRobots: false, uaPatterns: ["img2dataset"] },
394
+ { id: "timpibot", name: "Timpibot", category: "training_crawler", organization: "Timpi", baseScore: 70, respectsRobots: true, uaPatterns: ["timpibot"] },
395
+ { id: "velenpublicwebcrawler", name: "VelenPublicWebCrawler", category: "training_crawler", organization: "Velen", baseScore: 70, respectsRobots: false, uaPatterns: ["velenpublicwebcrawler"] },
396
+ { id: "isscyberriskcrawler", name: "ISSCyberRiskCrawler", category: "training_crawler", organization: "ISS", baseScore: 65, respectsRobots: false, uaPatterns: ["isscyberriskcrawler"] },
397
+ { id: "friendlycrawler", name: "FriendlyCrawler", category: "training_crawler", organization: "Unknown", baseScore: 65, respectsRobots: true, uaPatterns: ["friendlycrawler"] },
398
+ { id: "duckassistbot", name: "DuckAssistBot", category: "ai_search_crawler", organization: "DuckDuckGo", baseScore: 65, respectsRobots: true, uaPatterns: ["duckassistbot"] },
399
+ { id: "sofyabot", name: "SofyaBot", category: "ai_search_crawler", organization: "Sofya", baseScore: 65, respectsRobots: true, uaPatterns: ["sofyabot"] },
400
+ { id: "xai-searchbot", name: "xAI-SearchBot", category: "ai_search_crawler", organization: "xAI", baseScore: 70, respectsRobots: true, uaPatterns: ["xai-searchbot"] },
401
+ { id: "linkupbot", name: "LinkupBot", category: "ai_search_crawler", organization: "Linkup", baseScore: 65, respectsRobots: true, uaPatterns: ["linkupbot"] },
402
+ { id: "perplexitybot", name: "PerplexityBot", category: "ai_search_crawler", organization: "Perplexity AI", baseScore: 80, respectsRobots: true, uaPatterns: ["perplexitybot"] },
403
+ { id: "claude-searchbot", name: "Claude-SearchBot", category: "ai_search_crawler", organization: "Anthropic", baseScore: 75, respectsRobots: true, uaPatterns: ["claude-searchbot"] },
404
+ { id: "oai-searchbot", name: "OAI-SearchBot", category: "ai_search_crawler", organization: "OpenAI", baseScore: 80, respectsRobots: true, uaPatterns: ["oai-searchbot"] },
405
+ { id: "searchgpt", name: "SearchGPT", category: "ai_search_crawler", organization: "OpenAI", baseScore: 75, respectsRobots: true, uaPatterns: ["searchgpt"] },
406
+ { id: "phind", name: "Phind", category: "ai_search_crawler", organization: "Phind", baseScore: 70, respectsRobots: true, uaPatterns: ["phind"] },
407
+ { id: "kagi", name: "Kagi", category: "ai_search_crawler", organization: "Kagi", baseScore: 65, respectsRobots: true, uaPatterns: ["kagi"] },
408
+ { id: "exa", name: "Exa", category: "ai_search_crawler", organization: "Exa AI", baseScore: 70, respectsRobots: true, uaPatterns: ["exasearchbot", "exabot"] },
409
+ { id: "shapbot", name: "ShapBot", category: "ai_search_crawler", organization: "Parallel Web Systems", baseScore: 65, respectsRobots: true, uaPatterns: ["shapbot"] },
410
+ { id: "meta-webindexer", name: "Meta-WebIndexer", category: "ai_search_crawler", organization: "Meta", baseScore: 70, respectsRobots: true, uaPatterns: ["meta-webindexer"] },
411
+ { id: "metaphor", name: "Metaphor", category: "ai_search_crawler", organization: "Metaphor", baseScore: 70, respectsRobots: true, uaPatterns: ["metaphor"] },
412
+ { id: "tavily", name: "Tavily", category: "ai_search_crawler", organization: "Tavily", baseScore: 70, respectsRobots: true, uaPatterns: ["tavily"] },
413
+ { id: "brave-search", name: "BraveSearch", category: "ai_search_crawler", organization: "Brave", baseScore: 65, respectsRobots: true, uaPatterns: ["bravesearch"] },
414
+ { id: "neeva", name: "NeevaBot", category: "ai_search_crawler", organization: "Neeva", baseScore: 65, respectsRobots: true, uaPatterns: ["neevabot"] },
415
+ { id: "operator", name: "Operator", category: "ai_agent", organization: "OpenAI", baseScore: 75, respectsRobots: true, uaPatterns: ["operator"] },
416
+ { id: "claude-user", name: "Claude-User", category: "ai_agent", organization: "Anthropic", baseScore: 75, respectsRobots: true, uaPatterns: ["claude-user"] },
417
+ { id: "gemini-user", name: "Gemini-User", category: "ai_agent", organization: "Google", baseScore: 75, respectsRobots: true, uaPatterns: ["gemini-user"] },
418
+ { id: "googleagent-mariner", name: "GoogleAgent-Mariner", category: "ai_agent", organization: "Google", baseScore: 75, respectsRobots: true, uaPatterns: ["googleagent-mariner", "mariner"] },
419
+ { id: "amazon-buyforme", name: "AmazonBuyForMe", category: "ai_agent", organization: "Amazon", baseScore: 70, respectsRobots: true, uaPatterns: ["amazonbuyforme", "buyforme"] },
420
+ { id: "browser-use", name: "Browser-Use", category: "ai_agent", organization: "Open Source", baseScore: 70, respectsRobots: false, uaPatterns: ["browser-use"] },
421
+ { id: "stagehand", name: "Stagehand", category: "ai_agent", organization: "Browserbase", baseScore: 70, respectsRobots: false, uaPatterns: ["stagehand"] },
422
+ { id: "manus-user", name: "Manus-User", category: "ai_agent", organization: "Manus", baseScore: 70, respectsRobots: false, uaPatterns: ["manus-user"] },
423
+ { id: "multion", name: "MultiOn", category: "ai_agent", organization: "MultiOn", baseScore: 70, respectsRobots: false, uaPatterns: ["multion"] },
424
+ { id: "iboubot", name: "IbouBot", category: "search_crawler", organization: "Ibou", baseScore: 30, respectsRobots: true, uaPatterns: ["iboubot"] },
425
+ { id: "googlebot", name: "Googlebot", category: "search_crawler", organization: "Google", baseScore: 30, respectsRobots: true, uaPatterns: ["googlebot"] },
426
+ { id: "google-inspectiontool", name: "Google-InspectionTool", category: "search_crawler", organization: "Google", baseScore: 30, respectsRobots: true, uaPatterns: ["google-inspectiontool"] },
427
+ { id: "bingbot", name: "Bingbot", category: "search_crawler", organization: "Microsoft", baseScore: 30, respectsRobots: true, uaPatterns: ["bingbot"] },
428
+ { id: "msnbot", name: "MSNBot", category: "search_crawler", organization: "Microsoft", baseScore: 30, respectsRobots: true, uaPatterns: ["msnbot"] },
429
+ { id: "yandexbot", name: "YandexBot", category: "search_crawler", organization: "Yandex", baseScore: 35, respectsRobots: true, uaPatterns: ["yandexbot"] },
430
+ { id: "baiduspider", name: "Baiduspider", category: "search_crawler", organization: "Baidu", baseScore: 40, respectsRobots: true, uaPatterns: ["baiduspider"] },
431
+ { id: "petalbot", name: "PetalBot", category: "search_crawler", organization: "Huawei", baseScore: 40, respectsRobots: true, uaPatterns: ["petalbot"] },
432
+ { id: "duckduckbot", name: "DuckDuckBot", category: "search_crawler", organization: "DuckDuckGo", baseScore: 30, respectsRobots: true, uaPatterns: ["duckduckbot"] },
433
+ { id: "applebot", name: "Applebot", category: "search_crawler", organization: "Apple", baseScore: 30, respectsRobots: true, uaPatterns: ["applebot"] },
434
+ { id: "sogou", name: "Sogou Spider", category: "search_crawler", organization: "Sogou", baseScore: 40, respectsRobots: true, uaPatterns: ["sogou"] },
435
+ { id: "qwantify", name: "Qwantify", category: "search_crawler", organization: "Qwant", baseScore: 35, respectsRobots: true, uaPatterns: ["qwantify"] },
436
+ { id: "naver", name: "Naver", category: "search_crawler", organization: "Naver", baseScore: 35, respectsRobots: true, uaPatterns: ["naver", "yeti"] },
437
+ { id: "seznam", name: "SeznamBot", category: "search_crawler", organization: "Seznam", baseScore: 35, respectsRobots: true, uaPatterns: ["seznambot"] },
438
+ { id: "ecosia", name: "Ecosia", category: "search_crawler", organization: "Ecosia", baseScore: 30, respectsRobots: true, uaPatterns: ["ecosia"] },
439
+ { id: "mojeek", name: "MojeekBot", category: "search_crawler", organization: "Mojeek", baseScore: 35, respectsRobots: true, uaPatterns: ["mojeekbot"] },
440
+ { id: "yahoo-slurp", name: "Yahoo! Slurp", category: "search_crawler", organization: "Yahoo", baseScore: 30, respectsRobots: true, uaPatterns: ["slurp"] },
441
+ { id: "ahrefsbot", name: "AhrefsBot", category: "seo_crawler", organization: "Ahrefs", baseScore: 50, respectsRobots: true, uaPatterns: ["ahrefsbot", "ahrefs"] },
442
+ { id: "semrushbot", name: "SemrushBot", category: "seo_crawler", organization: "Semrush", baseScore: 50, respectsRobots: true, uaPatterns: ["semrushbot", "semrush"] },
443
+ { id: "mj12bot", name: "MJ12bot", category: "seo_crawler", organization: "Majestic", baseScore: 50, respectsRobots: true, uaPatterns: ["mj12bot"] },
444
+ { id: "dotbot", name: "DotBot", category: "seo_crawler", organization: "Moz", baseScore: 50, respectsRobots: true, uaPatterns: ["dotbot"] },
445
+ { id: "rogerbot", name: "Rogerbot", category: "seo_crawler", organization: "Moz", baseScore: 50, respectsRobots: true, uaPatterns: ["rogerbot"] },
446
+ { id: "screaming-frog", name: "Screaming Frog", category: "seo_crawler", organization: "Screaming Frog", baseScore: 55, respectsRobots: true, uaPatterns: ["screaming frog"] },
447
+ { id: "sitebulb", name: "Sitebulb", category: "seo_crawler", organization: "Sitebulb", baseScore: 55, respectsRobots: true, uaPatterns: ["sitebulb"] },
448
+ { id: "deepcrawl", name: "DeepCrawl", category: "seo_crawler", organization: "Lumar", baseScore: 50, respectsRobots: true, uaPatterns: ["deepcrawl"] },
449
+ { id: "oncrawl", name: "OnCrawl", category: "seo_crawler", organization: "OnCrawl", baseScore: 50, respectsRobots: true, uaPatterns: ["oncrawl"] },
450
+ { id: "botify", name: "Botify", category: "seo_crawler", organization: "Botify", baseScore: 50, respectsRobots: true, uaPatterns: ["botify"] },
451
+ { id: "contentking", name: "ContentKing", category: "seo_crawler", organization: "ContentKing", baseScore: 50, respectsRobots: true, uaPatterns: ["contentking"] },
452
+ { id: "sistrix", name: "SISTRIX", category: "seo_crawler", organization: "SISTRIX", baseScore: 50, respectsRobots: true, uaPatterns: ["sistrix"] },
453
+ { id: "serpstat", name: "Serpstat", category: "seo_crawler", organization: "Serpstat", baseScore: 50, respectsRobots: true, uaPatterns: ["serpstat"] },
454
+ { id: "spyfu", name: "SpyFu", category: "seo_crawler", organization: "SpyFu", baseScore: 50, respectsRobots: true, uaPatterns: ["spyfu"] },
455
+ { id: "nessus", name: "Nessus", category: "security_scanner", organization: "Tenable", baseScore: 70, respectsRobots: false, uaPatterns: ["nessus"] },
456
+ { id: "qualys", name: "Qualys", category: "security_scanner", organization: "Qualys", baseScore: 70, respectsRobots: false, uaPatterns: ["qualys"] },
457
+ { id: "shodan", name: "Shodan", category: "security_scanner", organization: "Shodan", baseScore: 75, respectsRobots: false, uaPatterns: ["shodan"] },
458
+ { id: "censys", name: "Censys", category: "security_scanner", organization: "Censys", baseScore: 75, respectsRobots: false, uaPatterns: ["censys"] },
459
+ { id: "nmap", name: "Nmap", category: "security_scanner", organization: "Open Source", baseScore: 70, respectsRobots: false, uaPatterns: ["nmap"] },
460
+ { id: "zap", name: "OWASP ZAP", category: "security_scanner", organization: "OWASP", baseScore: 70, respectsRobots: false, uaPatterns: ["zap/"] },
461
+ { id: "burp", name: "Burp Suite", category: "security_scanner", organization: "PortSwigger", baseScore: 70, respectsRobots: false, uaPatterns: ["burp"] },
462
+ { id: "nikto", name: "Nikto", category: "security_scanner", organization: "Open Source", baseScore: 70, respectsRobots: false, uaPatterns: ["nikto"] },
463
+ { id: "nuclei", name: "Nuclei", category: "security_scanner", organization: "ProjectDiscovery", baseScore: 70, respectsRobots: false, uaPatterns: ["nuclei"] },
464
+ { id: "acunetix", name: "Acunetix", category: "security_scanner", organization: "Invicti", baseScore: 70, respectsRobots: false, uaPatterns: ["acunetix"] },
465
+ { id: "netsparker", name: "Netsparker", category: "security_scanner", organization: "Invicti", baseScore: 70, respectsRobots: false, uaPatterns: ["netsparker"] },
466
+ { id: "detectify", name: "Detectify", category: "security_scanner", organization: "Detectify", baseScore: 65, respectsRobots: false, uaPatterns: ["detectify"] },
467
+ { id: "intruder", name: "Intruder", category: "security_scanner", organization: "Intruder", baseScore: 65, respectsRobots: false, uaPatterns: ["intruder"] },
468
+ { id: "python-requests", name: "Python-Requests", category: "generic_scraper", organization: "Open Source", baseScore: 55, respectsRobots: false, uaPatterns: ["python-requests"] },
469
+ { id: "python-urllib", name: "Python-urllib", category: "generic_scraper", organization: "Python", baseScore: 55, respectsRobots: false, uaPatterns: ["python-urllib"] },
470
+ { id: "python", name: "Python", category: "generic_scraper", organization: "Python", baseScore: 50, respectsRobots: false, uaPatterns: ["python/"] },
471
+ { id: "scrapy", name: "Scrapy", category: "generic_scraper", organization: "Scrapy", baseScore: 65, respectsRobots: true, uaPatterns: ["scrapy"] },
472
+ { id: "httpx", name: "HTTPX", category: "generic_scraper", organization: "Open Source", baseScore: 55, respectsRobots: false, uaPatterns: ["httpx"] },
473
+ { id: "aiohttp", name: "aiohttp", category: "generic_scraper", organization: "Open Source", baseScore: 55, respectsRobots: false, uaPatterns: ["aiohttp"] },
474
+ { id: "beautifulsoup", name: "BeautifulSoup", category: "generic_scraper", organization: "Open Source", baseScore: 60, respectsRobots: false, uaPatterns: ["beautifulsoup"] },
475
+ { id: "node-fetch", name: "node-fetch", category: "generic_scraper", organization: "Open Source", baseScore: 55, respectsRobots: false, uaPatterns: ["node-fetch"] },
476
+ { id: "axios", name: "Axios", category: "generic_scraper", organization: "Open Source", baseScore: 55, respectsRobots: false, uaPatterns: ["axios/"] },
477
+ { id: "got", name: "Got", category: "generic_scraper", organization: "Open Source", baseScore: 55, respectsRobots: false, uaPatterns: ["got/"] },
478
+ { id: "undici", name: "Undici", category: "generic_scraper", organization: "Node.js", baseScore: 55, respectsRobots: false, uaPatterns: ["undici"] },
479
+ { id: "go-http-client", name: "Go-HTTP-Client", category: "generic_scraper", organization: "Go", baseScore: 55, respectsRobots: false, uaPatterns: ["go-http-client"] },
480
+ { id: "colly", name: "Colly", category: "generic_scraper", organization: "Open Source", baseScore: 65, respectsRobots: true, uaPatterns: ["colly"] },
481
+ { id: "java", name: "Java", category: "generic_scraper", organization: "Oracle", baseScore: 50, respectsRobots: false, uaPatterns: ["java/"] },
482
+ { id: "okhttp", name: "OkHttp", category: "generic_scraper", organization: "Square", baseScore: 55, respectsRobots: false, uaPatterns: ["okhttp"] },
483
+ { id: "apache-httpclient", name: "Apache-HttpClient", category: "generic_scraper", organization: "Apache", baseScore: 55, respectsRobots: false, uaPatterns: ["apache-httpclient"] },
484
+ { id: "jsoup", name: "Jsoup", category: "generic_scraper", organization: "Open Source", baseScore: 60, respectsRobots: false, uaPatterns: ["jsoup"] },
485
+ { id: "guzzlehttp", name: "GuzzleHttp", category: "generic_scraper", organization: "Open Source", baseScore: 55, respectsRobots: false, uaPatterns: ["guzzlehttp"] },
486
+ { id: "php", name: "PHP", category: "generic_scraper", organization: "PHP", baseScore: 50, respectsRobots: false, uaPatterns: ["php/"] },
487
+ { id: "ruby", name: "Ruby", category: "generic_scraper", organization: "Ruby", baseScore: 50, respectsRobots: false, uaPatterns: ["ruby"] },
488
+ { id: "faraday", name: "Faraday", category: "generic_scraper", organization: "Open Source", baseScore: 55, respectsRobots: false, uaPatterns: ["faraday"] },
489
+ { id: "mechanize", name: "Mechanize", category: "generic_scraper", organization: "Open Source", baseScore: 60, respectsRobots: false, uaPatterns: ["mechanize"] },
490
+ { id: "headlesschrome", name: "HeadlessChrome", category: "headless_browser", organization: "Google", baseScore: 70, respectsRobots: false, uaPatterns: ["headlesschrome"] },
491
+ { id: "puppeteer", name: "Puppeteer", category: "headless_browser", organization: "Google", baseScore: 70, respectsRobots: false, uaPatterns: ["puppeteer"] },
492
+ { id: "playwright", name: "Playwright", category: "headless_browser", organization: "Microsoft", baseScore: 70, respectsRobots: false, uaPatterns: ["playwright"] },
493
+ { id: "selenium", name: "Selenium", category: "headless_browser", organization: "Open Source", baseScore: 70, respectsRobots: false, uaPatterns: ["selenium"] },
494
+ { id: "phantomjs", name: "PhantomJS", category: "headless_browser", organization: "Open Source", baseScore: 75, respectsRobots: false, uaPatterns: ["phantomjs"] },
495
+ { id: "splash", name: "Splash", category: "headless_browser", organization: "Scrapinghub", baseScore: 70, respectsRobots: false, uaPatterns: ["splash"] },
496
+ { id: "browserless", name: "Browserless", category: "headless_browser", organization: "Browserless", baseScore: 65, respectsRobots: false, uaPatterns: ["browserless"] },
497
+ { id: "browserbase", name: "Browserbase", category: "headless_browser", organization: "Browserbase", baseScore: 65, respectsRobots: false, uaPatterns: ["browserbase"] },
498
+ { id: "ia-archiver", name: "Internet Archive", category: "archiver", organization: "Internet Archive", baseScore: 25, respectsRobots: true, uaPatterns: ["ia_archiver"] },
499
+ { id: "archive-org-bot", name: "Archive.org", category: "archiver", organization: "Internet Archive", baseScore: 25, respectsRobots: true, uaPatterns: ["archive.org_bot"] },
500
+ { id: "wayback", name: "Wayback Machine", category: "archiver", organization: "Internet Archive", baseScore: 25, respectsRobots: true, uaPatterns: ["wayback"] },
501
+ { id: "heritrix", name: "Heritrix", category: "archiver", organization: "Internet Archive", baseScore: 30, respectsRobots: true, uaPatterns: ["heritrix"] },
502
+ { id: "brozzler", name: "Brozzler", category: "archiver", organization: "Internet Archive", baseScore: 30, respectsRobots: true, uaPatterns: ["brozzler"] },
503
+ { id: "facebookexternalhit", name: "Facebook", category: "fetcher", organization: "Meta", baseScore: 25, respectsRobots: true, uaPatterns: ["facebookexternalhit"] },
504
+ { id: "facebot", name: "Facebot", category: "fetcher", organization: "Meta", baseScore: 25, respectsRobots: true, uaPatterns: ["facebot"] },
505
+ { id: "twitterbot", name: "Twitterbot", category: "fetcher", organization: "X Corp", baseScore: 25, respectsRobots: true, uaPatterns: ["twitterbot"] },
506
+ { id: "linkedinbot", name: "LinkedInBot", category: "fetcher", organization: "LinkedIn", baseScore: 25, respectsRobots: true, uaPatterns: ["linkedinbot"] },
507
+ { id: "slackbot", name: "Slackbot", category: "fetcher", organization: "Slack", baseScore: 25, respectsRobots: true, uaPatterns: ["slackbot"] },
508
+ { id: "telegrambot", name: "TelegramBot", category: "fetcher", organization: "Telegram", baseScore: 25, respectsRobots: true, uaPatterns: ["telegrambot"] },
509
+ { id: "whatsapp", name: "WhatsApp", category: "fetcher", organization: "Meta", baseScore: 25, respectsRobots: true, uaPatterns: ["whatsapp"] },
510
+ { id: "discordbot", name: "Discordbot", category: "fetcher", organization: "Discord", baseScore: 25, respectsRobots: true, uaPatterns: ["discordbot"] },
511
+ { id: "pinterestbot", name: "Pinterest", category: "fetcher", organization: "Pinterest", baseScore: 30, respectsRobots: true, uaPatterns: ["pinterest"] },
512
+ { id: "tumblr", name: "Tumblr", category: "fetcher", organization: "Automattic", baseScore: 30, respectsRobots: true, uaPatterns: ["tumblr"] },
513
+ { id: "reddit", name: "Reddit", category: "fetcher", organization: "Reddit", baseScore: 30, respectsRobots: true, uaPatterns: ["reddit"] },
514
+ { id: "embedly", name: "Embedly", category: "fetcher", organization: "Medium", baseScore: 30, respectsRobots: true, uaPatterns: ["embedly"] },
515
+ { id: "iframely", name: "Iframely", category: "fetcher", organization: "Iframely", baseScore: 30, respectsRobots: true, uaPatterns: ["iframely"] },
516
+ { id: "curl", name: "cURL", category: "fetcher", organization: "Open Source", baseScore: 45, respectsRobots: false, uaPatterns: ["curl/"] },
517
+ { id: "wget", name: "Wget", category: "fetcher", organization: "GNU", baseScore: 45, respectsRobots: false, uaPatterns: ["wget/"] },
518
+ { id: "libwww-perl", name: "libwww-perl", category: "fetcher", organization: "Perl", baseScore: 50, respectsRobots: false, uaPatterns: ["libwww-perl"] },
519
+ { id: "lwp", name: "LWP", category: "fetcher", organization: "Perl", baseScore: 50, respectsRobots: false, uaPatterns: ["lwp-"] },
520
+ { id: "httrack", name: "HTTrack", category: "fetcher", organization: "Open Source", baseScore: 60, respectsRobots: true, uaPatterns: ["httrack"] },
521
+ { id: "webdecoybot", name: "WebDecoyBot", category: "monitoring", organization: "WebDecoy", baseScore: 5, respectsRobots: true, uaPatterns: ["webdecoybot"] },
522
+ { id: "uptimerobot", name: "UptimeRobot", category: "monitoring", organization: "UptimeRobot", baseScore: 20, respectsRobots: true, uaPatterns: ["uptimerobot"] },
523
+ { id: "pingdom", name: "Pingdom", category: "monitoring", organization: "SolarWinds", baseScore: 20, respectsRobots: true, uaPatterns: ["pingdom"] },
524
+ { id: "statuscake", name: "StatusCake", category: "monitoring", organization: "StatusCake", baseScore: 20, respectsRobots: true, uaPatterns: ["statuscake"] },
525
+ { id: "better-uptime", name: "Better Uptime", category: "monitoring", organization: "Better Stack", baseScore: 20, respectsRobots: true, uaPatterns: ["betteruptime"] },
526
+ { id: "datadog-synthetics", name: "Datadog Synthetics", category: "monitoring", organization: "Datadog", baseScore: 25, respectsRobots: true, uaPatterns: ["datadog"] },
527
+ { id: "newrelic", name: "New Relic", category: "monitoring", organization: "New Relic", baseScore: 25, respectsRobots: true, uaPatterns: ["newrelic"] },
528
+ { id: "site24x7", name: "Site24x7", category: "monitoring", organization: "Zoho", baseScore: 20, respectsRobots: true, uaPatterns: ["site24x7"] },
529
+ { id: "freshping", name: "Freshping", category: "monitoring", organization: "Freshworks", baseScore: 20, respectsRobots: true, uaPatterns: ["freshping"] },
530
+ { id: "hetrixtools", name: "HetrixTools", category: "monitoring", organization: "HetrixTools", baseScore: 20, respectsRobots: true, uaPatterns: ["hetrixtools"] },
531
+ { id: "nodeping", name: "NodePing", category: "monitoring", organization: "NodePing", baseScore: 20, respectsRobots: true, uaPatterns: ["nodeping"] },
532
+ { id: "gtmetrix", name: "GTmetrix", category: "monitoring", organization: "GTmetrix", baseScore: 20, respectsRobots: true, uaPatterns: ["gtmetrix"] },
533
+ { id: "chrome-lighthouse", name: "Lighthouse", category: "monitoring", organization: "Google", baseScore: 20, respectsRobots: true, uaPatterns: ["chrome-lighthouse", "google page speed"] },
534
+ { id: "feedly", name: "Feedly", category: "feed_reader", organization: "Feedly", baseScore: 25, respectsRobots: true, uaPatterns: ["feedly"] },
535
+ { id: "feedfetcher-google", name: "Feedfetcher-Google", category: "feed_reader", organization: "Google", baseScore: 25, respectsRobots: true, uaPatterns: ["feedfetcher"] },
536
+ { id: "newsblur", name: "NewsBlur", category: "feed_reader", organization: "NewsBlur", baseScore: 25, respectsRobots: true, uaPatterns: ["newsblur"] },
537
+ { id: "inoreader", name: "Inoreader", category: "feed_reader", organization: "Inoreader", baseScore: 25, respectsRobots: true, uaPatterns: ["inoreader"] },
538
+ { id: "theoldreader", name: "The Old Reader", category: "feed_reader", organization: "The Old Reader", baseScore: 25, respectsRobots: true, uaPatterns: ["theoldreader"] },
539
+ { id: "feedbin", name: "Feedbin", category: "feed_reader", organization: "Feedbin", baseScore: 25, respectsRobots: true, uaPatterns: ["feedbin"] },
540
+ { id: "miniflux", name: "Miniflux", category: "feed_reader", organization: "Open Source", baseScore: 25, respectsRobots: true, uaPatterns: ["miniflux"] },
541
+ { id: "freshrss", name: "FreshRSS", category: "feed_reader", organization: "Open Source", baseScore: 25, respectsRobots: true, uaPatterns: ["freshrss"] },
542
+ { id: "commafeed", name: "CommaFeed", category: "feed_reader", organization: "Open Source", baseScore: 25, respectsRobots: true, uaPatterns: ["commafeed"] },
543
+ { id: "diffbot", name: "Diffbot", category: "commercial_scraper", organization: "Diffbot", baseScore: 70, respectsRobots: true, uaPatterns: ["diffbot"] },
544
+ { id: "import-io", name: "Import.io", category: "commercial_scraper", organization: "Import.io", baseScore: 65, respectsRobots: true, uaPatterns: ["import.io"] },
545
+ { id: "bright-data", name: "Bright Data", category: "commercial_scraper", organization: "Bright Data", baseScore: 70, respectsRobots: false, uaPatterns: ["brightdata", "luminati"] },
546
+ { id: "oxylabs", name: "Oxylabs", category: "commercial_scraper", organization: "Oxylabs", baseScore: 70, respectsRobots: false, uaPatterns: ["oxylabs"] },
547
+ { id: "scrapingbee", name: "ScrapingBee", category: "commercial_scraper", organization: "ScrapingBee", baseScore: 65, respectsRobots: true, uaPatterns: ["scrapingbee"] },
548
+ { id: "scrapingant", name: "ScrapingAnt", category: "commercial_scraper", organization: "ScrapingAnt", baseScore: 65, respectsRobots: true, uaPatterns: ["scrapingant"] },
549
+ { id: "zyte", name: "Zyte", category: "commercial_scraper", organization: "Zyte", baseScore: 65, respectsRobots: true, uaPatterns: ["zyte", "scrapinghub"] },
550
+ { id: "apify", name: "Apify", category: "commercial_scraper", organization: "Apify", baseScore: 65, respectsRobots: true, uaPatterns: ["apify"] },
551
+ { id: "crawlbase", name: "Crawlbase", category: "commercial_scraper", organization: "Crawlbase", baseScore: 65, respectsRobots: true, uaPatterns: ["crawlbase"] },
552
+ { id: "webscrapingapi", name: "WebScrapingAPI", category: "commercial_scraper", organization: "WebScrapingAPI", baseScore: 65, respectsRobots: true, uaPatterns: ["webscrapingapi"] },
553
+ { id: "chatgpt-user", name: "ChatGPT-User", category: "ai_assistant", organization: "OpenAI", baseScore: 85, respectsRobots: true, uaPatterns: ["chatgpt-user"] },
554
+ { id: "perplexity-user", name: "Perplexity-User", category: "ai_assistant", organization: "Perplexity AI", baseScore: 75, respectsRobots: false, uaPatterns: ["perplexity-user"] },
555
+ { id: "mistralai-user", name: "MistralAI-User", category: "ai_assistant", organization: "Mistral AI", baseScore: 75, respectsRobots: true, uaPatterns: ["mistralai-user"] },
556
+ { id: "exauser", name: "ExaUser", category: "ai_assistant", organization: "Exa AI", baseScore: 70, respectsRobots: false, uaPatterns: ["exauser"] },
557
+ { id: "shap-user", name: "Shap-User", category: "ai_assistant", organization: "Parallel Web Systems", baseScore: 65, respectsRobots: false, uaPatterns: ["shap-user"] },
558
+ { id: "meta-externalfetcher", name: "Meta-ExternalFetcher", category: "ai_assistant", organization: "Meta", baseScore: 70, respectsRobots: false, uaPatterns: ["meta-externalfetcher"] },
559
+ { id: "gemini-deep-research", name: "Gemini-Deep-Research", category: "ai_assistant", organization: "Google", baseScore: 65, respectsRobots: true, uaPatterns: ["gemini-deep-research"] },
560
+ { id: "copilot", name: "Microsoft Copilot", category: "ai_assistant", organization: "Microsoft", baseScore: 65, respectsRobots: true, uaPatterns: ["copilot"] },
561
+ { id: "cortana", name: "Cortana", category: "ai_assistant", organization: "Microsoft", baseScore: 60, respectsRobots: true, uaPatterns: ["cortana"] },
562
+ { id: "siri", name: "Siri", category: "ai_assistant", organization: "Apple", baseScore: 60, respectsRobots: true, uaPatterns: ["siri"] }
563
+ ];
564
+
565
+ // src/bots/index.ts
566
+ var AI_CATEGORIES = /* @__PURE__ */ new Set([
567
+ "training_crawler",
568
+ "ai_search_crawler",
569
+ "ai_agent",
570
+ "ai_assistant"
571
+ ]);
572
+ var UNKNOWN = Object.freeze({
573
+ known: false,
574
+ category: "none",
575
+ score: 0,
576
+ isAI: false
577
+ });
578
+ var MAX_CACHE = 1e3;
579
+ var cache = /* @__PURE__ */ new Map();
580
+ function matchUserAgent(userAgent) {
581
+ if (!userAgent) return void 0;
582
+ const cached = cache.get(userAgent);
583
+ if (cached !== void 0) return cached ?? void 0;
584
+ const ua = userAgent.toLowerCase();
585
+ let found = null;
586
+ for (const agent of BOT_REGISTRY) {
587
+ for (const pattern of agent.uaPatterns) {
588
+ if (ua.includes(pattern)) {
589
+ found = agent;
590
+ break;
591
+ }
592
+ }
593
+ if (found) break;
594
+ }
595
+ if (cache.size >= MAX_CACHE) cache.clear();
596
+ cache.set(userAgent, found);
597
+ return found ?? void 0;
598
+ }
599
+ function classifyUserAgent(userAgent) {
600
+ const agent = matchUserAgent(userAgent);
601
+ if (!agent) return UNKNOWN;
602
+ return {
603
+ known: true,
604
+ id: agent.id,
605
+ name: agent.name,
606
+ category: agent.category,
607
+ organization: agent.organization,
608
+ score: agent.baseScore,
609
+ respectsRobots: agent.respectsRobots,
610
+ isAI: AI_CATEGORIES.has(agent.category)
611
+ };
612
+ }
613
+
351
614
  // src/local-analysis.ts
352
615
  var DATACENTER_RANGES = [
353
616
  // AWS
@@ -409,7 +672,7 @@ function isDatacenterIP(ip) {
409
672
  function hasSuspiciousHeaders(metadata) {
410
673
  const userAgent = metadata.user_agent || "";
411
674
  const headers = metadata.headers || {};
412
- const hasBotUA = SUSPICIOUS_PATTERNS.userAgents.some((pattern) => pattern.test(userAgent));
675
+ const hasBotUA = SUSPICIOUS_PATTERNS.userAgents.some((pattern) => pattern.test(userAgent)) || matchUserAgent(userAgent) !== void 0;
413
676
  const missingCommonHeaders = SUSPICIOUS_PATTERNS.missingHeaders.filter(
414
677
  (header2) => !headers[header2] && !headers[header2.toLowerCase()]
415
678
  );
@@ -1112,518 +1375,257 @@ function resolveProperty(path, context) {
1112
1375
  return void 0;
1113
1376
  }
1114
1377
  if (path.length === 1) return void 0;
1115
- return void 0;
1116
- }
1117
- function resolveCall(object, method, args, context) {
1118
- const namespace = object[0];
1119
- if (namespace === "req" && method === "header") {
1120
- if (args.length !== 1) return void 0;
1121
- const headerName = evaluate(args[0], context);
1122
- if (typeof headerName !== "string") return void 0;
1123
- return context.headers[headerName.toLowerCase()];
1124
- }
1125
- return void 0;
1126
- }
1127
- function evaluateUnary(op, operand, context) {
1128
- const val = evaluate(operand, context);
1129
- if (op === "not") {
1130
- if (val === void 0) return false;
1131
- return !val;
1132
- }
1133
- return void 0;
1134
- }
1135
- function evaluateBinary(op, left, right, context) {
1136
- if (op === "and") {
1137
- const l2 = evaluate(left, context);
1138
- if (l2 === void 0 || l2 === false) return false;
1139
- const r2 = evaluate(right, context);
1140
- if (r2 === void 0) return false;
1141
- return !!r2;
1142
- }
1143
- if (op === "or") {
1144
- const l2 = evaluate(left, context);
1145
- if (l2 === void 0 ? false : !!l2) return true;
1146
- const r2 = evaluate(right, context);
1147
- if (r2 === void 0) return false;
1148
- return !!r2;
1149
- }
1150
- const l = evaluate(left, context);
1151
- const r = evaluate(right, context);
1152
- if (l === void 0 || r === void 0) return false;
1153
- switch (op) {
1154
- case "==":
1155
- return l === r;
1156
- case "!=":
1157
- return l !== r;
1158
- case ">":
1159
- return typeof l === "number" && typeof r === "number" && l > r;
1160
- case ">=":
1161
- return typeof l === "number" && typeof r === "number" && l >= r;
1162
- case "<":
1163
- return typeof l === "number" && typeof r === "number" && l < r;
1164
- case "<=":
1165
- return typeof l === "number" && typeof r === "number" && l <= r;
1166
- case "in": {
1167
- if (!Array.isArray(r)) return false;
1168
- return r.includes(l);
1169
- }
1170
- case "not in": {
1171
- if (!Array.isArray(r)) return false;
1172
- return !r.includes(l);
1173
- }
1174
- case "matches": {
1175
- if (typeof l !== "string" || typeof r !== "string") return false;
1176
- if (r.length > MAX_REGEX_LENGTH) return false;
1177
- try {
1178
- return new RegExp(r).test(l);
1179
- } catch {
1180
- return false;
1181
- }
1182
- }
1183
- default:
1184
- return false;
1185
- }
1186
- }
1187
-
1188
- // src/rules/filter-rule.ts
1189
- var FilterRule = class {
1190
- constructor(config) {
1191
- this.expression = config.expression;
1192
- this.action = config.action ?? "DENY";
1193
- this.dryRun = config.dryRun ?? false;
1194
- this.name = `filter:${this.expression.slice(0, 50)}`;
1195
- const parser = new Parser(config.expression);
1196
- this.ast = parser.parse();
1197
- }
1198
- evaluate(context) {
1199
- if (!context.enrichment && this.expression.includes("ip.")) {
1200
- return {
1201
- action: "ALLOW",
1202
- rule: this.name,
1203
- state: "NOT_RUN",
1204
- reason: "No IP enrichment available \u2014 filter needs an API key"
1205
- };
1206
- }
1207
- const result = evaluate(this.ast, context);
1208
- if (result) {
1209
- return {
1210
- action: this.dryRun ? "ALLOW" : this.action,
1211
- rule: this.name,
1212
- reason: `Filter matched: ${this.expression}`,
1213
- metadata: {
1214
- expression: this.expression,
1215
- dryRun: this.dryRun
1216
- }
1217
- };
1218
- }
1219
- return {
1220
- action: "ALLOW",
1221
- rule: this.name
1222
- };
1223
- }
1224
- };
1225
-
1226
- // src/rules/tripwire-rule.ts
1227
- var DEFAULT_TRIPWIRE_PATHS = [
1228
- "/.git/config",
1229
- "/.git/HEAD",
1230
- "/.env",
1231
- "/.env.local",
1232
- "/.env.production",
1233
- "/wp-config.php",
1234
- "/config.php",
1235
- "/.aws/credentials",
1236
- "/.ssh/id_rsa",
1237
- "/backup.zip",
1238
- "/backup.sql",
1239
- "/database.sql",
1240
- "/dump.sql",
1241
- "/.DS_Store",
1242
- "/phpinfo.php",
1243
- "/server-status",
1244
- "/actuator/env",
1245
- "/.vscode/sftp.json"
1246
- ];
1247
- function canonicalizeTripwirePath(path) {
1248
- const noQuery = path.split("?")[0].split("#")[0];
1249
- return cleanSlashesAndDots(decodePercentAscii(noQuery));
1250
- }
1251
- function decodePercentAscii(s) {
1252
- for (let i = 0; i < 4; i++) {
1253
- const next = decodePercentAsciiOnce(s);
1254
- if (next === s) break;
1255
- s = next;
1256
- }
1257
- return s;
1258
- }
1259
- function decodePercentAsciiOnce(s) {
1260
- if (!s.includes("%")) return s;
1261
- let out = "";
1262
- for (let i = 0; i < s.length; i++) {
1263
- if (s[i] === "%" && i + 2 < s.length) {
1264
- const hi = unhexNibble(s.charCodeAt(i + 1));
1265
- const lo = unhexNibble(s.charCodeAt(i + 2));
1266
- if (hi >= 0 && lo >= 0) {
1267
- const v = hi << 4 | lo;
1268
- if (v < 128) {
1269
- out += String.fromCharCode(v);
1270
- i += 2;
1271
- continue;
1272
- }
1273
- }
1274
- }
1275
- out += s[i];
1276
- }
1277
- return out;
1278
- }
1279
- function unhexNibble(c) {
1280
- if (c >= 48 && c <= 57) return c - 48;
1281
- if (c >= 97 && c <= 102) return c - 97 + 10;
1282
- if (c >= 65 && c <= 70) return c - 65 + 10;
1283
- return -1;
1284
- }
1285
- function cleanSlashesAndDots(s) {
1286
- if (s === "") return s;
1287
- const hadTrailing = s.length > 1 && s[s.length - 1] === "/";
1288
- const stack = [];
1289
- for (const p of s.split("/")) {
1290
- if (p === "" || p === ".") continue;
1291
- if (p === "..") {
1292
- if (stack.length > 0) stack.pop();
1293
- continue;
1294
- }
1295
- stack.push(p);
1296
- }
1297
- let res = "/" + stack.join("/");
1298
- if (hadTrailing && res !== "/") res += "/";
1299
- return res;
1300
- }
1301
- var TripwireRule = class {
1302
- constructor(config = {}) {
1303
- this.name = "tripwire";
1304
- const paths = [...config.paths ?? []];
1305
- if (config.includeDefaults ?? true) paths.push(...DEFAULT_TRIPWIRE_PATHS);
1306
- this.exact = new Set(paths.map(canonicalizeTripwirePath));
1307
- this.prefixes = (config.prefixes ?? []).map(canonicalizeTripwirePath);
1308
- this.patterns = config.patterns ?? [];
1309
- this.action = config.action ?? "DENY";
1310
- this.dryRun = config.dryRun ?? false;
1311
- }
1312
- evaluate(context) {
1313
- const path = canonicalizeTripwirePath(context.path);
1314
- const hit = this.exact.has(path) || this.prefixes.some((prefix) => path.startsWith(prefix)) || this.patterns.some((re2) => re2.test(path));
1315
- if (hit) {
1316
- return {
1317
- action: this.dryRun ? "ALLOW" : this.action,
1318
- rule: this.name,
1319
- reason: `Tripwire hit: ${path} \u2014 hidden honeypot path, deterministic automated-intent signal`,
1320
- metadata: { path, dryRun: this.dryRun, confidence: 100 }
1321
- };
1322
- }
1323
- return { action: "ALLOW", rule: this.name };
1324
- }
1325
- };
1326
-
1327
- // src/rules/bot-rule.ts
1328
- var BotRule = class {
1329
- constructor(config = {}) {
1330
- this.name = "bots";
1331
- this.categories = new Set(config.categories ?? []);
1332
- this.agents = new Set((config.agents ?? []).map((a) => a.toLowerCase()));
1333
- this.ai = config.ai ?? false;
1334
- this.allow = new Set((config.allow ?? []).map((a) => a.toLowerCase()));
1335
- this.action = config.action ?? "DENY";
1336
- this.dryRun = config.dryRun ?? false;
1378
+ return void 0;
1379
+ }
1380
+ function resolveCall(object, method, args, context) {
1381
+ const namespace = object[0];
1382
+ if (namespace === "req" && method === "header") {
1383
+ if (args.length !== 1) return void 0;
1384
+ const headerName = evaluate(args[0], context);
1385
+ if (typeof headerName !== "string") return void 0;
1386
+ return context.headers[headerName.toLowerCase()];
1337
1387
  }
1338
- evaluate(context) {
1339
- const bot = context.bot;
1340
- if (!bot?.known) return { action: "ALLOW", rule: this.name };
1341
- const id = bot.id?.toLowerCase();
1342
- const name = bot.name?.toLowerCase();
1343
- if (id && this.allow.has(id) || name && this.allow.has(name)) {
1344
- return { action: "ALLOW", rule: this.name };
1345
- }
1346
- const matched = this.ai && bot.isAI || this.categories.has(bot.category) || id !== void 0 && this.agents.has(id) || name !== void 0 && this.agents.has(name);
1347
- if (!matched) return { action: "ALLOW", rule: this.name };
1348
- return {
1349
- action: this.dryRun ? "ALLOW" : this.action,
1350
- rule: this.name,
1351
- reason: `${bot.name ?? "Bot"} (${bot.category}) matched a bot policy rule`,
1352
- metadata: {
1353
- bot: bot.id,
1354
- botName: bot.name,
1355
- category: bot.category,
1356
- organization: bot.organization,
1357
- dryRun: this.dryRun,
1358
- // Deliberately not 100. The match is a self-declared User-Agent, and a
1359
- // downstream consumer that treats this like a tripwire hit would be
1360
- // wrong: a tripwire proves behaviour, this repeats a claim.
1361
- confidence: 70
1362
- }
1363
- };
1388
+ return void 0;
1389
+ }
1390
+ function evaluateUnary(op, operand, context) {
1391
+ const val = evaluate(operand, context);
1392
+ if (op === "not") {
1393
+ if (val === void 0) return false;
1394
+ return !val;
1364
1395
  }
1365
- };
1366
-
1367
- // src/bots/registry.generated.ts
1368
- var BOT_CATEGORIES = [
1369
- "training_crawler",
1370
- "ai_search_crawler",
1371
- "ai_agent",
1372
- "ai_assistant",
1373
- "search_crawler",
1374
- "seo_crawler",
1375
- "security_scanner",
1376
- "generic_scraper",
1377
- "archiver",
1378
- "fetcher",
1379
- "monitoring",
1380
- "headless_browser",
1381
- "feed_reader",
1382
- "commercial_scraper",
1383
- "none"
1384
- ];
1385
- var BOT_REGISTRY = [
1386
- { id: "reflectionbot", name: "Reflectionbot", category: "training_crawler", organization: "Reflection AI", baseScore: 70, respectsRobots: true, uaPatterns: ["reflectionbot"] },
1387
- { id: "gptbot", name: "GPTBot", category: "training_crawler", organization: "OpenAI", baseScore: 85, respectsRobots: true, uaPatterns: ["gptbot"] },
1388
- { id: "claudebot", name: "ClaudeBot", category: "training_crawler", organization: "Anthropic", baseScore: 85, respectsRobots: true, uaPatterns: ["claudebot"] },
1389
- { id: "anthropic", name: "Anthropic", category: "training_crawler", organization: "Anthropic", baseScore: 85, respectsRobots: true, uaPatterns: ["anthropic-ai"] },
1390
- { id: "claude-web", name: "Claude-Web", category: "training_crawler", organization: "Anthropic", baseScore: 85, respectsRobots: true, uaPatterns: ["claude-web"] },
1391
- { id: "ccbot", name: "CCBot", category: "training_crawler", organization: "Common Crawl", baseScore: 80, respectsRobots: true, uaPatterns: ["ccbot"] },
1392
- { id: "google-extended", name: "Google-Extended", category: "training_crawler", organization: "Google", baseScore: 80, respectsRobots: true, uaPatterns: ["google-extended"] },
1393
- { id: "bytespider", name: "ByteSpider", category: "training_crawler", organization: "ByteDance", baseScore: 75, respectsRobots: false, uaPatterns: ["bytespider"] },
1394
- { id: "amazonbot", name: "Amazonbot", category: "training_crawler", organization: "Amazon", baseScore: 70, respectsRobots: true, uaPatterns: ["amazonbot"] },
1395
- { id: "facebookbot", name: "FacebookBot", category: "training_crawler", organization: "Meta", baseScore: 70, respectsRobots: true, uaPatterns: ["facebookbot"] },
1396
- { id: "meta-externalagent", name: "Meta-ExternalAgent", category: "training_crawler", organization: "Meta", baseScore: 75, respectsRobots: true, uaPatterns: ["meta-externalagent"] },
1397
- { id: "cohere-ai", name: "Cohere", category: "training_crawler", organization: "Cohere", baseScore: 80, respectsRobots: true, uaPatterns: ["cohere-ai", "cohere"] },
1398
- { id: "applebot-extended", name: "Applebot-Extended", category: "training_crawler", organization: "Apple", baseScore: 75, respectsRobots: true, uaPatterns: ["applebot-extended"] },
1399
- { id: "youbot", name: "YouBot", category: "training_crawler", organization: "You.com", baseScore: 75, respectsRobots: true, uaPatterns: ["youbot"] },
1400
- { id: "mistral", name: "MistralBot", category: "training_crawler", organization: "Mistral AI", baseScore: 80, respectsRobots: true, uaPatterns: ["mistralbot"] },
1401
- { id: "gemini", name: "Gemini", category: "training_crawler", organization: "Google", baseScore: 80, respectsRobots: true, uaPatterns: ["gemini"] },
1402
- { id: "ai2bot", name: "AI2Bot", category: "training_crawler", organization: "Allen Institute for AI", baseScore: 75, respectsRobots: true, uaPatterns: ["ai2bot"] },
1403
- { id: "deepseek", name: "DeepSeek", category: "training_crawler", organization: "DeepSeek", baseScore: 80, respectsRobots: true, uaPatterns: ["deepseek"] },
1404
- { id: "qwen", name: "Qwen", category: "training_crawler", organization: "Alibaba", baseScore: 75, respectsRobots: true, uaPatterns: ["qwen"] },
1405
- { id: "webzio", name: "Webz.io", category: "training_crawler", organization: "Webz.io", baseScore: 70, respectsRobots: false, uaPatterns: ["webzio"] },
1406
- { id: "sentibot", name: "Sentibot", category: "training_crawler", organization: "Sentibot", baseScore: 70, respectsRobots: false, uaPatterns: ["sentibot"] },
1407
- { id: "omgili", name: "Omgili", category: "training_crawler", organization: "Webz.io", baseScore: 70, respectsRobots: false, uaPatterns: ["omgili"] },
1408
- { id: "img2dataset", name: "img2dataset", category: "training_crawler", organization: "LAION", baseScore: 75, respectsRobots: false, uaPatterns: ["img2dataset"] },
1409
- { id: "timpibot", name: "Timpibot", category: "training_crawler", organization: "Timpi", baseScore: 70, respectsRobots: true, uaPatterns: ["timpibot"] },
1410
- { id: "velenpublicwebcrawler", name: "VelenPublicWebCrawler", category: "training_crawler", organization: "Velen", baseScore: 70, respectsRobots: false, uaPatterns: ["velenpublicwebcrawler"] },
1411
- { id: "isscyberriskcrawler", name: "ISSCyberRiskCrawler", category: "training_crawler", organization: "ISS", baseScore: 65, respectsRobots: false, uaPatterns: ["isscyberriskcrawler"] },
1412
- { id: "friendlycrawler", name: "FriendlyCrawler", category: "training_crawler", organization: "Unknown", baseScore: 65, respectsRobots: true, uaPatterns: ["friendlycrawler"] },
1413
- { id: "duckassistbot", name: "DuckAssistBot", category: "ai_search_crawler", organization: "DuckDuckGo", baseScore: 65, respectsRobots: true, uaPatterns: ["duckassistbot"] },
1414
- { id: "sofyabot", name: "SofyaBot", category: "ai_search_crawler", organization: "Sofya", baseScore: 65, respectsRobots: true, uaPatterns: ["sofyabot"] },
1415
- { id: "xai-searchbot", name: "xAI-SearchBot", category: "ai_search_crawler", organization: "xAI", baseScore: 70, respectsRobots: true, uaPatterns: ["xai-searchbot"] },
1416
- { id: "linkupbot", name: "LinkupBot", category: "ai_search_crawler", organization: "Linkup", baseScore: 65, respectsRobots: true, uaPatterns: ["linkupbot"] },
1417
- { id: "perplexitybot", name: "PerplexityBot", category: "ai_search_crawler", organization: "Perplexity AI", baseScore: 80, respectsRobots: true, uaPatterns: ["perplexitybot"] },
1418
- { id: "claude-searchbot", name: "Claude-SearchBot", category: "ai_search_crawler", organization: "Anthropic", baseScore: 75, respectsRobots: true, uaPatterns: ["claude-searchbot"] },
1419
- { id: "oai-searchbot", name: "OAI-SearchBot", category: "ai_search_crawler", organization: "OpenAI", baseScore: 80, respectsRobots: true, uaPatterns: ["oai-searchbot"] },
1420
- { id: "searchgpt", name: "SearchGPT", category: "ai_search_crawler", organization: "OpenAI", baseScore: 75, respectsRobots: true, uaPatterns: ["searchgpt"] },
1421
- { id: "phind", name: "Phind", category: "ai_search_crawler", organization: "Phind", baseScore: 70, respectsRobots: true, uaPatterns: ["phind"] },
1422
- { id: "kagi", name: "Kagi", category: "ai_search_crawler", organization: "Kagi", baseScore: 65, respectsRobots: true, uaPatterns: ["kagi"] },
1423
- { id: "exa", name: "Exa", category: "ai_search_crawler", organization: "Exa AI", baseScore: 70, respectsRobots: true, uaPatterns: ["exasearchbot", "exabot"] },
1424
- { id: "shapbot", name: "ShapBot", category: "ai_search_crawler", organization: "Parallel Web Systems", baseScore: 65, respectsRobots: true, uaPatterns: ["shapbot"] },
1425
- { id: "meta-webindexer", name: "Meta-WebIndexer", category: "ai_search_crawler", organization: "Meta", baseScore: 70, respectsRobots: true, uaPatterns: ["meta-webindexer"] },
1426
- { id: "metaphor", name: "Metaphor", category: "ai_search_crawler", organization: "Metaphor", baseScore: 70, respectsRobots: true, uaPatterns: ["metaphor"] },
1427
- { id: "tavily", name: "Tavily", category: "ai_search_crawler", organization: "Tavily", baseScore: 70, respectsRobots: true, uaPatterns: ["tavily"] },
1428
- { id: "brave-search", name: "BraveSearch", category: "ai_search_crawler", organization: "Brave", baseScore: 65, respectsRobots: true, uaPatterns: ["bravesearch"] },
1429
- { id: "neeva", name: "NeevaBot", category: "ai_search_crawler", organization: "Neeva", baseScore: 65, respectsRobots: true, uaPatterns: ["neevabot"] },
1430
- { id: "operator", name: "Operator", category: "ai_agent", organization: "OpenAI", baseScore: 75, respectsRobots: true, uaPatterns: ["operator"] },
1431
- { id: "claude-user", name: "Claude-User", category: "ai_agent", organization: "Anthropic", baseScore: 75, respectsRobots: true, uaPatterns: ["claude-user"] },
1432
- { id: "gemini-user", name: "Gemini-User", category: "ai_agent", organization: "Google", baseScore: 75, respectsRobots: true, uaPatterns: ["gemini-user"] },
1433
- { id: "googleagent-mariner", name: "GoogleAgent-Mariner", category: "ai_agent", organization: "Google", baseScore: 75, respectsRobots: true, uaPatterns: ["googleagent-mariner", "mariner"] },
1434
- { id: "amazon-buyforme", name: "AmazonBuyForMe", category: "ai_agent", organization: "Amazon", baseScore: 70, respectsRobots: true, uaPatterns: ["amazonbuyforme", "buyforme"] },
1435
- { id: "browser-use", name: "Browser-Use", category: "ai_agent", organization: "Open Source", baseScore: 70, respectsRobots: false, uaPatterns: ["browser-use"] },
1436
- { id: "stagehand", name: "Stagehand", category: "ai_agent", organization: "Browserbase", baseScore: 70, respectsRobots: false, uaPatterns: ["stagehand"] },
1437
- { id: "manus-user", name: "Manus-User", category: "ai_agent", organization: "Manus", baseScore: 70, respectsRobots: false, uaPatterns: ["manus-user"] },
1438
- { id: "multion", name: "MultiOn", category: "ai_agent", organization: "MultiOn", baseScore: 70, respectsRobots: false, uaPatterns: ["multion"] },
1439
- { id: "iboubot", name: "IbouBot", category: "search_crawler", organization: "Ibou", baseScore: 30, respectsRobots: true, uaPatterns: ["iboubot"] },
1440
- { id: "googlebot", name: "Googlebot", category: "search_crawler", organization: "Google", baseScore: 30, respectsRobots: true, uaPatterns: ["googlebot"] },
1441
- { id: "google-inspectiontool", name: "Google-InspectionTool", category: "search_crawler", organization: "Google", baseScore: 30, respectsRobots: true, uaPatterns: ["google-inspectiontool"] },
1442
- { id: "bingbot", name: "Bingbot", category: "search_crawler", organization: "Microsoft", baseScore: 30, respectsRobots: true, uaPatterns: ["bingbot"] },
1443
- { id: "msnbot", name: "MSNBot", category: "search_crawler", organization: "Microsoft", baseScore: 30, respectsRobots: true, uaPatterns: ["msnbot"] },
1444
- { id: "yandexbot", name: "YandexBot", category: "search_crawler", organization: "Yandex", baseScore: 35, respectsRobots: true, uaPatterns: ["yandexbot"] },
1445
- { id: "baiduspider", name: "Baiduspider", category: "search_crawler", organization: "Baidu", baseScore: 40, respectsRobots: true, uaPatterns: ["baiduspider"] },
1446
- { id: "duckduckbot", name: "DuckDuckBot", category: "search_crawler", organization: "DuckDuckGo", baseScore: 30, respectsRobots: true, uaPatterns: ["duckduckbot"] },
1447
- { id: "applebot", name: "Applebot", category: "search_crawler", organization: "Apple", baseScore: 30, respectsRobots: true, uaPatterns: ["applebot"] },
1448
- { id: "sogou", name: "Sogou Spider", category: "search_crawler", organization: "Sogou", baseScore: 40, respectsRobots: true, uaPatterns: ["sogou"] },
1449
- { id: "qwantify", name: "Qwantify", category: "search_crawler", organization: "Qwant", baseScore: 35, respectsRobots: true, uaPatterns: ["qwantify"] },
1450
- { id: "naver", name: "Naver", category: "search_crawler", organization: "Naver", baseScore: 35, respectsRobots: true, uaPatterns: ["naver", "yeti"] },
1451
- { id: "seznam", name: "SeznamBot", category: "search_crawler", organization: "Seznam", baseScore: 35, respectsRobots: true, uaPatterns: ["seznambot"] },
1452
- { id: "ecosia", name: "Ecosia", category: "search_crawler", organization: "Ecosia", baseScore: 30, respectsRobots: true, uaPatterns: ["ecosia"] },
1453
- { id: "mojeek", name: "MojeekBot", category: "search_crawler", organization: "Mojeek", baseScore: 35, respectsRobots: true, uaPatterns: ["mojeekbot"] },
1454
- { id: "yahoo-slurp", name: "Yahoo! Slurp", category: "search_crawler", organization: "Yahoo", baseScore: 30, respectsRobots: true, uaPatterns: ["slurp"] },
1455
- { id: "ahrefsbot", name: "AhrefsBot", category: "seo_crawler", organization: "Ahrefs", baseScore: 50, respectsRobots: true, uaPatterns: ["ahrefsbot", "ahrefs"] },
1456
- { id: "semrushbot", name: "SemrushBot", category: "seo_crawler", organization: "Semrush", baseScore: 50, respectsRobots: true, uaPatterns: ["semrushbot", "semrush"] },
1457
- { id: "mj12bot", name: "MJ12bot", category: "seo_crawler", organization: "Majestic", baseScore: 50, respectsRobots: true, uaPatterns: ["mj12bot"] },
1458
- { id: "dotbot", name: "DotBot", category: "seo_crawler", organization: "Moz", baseScore: 50, respectsRobots: true, uaPatterns: ["dotbot"] },
1459
- { id: "rogerbot", name: "Rogerbot", category: "seo_crawler", organization: "Moz", baseScore: 50, respectsRobots: true, uaPatterns: ["rogerbot"] },
1460
- { id: "screaming-frog", name: "Screaming Frog", category: "seo_crawler", organization: "Screaming Frog", baseScore: 55, respectsRobots: true, uaPatterns: ["screaming frog"] },
1461
- { id: "sitebulb", name: "Sitebulb", category: "seo_crawler", organization: "Sitebulb", baseScore: 55, respectsRobots: true, uaPatterns: ["sitebulb"] },
1462
- { id: "deepcrawl", name: "DeepCrawl", category: "seo_crawler", organization: "Lumar", baseScore: 50, respectsRobots: true, uaPatterns: ["deepcrawl"] },
1463
- { id: "oncrawl", name: "OnCrawl", category: "seo_crawler", organization: "OnCrawl", baseScore: 50, respectsRobots: true, uaPatterns: ["oncrawl"] },
1464
- { id: "botify", name: "Botify", category: "seo_crawler", organization: "Botify", baseScore: 50, respectsRobots: true, uaPatterns: ["botify"] },
1465
- { id: "contentking", name: "ContentKing", category: "seo_crawler", organization: "ContentKing", baseScore: 50, respectsRobots: true, uaPatterns: ["contentking"] },
1466
- { id: "sistrix", name: "SISTRIX", category: "seo_crawler", organization: "SISTRIX", baseScore: 50, respectsRobots: true, uaPatterns: ["sistrix"] },
1467
- { id: "serpstat", name: "Serpstat", category: "seo_crawler", organization: "Serpstat", baseScore: 50, respectsRobots: true, uaPatterns: ["serpstat"] },
1468
- { id: "spyfu", name: "SpyFu", category: "seo_crawler", organization: "SpyFu", baseScore: 50, respectsRobots: true, uaPatterns: ["spyfu"] },
1469
- { id: "nessus", name: "Nessus", category: "security_scanner", organization: "Tenable", baseScore: 70, respectsRobots: false, uaPatterns: ["nessus"] },
1470
- { id: "qualys", name: "Qualys", category: "security_scanner", organization: "Qualys", baseScore: 70, respectsRobots: false, uaPatterns: ["qualys"] },
1471
- { id: "shodan", name: "Shodan", category: "security_scanner", organization: "Shodan", baseScore: 75, respectsRobots: false, uaPatterns: ["shodan"] },
1472
- { id: "censys", name: "Censys", category: "security_scanner", organization: "Censys", baseScore: 75, respectsRobots: false, uaPatterns: ["censys"] },
1473
- { id: "nmap", name: "Nmap", category: "security_scanner", organization: "Open Source", baseScore: 70, respectsRobots: false, uaPatterns: ["nmap"] },
1474
- { id: "zap", name: "OWASP ZAP", category: "security_scanner", organization: "OWASP", baseScore: 70, respectsRobots: false, uaPatterns: ["zap/"] },
1475
- { id: "burp", name: "Burp Suite", category: "security_scanner", organization: "PortSwigger", baseScore: 70, respectsRobots: false, uaPatterns: ["burp"] },
1476
- { id: "nikto", name: "Nikto", category: "security_scanner", organization: "Open Source", baseScore: 70, respectsRobots: false, uaPatterns: ["nikto"] },
1477
- { id: "nuclei", name: "Nuclei", category: "security_scanner", organization: "ProjectDiscovery", baseScore: 70, respectsRobots: false, uaPatterns: ["nuclei"] },
1478
- { id: "acunetix", name: "Acunetix", category: "security_scanner", organization: "Invicti", baseScore: 70, respectsRobots: false, uaPatterns: ["acunetix"] },
1479
- { id: "netsparker", name: "Netsparker", category: "security_scanner", organization: "Invicti", baseScore: 70, respectsRobots: false, uaPatterns: ["netsparker"] },
1480
- { id: "detectify", name: "Detectify", category: "security_scanner", organization: "Detectify", baseScore: 65, respectsRobots: false, uaPatterns: ["detectify"] },
1481
- { id: "intruder", name: "Intruder", category: "security_scanner", organization: "Intruder", baseScore: 65, respectsRobots: false, uaPatterns: ["intruder"] },
1482
- { id: "python-requests", name: "Python-Requests", category: "generic_scraper", organization: "Open Source", baseScore: 55, respectsRobots: false, uaPatterns: ["python-requests"] },
1483
- { id: "python-urllib", name: "Python-urllib", category: "generic_scraper", organization: "Python", baseScore: 55, respectsRobots: false, uaPatterns: ["python-urllib"] },
1484
- { id: "python", name: "Python", category: "generic_scraper", organization: "Python", baseScore: 50, respectsRobots: false, uaPatterns: ["python/"] },
1485
- { id: "scrapy", name: "Scrapy", category: "generic_scraper", organization: "Scrapy", baseScore: 65, respectsRobots: true, uaPatterns: ["scrapy"] },
1486
- { id: "httpx", name: "HTTPX", category: "generic_scraper", organization: "Open Source", baseScore: 55, respectsRobots: false, uaPatterns: ["httpx"] },
1487
- { id: "aiohttp", name: "aiohttp", category: "generic_scraper", organization: "Open Source", baseScore: 55, respectsRobots: false, uaPatterns: ["aiohttp"] },
1488
- { id: "beautifulsoup", name: "BeautifulSoup", category: "generic_scraper", organization: "Open Source", baseScore: 60, respectsRobots: false, uaPatterns: ["beautifulsoup"] },
1489
- { id: "node-fetch", name: "node-fetch", category: "generic_scraper", organization: "Open Source", baseScore: 55, respectsRobots: false, uaPatterns: ["node-fetch"] },
1490
- { id: "axios", name: "Axios", category: "generic_scraper", organization: "Open Source", baseScore: 55, respectsRobots: false, uaPatterns: ["axios/"] },
1491
- { id: "got", name: "Got", category: "generic_scraper", organization: "Open Source", baseScore: 55, respectsRobots: false, uaPatterns: ["got/"] },
1492
- { id: "undici", name: "Undici", category: "generic_scraper", organization: "Node.js", baseScore: 55, respectsRobots: false, uaPatterns: ["undici"] },
1493
- { id: "go-http-client", name: "Go-HTTP-Client", category: "generic_scraper", organization: "Go", baseScore: 55, respectsRobots: false, uaPatterns: ["go-http-client"] },
1494
- { id: "colly", name: "Colly", category: "generic_scraper", organization: "Open Source", baseScore: 65, respectsRobots: true, uaPatterns: ["colly"] },
1495
- { id: "java", name: "Java", category: "generic_scraper", organization: "Oracle", baseScore: 50, respectsRobots: false, uaPatterns: ["java/"] },
1496
- { id: "okhttp", name: "OkHttp", category: "generic_scraper", organization: "Square", baseScore: 55, respectsRobots: false, uaPatterns: ["okhttp"] },
1497
- { id: "apache-httpclient", name: "Apache-HttpClient", category: "generic_scraper", organization: "Apache", baseScore: 55, respectsRobots: false, uaPatterns: ["apache-httpclient"] },
1498
- { id: "jsoup", name: "Jsoup", category: "generic_scraper", organization: "Open Source", baseScore: 60, respectsRobots: false, uaPatterns: ["jsoup"] },
1499
- { id: "guzzlehttp", name: "GuzzleHttp", category: "generic_scraper", organization: "Open Source", baseScore: 55, respectsRobots: false, uaPatterns: ["guzzlehttp"] },
1500
- { id: "php", name: "PHP", category: "generic_scraper", organization: "PHP", baseScore: 50, respectsRobots: false, uaPatterns: ["php/"] },
1501
- { id: "ruby", name: "Ruby", category: "generic_scraper", organization: "Ruby", baseScore: 50, respectsRobots: false, uaPatterns: ["ruby"] },
1502
- { id: "faraday", name: "Faraday", category: "generic_scraper", organization: "Open Source", baseScore: 55, respectsRobots: false, uaPatterns: ["faraday"] },
1503
- { id: "mechanize", name: "Mechanize", category: "generic_scraper", organization: "Open Source", baseScore: 60, respectsRobots: false, uaPatterns: ["mechanize"] },
1504
- { id: "headlesschrome", name: "HeadlessChrome", category: "headless_browser", organization: "Google", baseScore: 70, respectsRobots: false, uaPatterns: ["headlesschrome"] },
1505
- { id: "puppeteer", name: "Puppeteer", category: "headless_browser", organization: "Google", baseScore: 70, respectsRobots: false, uaPatterns: ["puppeteer"] },
1506
- { id: "playwright", name: "Playwright", category: "headless_browser", organization: "Microsoft", baseScore: 70, respectsRobots: false, uaPatterns: ["playwright"] },
1507
- { id: "selenium", name: "Selenium", category: "headless_browser", organization: "Open Source", baseScore: 70, respectsRobots: false, uaPatterns: ["selenium"] },
1508
- { id: "phantomjs", name: "PhantomJS", category: "headless_browser", organization: "Open Source", baseScore: 75, respectsRobots: false, uaPatterns: ["phantomjs"] },
1509
- { id: "splash", name: "Splash", category: "headless_browser", organization: "Scrapinghub", baseScore: 70, respectsRobots: false, uaPatterns: ["splash"] },
1510
- { id: "browserless", name: "Browserless", category: "headless_browser", organization: "Browserless", baseScore: 65, respectsRobots: false, uaPatterns: ["browserless"] },
1511
- { id: "browserbase", name: "Browserbase", category: "headless_browser", organization: "Browserbase", baseScore: 65, respectsRobots: false, uaPatterns: ["browserbase"] },
1512
- { id: "ia-archiver", name: "Internet Archive", category: "archiver", organization: "Internet Archive", baseScore: 25, respectsRobots: true, uaPatterns: ["ia_archiver"] },
1513
- { id: "archive-org-bot", name: "Archive.org", category: "archiver", organization: "Internet Archive", baseScore: 25, respectsRobots: true, uaPatterns: ["archive.org_bot"] },
1514
- { id: "wayback", name: "Wayback Machine", category: "archiver", organization: "Internet Archive", baseScore: 25, respectsRobots: true, uaPatterns: ["wayback"] },
1515
- { id: "heritrix", name: "Heritrix", category: "archiver", organization: "Internet Archive", baseScore: 30, respectsRobots: true, uaPatterns: ["heritrix"] },
1516
- { id: "brozzler", name: "Brozzler", category: "archiver", organization: "Internet Archive", baseScore: 30, respectsRobots: true, uaPatterns: ["brozzler"] },
1517
- { id: "facebookexternalhit", name: "Facebook", category: "fetcher", organization: "Meta", baseScore: 25, respectsRobots: true, uaPatterns: ["facebookexternalhit"] },
1518
- { id: "facebot", name: "Facebot", category: "fetcher", organization: "Meta", baseScore: 25, respectsRobots: true, uaPatterns: ["facebot"] },
1519
- { id: "twitterbot", name: "Twitterbot", category: "fetcher", organization: "X Corp", baseScore: 25, respectsRobots: true, uaPatterns: ["twitterbot"] },
1520
- { id: "linkedinbot", name: "LinkedInBot", category: "fetcher", organization: "LinkedIn", baseScore: 25, respectsRobots: true, uaPatterns: ["linkedinbot"] },
1521
- { id: "slackbot", name: "Slackbot", category: "fetcher", organization: "Slack", baseScore: 25, respectsRobots: true, uaPatterns: ["slackbot"] },
1522
- { id: "telegrambot", name: "TelegramBot", category: "fetcher", organization: "Telegram", baseScore: 25, respectsRobots: true, uaPatterns: ["telegrambot"] },
1523
- { id: "whatsapp", name: "WhatsApp", category: "fetcher", organization: "Meta", baseScore: 25, respectsRobots: true, uaPatterns: ["whatsapp"] },
1524
- { id: "discordbot", name: "Discordbot", category: "fetcher", organization: "Discord", baseScore: 25, respectsRobots: true, uaPatterns: ["discordbot"] },
1525
- { id: "pinterestbot", name: "Pinterest", category: "fetcher", organization: "Pinterest", baseScore: 30, respectsRobots: true, uaPatterns: ["pinterest"] },
1526
- { id: "tumblr", name: "Tumblr", category: "fetcher", organization: "Automattic", baseScore: 30, respectsRobots: true, uaPatterns: ["tumblr"] },
1527
- { id: "reddit", name: "Reddit", category: "fetcher", organization: "Reddit", baseScore: 30, respectsRobots: true, uaPatterns: ["reddit"] },
1528
- { id: "embedly", name: "Embedly", category: "fetcher", organization: "Medium", baseScore: 30, respectsRobots: true, uaPatterns: ["embedly"] },
1529
- { id: "iframely", name: "Iframely", category: "fetcher", organization: "Iframely", baseScore: 30, respectsRobots: true, uaPatterns: ["iframely"] },
1530
- { id: "curl", name: "cURL", category: "fetcher", organization: "Open Source", baseScore: 45, respectsRobots: false, uaPatterns: ["curl/"] },
1531
- { id: "wget", name: "Wget", category: "fetcher", organization: "GNU", baseScore: 45, respectsRobots: false, uaPatterns: ["wget/"] },
1532
- { id: "libwww-perl", name: "libwww-perl", category: "fetcher", organization: "Perl", baseScore: 50, respectsRobots: false, uaPatterns: ["libwww-perl"] },
1533
- { id: "lwp", name: "LWP", category: "fetcher", organization: "Perl", baseScore: 50, respectsRobots: false, uaPatterns: ["lwp-"] },
1534
- { id: "httrack", name: "HTTrack", category: "fetcher", organization: "Open Source", baseScore: 60, respectsRobots: true, uaPatterns: ["httrack"] },
1535
- { id: "webdecoybot", name: "WebDecoyBot", category: "monitoring", organization: "WebDecoy", baseScore: 5, respectsRobots: true, uaPatterns: ["webdecoybot"] },
1536
- { id: "uptimerobot", name: "UptimeRobot", category: "monitoring", organization: "UptimeRobot", baseScore: 20, respectsRobots: true, uaPatterns: ["uptimerobot"] },
1537
- { id: "pingdom", name: "Pingdom", category: "monitoring", organization: "SolarWinds", baseScore: 20, respectsRobots: true, uaPatterns: ["pingdom"] },
1538
- { id: "statuscake", name: "StatusCake", category: "monitoring", organization: "StatusCake", baseScore: 20, respectsRobots: true, uaPatterns: ["statuscake"] },
1539
- { id: "better-uptime", name: "Better Uptime", category: "monitoring", organization: "Better Stack", baseScore: 20, respectsRobots: true, uaPatterns: ["betteruptime"] },
1540
- { id: "datadog-synthetics", name: "Datadog Synthetics", category: "monitoring", organization: "Datadog", baseScore: 25, respectsRobots: true, uaPatterns: ["datadog"] },
1541
- { id: "newrelic", name: "New Relic", category: "monitoring", organization: "New Relic", baseScore: 25, respectsRobots: true, uaPatterns: ["newrelic"] },
1542
- { id: "site24x7", name: "Site24x7", category: "monitoring", organization: "Zoho", baseScore: 20, respectsRobots: true, uaPatterns: ["site24x7"] },
1543
- { id: "freshping", name: "Freshping", category: "monitoring", organization: "Freshworks", baseScore: 20, respectsRobots: true, uaPatterns: ["freshping"] },
1544
- { id: "hetrixtools", name: "HetrixTools", category: "monitoring", organization: "HetrixTools", baseScore: 20, respectsRobots: true, uaPatterns: ["hetrixtools"] },
1545
- { id: "nodeping", name: "NodePing", category: "monitoring", organization: "NodePing", baseScore: 20, respectsRobots: true, uaPatterns: ["nodeping"] },
1546
- { id: "gtmetrix", name: "GTmetrix", category: "monitoring", organization: "GTmetrix", baseScore: 20, respectsRobots: true, uaPatterns: ["gtmetrix"] },
1547
- { id: "chrome-lighthouse", name: "Lighthouse", category: "monitoring", organization: "Google", baseScore: 20, respectsRobots: true, uaPatterns: ["chrome-lighthouse", "google page speed"] },
1548
- { id: "feedly", name: "Feedly", category: "feed_reader", organization: "Feedly", baseScore: 25, respectsRobots: true, uaPatterns: ["feedly"] },
1549
- { id: "feedfetcher-google", name: "Feedfetcher-Google", category: "feed_reader", organization: "Google", baseScore: 25, respectsRobots: true, uaPatterns: ["feedfetcher"] },
1550
- { id: "newsblur", name: "NewsBlur", category: "feed_reader", organization: "NewsBlur", baseScore: 25, respectsRobots: true, uaPatterns: ["newsblur"] },
1551
- { id: "inoreader", name: "Inoreader", category: "feed_reader", organization: "Inoreader", baseScore: 25, respectsRobots: true, uaPatterns: ["inoreader"] },
1552
- { id: "theoldreader", name: "The Old Reader", category: "feed_reader", organization: "The Old Reader", baseScore: 25, respectsRobots: true, uaPatterns: ["theoldreader"] },
1553
- { id: "feedbin", name: "Feedbin", category: "feed_reader", organization: "Feedbin", baseScore: 25, respectsRobots: true, uaPatterns: ["feedbin"] },
1554
- { id: "miniflux", name: "Miniflux", category: "feed_reader", organization: "Open Source", baseScore: 25, respectsRobots: true, uaPatterns: ["miniflux"] },
1555
- { id: "freshrss", name: "FreshRSS", category: "feed_reader", organization: "Open Source", baseScore: 25, respectsRobots: true, uaPatterns: ["freshrss"] },
1556
- { id: "commafeed", name: "CommaFeed", category: "feed_reader", organization: "Open Source", baseScore: 25, respectsRobots: true, uaPatterns: ["commafeed"] },
1557
- { id: "diffbot", name: "Diffbot", category: "commercial_scraper", organization: "Diffbot", baseScore: 70, respectsRobots: true, uaPatterns: ["diffbot"] },
1558
- { id: "import-io", name: "Import.io", category: "commercial_scraper", organization: "Import.io", baseScore: 65, respectsRobots: true, uaPatterns: ["import.io"] },
1559
- { id: "bright-data", name: "Bright Data", category: "commercial_scraper", organization: "Bright Data", baseScore: 70, respectsRobots: false, uaPatterns: ["brightdata", "luminati"] },
1560
- { id: "oxylabs", name: "Oxylabs", category: "commercial_scraper", organization: "Oxylabs", baseScore: 70, respectsRobots: false, uaPatterns: ["oxylabs"] },
1561
- { id: "scrapingbee", name: "ScrapingBee", category: "commercial_scraper", organization: "ScrapingBee", baseScore: 65, respectsRobots: true, uaPatterns: ["scrapingbee"] },
1562
- { id: "scrapingant", name: "ScrapingAnt", category: "commercial_scraper", organization: "ScrapingAnt", baseScore: 65, respectsRobots: true, uaPatterns: ["scrapingant"] },
1563
- { id: "zyte", name: "Zyte", category: "commercial_scraper", organization: "Zyte", baseScore: 65, respectsRobots: true, uaPatterns: ["zyte", "scrapinghub"] },
1564
- { id: "apify", name: "Apify", category: "commercial_scraper", organization: "Apify", baseScore: 65, respectsRobots: true, uaPatterns: ["apify"] },
1565
- { id: "crawlbase", name: "Crawlbase", category: "commercial_scraper", organization: "Crawlbase", baseScore: 65, respectsRobots: true, uaPatterns: ["crawlbase"] },
1566
- { id: "webscrapingapi", name: "WebScrapingAPI", category: "commercial_scraper", organization: "WebScrapingAPI", baseScore: 65, respectsRobots: true, uaPatterns: ["webscrapingapi"] },
1567
- { id: "chatgpt-user", name: "ChatGPT-User", category: "ai_assistant", organization: "OpenAI", baseScore: 85, respectsRobots: true, uaPatterns: ["chatgpt-user"] },
1568
- { id: "perplexity-user", name: "Perplexity-User", category: "ai_assistant", organization: "Perplexity AI", baseScore: 75, respectsRobots: false, uaPatterns: ["perplexity-user"] },
1569
- { id: "mistralai-user", name: "MistralAI-User", category: "ai_assistant", organization: "Mistral AI", baseScore: 75, respectsRobots: true, uaPatterns: ["mistralai-user"] },
1570
- { id: "exauser", name: "ExaUser", category: "ai_assistant", organization: "Exa AI", baseScore: 70, respectsRobots: false, uaPatterns: ["exauser"] },
1571
- { id: "shap-user", name: "Shap-User", category: "ai_assistant", organization: "Parallel Web Systems", baseScore: 65, respectsRobots: false, uaPatterns: ["shap-user"] },
1572
- { id: "meta-externalfetcher", name: "Meta-ExternalFetcher", category: "ai_assistant", organization: "Meta", baseScore: 70, respectsRobots: false, uaPatterns: ["meta-externalfetcher"] },
1573
- { id: "gemini-deep-research", name: "Gemini-Deep-Research", category: "ai_assistant", organization: "Google", baseScore: 65, respectsRobots: true, uaPatterns: ["gemini-deep-research"] },
1574
- { id: "copilot", name: "Microsoft Copilot", category: "ai_assistant", organization: "Microsoft", baseScore: 65, respectsRobots: true, uaPatterns: ["copilot"] },
1575
- { id: "cortana", name: "Cortana", category: "ai_assistant", organization: "Microsoft", baseScore: 60, respectsRobots: true, uaPatterns: ["cortana"] },
1576
- { id: "siri", name: "Siri", category: "ai_assistant", organization: "Apple", baseScore: 60, respectsRobots: true, uaPatterns: ["siri"] }
1577
- ];
1396
+ return void 0;
1397
+ }
1398
+ function evaluateBinary(op, left, right, context) {
1399
+ if (op === "and") {
1400
+ const l2 = evaluate(left, context);
1401
+ if (l2 === void 0 || l2 === false) return false;
1402
+ const r2 = evaluate(right, context);
1403
+ if (r2 === void 0) return false;
1404
+ return !!r2;
1405
+ }
1406
+ if (op === "or") {
1407
+ const l2 = evaluate(left, context);
1408
+ if (l2 === void 0 ? false : !!l2) return true;
1409
+ const r2 = evaluate(right, context);
1410
+ if (r2 === void 0) return false;
1411
+ return !!r2;
1412
+ }
1413
+ const l = evaluate(left, context);
1414
+ const r = evaluate(right, context);
1415
+ if (l === void 0 || r === void 0) return false;
1416
+ switch (op) {
1417
+ case "==":
1418
+ return l === r;
1419
+ case "!=":
1420
+ return l !== r;
1421
+ case ">":
1422
+ return typeof l === "number" && typeof r === "number" && l > r;
1423
+ case ">=":
1424
+ return typeof l === "number" && typeof r === "number" && l >= r;
1425
+ case "<":
1426
+ return typeof l === "number" && typeof r === "number" && l < r;
1427
+ case "<=":
1428
+ return typeof l === "number" && typeof r === "number" && l <= r;
1429
+ case "in": {
1430
+ if (!Array.isArray(r)) return false;
1431
+ return r.includes(l);
1432
+ }
1433
+ case "not in": {
1434
+ if (!Array.isArray(r)) return false;
1435
+ return !r.includes(l);
1436
+ }
1437
+ case "matches": {
1438
+ if (typeof l !== "string" || typeof r !== "string") return false;
1439
+ if (r.length > MAX_REGEX_LENGTH) return false;
1440
+ try {
1441
+ return new RegExp(r).test(l);
1442
+ } catch {
1443
+ return false;
1444
+ }
1445
+ }
1446
+ default:
1447
+ return false;
1448
+ }
1449
+ }
1578
1450
 
1579
- // src/bots/index.ts
1580
- var AI_CATEGORIES = /* @__PURE__ */ new Set([
1581
- "training_crawler",
1582
- "ai_search_crawler",
1583
- "ai_agent",
1584
- "ai_assistant"
1585
- ]);
1586
- var UNKNOWN = Object.freeze({
1587
- known: false,
1588
- category: "none",
1589
- score: 0,
1590
- isAI: false
1591
- });
1592
- var MAX_CACHE = 1e3;
1593
- var cache = /* @__PURE__ */ new Map();
1594
- function matchUserAgent(userAgent) {
1595
- if (!userAgent) return void 0;
1596
- const cached = cache.get(userAgent);
1597
- if (cached !== void 0) return cached ?? void 0;
1598
- const ua = userAgent.toLowerCase();
1599
- let found = null;
1600
- for (const agent of BOT_REGISTRY) {
1601
- for (const pattern of agent.uaPatterns) {
1602
- if (ua.includes(pattern)) {
1603
- found = agent;
1604
- break;
1451
+ // src/rules/filter-rule.ts
1452
+ var FilterRule = class {
1453
+ constructor(config) {
1454
+ this.expression = config.expression;
1455
+ this.action = config.action ?? "DENY";
1456
+ this.dryRun = config.dryRun ?? false;
1457
+ this.name = `filter:${this.expression.slice(0, 50)}`;
1458
+ const parser = new Parser(config.expression);
1459
+ this.ast = parser.parse();
1460
+ }
1461
+ evaluate(context) {
1462
+ if (!context.enrichment && this.expression.includes("ip.")) {
1463
+ return {
1464
+ action: "ALLOW",
1465
+ rule: this.name,
1466
+ state: "NOT_RUN",
1467
+ reason: "No IP enrichment available \u2014 filter needs an API key"
1468
+ };
1469
+ }
1470
+ const result = evaluate(this.ast, context);
1471
+ if (result) {
1472
+ return {
1473
+ action: this.dryRun ? "ALLOW" : this.action,
1474
+ rule: this.name,
1475
+ reason: `Filter matched: ${this.expression}`,
1476
+ metadata: {
1477
+ expression: this.expression,
1478
+ dryRun: this.dryRun
1479
+ }
1480
+ };
1481
+ }
1482
+ return {
1483
+ action: "ALLOW",
1484
+ rule: this.name
1485
+ };
1486
+ }
1487
+ };
1488
+
1489
+ // src/rules/tripwire-rule.ts
1490
+ var DEFAULT_TRIPWIRE_PATHS = [
1491
+ "/.git/config",
1492
+ "/.git/HEAD",
1493
+ "/.env",
1494
+ "/.env.local",
1495
+ "/.env.production",
1496
+ "/wp-config.php",
1497
+ "/config.php",
1498
+ "/.aws/credentials",
1499
+ "/.ssh/id_rsa",
1500
+ "/backup.zip",
1501
+ "/backup.sql",
1502
+ "/database.sql",
1503
+ "/dump.sql",
1504
+ "/.DS_Store",
1505
+ "/phpinfo.php",
1506
+ "/server-status",
1507
+ "/actuator/env",
1508
+ "/.vscode/sftp.json"
1509
+ ];
1510
+ function canonicalizeTripwirePath(path) {
1511
+ const noQuery = path.split("?")[0].split("#")[0];
1512
+ return cleanSlashesAndDots(decodePercentAscii(noQuery));
1513
+ }
1514
+ function decodePercentAscii(s) {
1515
+ for (let i = 0; i < 4; i++) {
1516
+ const next = decodePercentAsciiOnce(s);
1517
+ if (next === s) break;
1518
+ s = next;
1519
+ }
1520
+ return s;
1521
+ }
1522
+ function decodePercentAsciiOnce(s) {
1523
+ if (!s.includes("%")) return s;
1524
+ let out = "";
1525
+ for (let i = 0; i < s.length; i++) {
1526
+ if (s[i] === "%" && i + 2 < s.length) {
1527
+ const hi = unhexNibble(s.charCodeAt(i + 1));
1528
+ const lo = unhexNibble(s.charCodeAt(i + 2));
1529
+ if (hi >= 0 && lo >= 0) {
1530
+ const v = hi << 4 | lo;
1531
+ if (v < 128) {
1532
+ out += String.fromCharCode(v);
1533
+ i += 2;
1534
+ continue;
1535
+ }
1605
1536
  }
1606
1537
  }
1607
- if (found) break;
1538
+ out += s[i];
1608
1539
  }
1609
- if (cache.size >= MAX_CACHE) cache.clear();
1610
- cache.set(userAgent, found);
1611
- return found ?? void 0;
1540
+ return out;
1612
1541
  }
1613
- function classifyUserAgent(userAgent) {
1614
- const agent = matchUserAgent(userAgent);
1615
- if (!agent) return UNKNOWN;
1616
- return {
1617
- known: true,
1618
- id: agent.id,
1619
- name: agent.name,
1620
- category: agent.category,
1621
- organization: agent.organization,
1622
- score: agent.baseScore,
1623
- respectsRobots: agent.respectsRobots,
1624
- isAI: AI_CATEGORIES.has(agent.category)
1625
- };
1542
+ function unhexNibble(c) {
1543
+ if (c >= 48 && c <= 57) return c - 48;
1544
+ if (c >= 97 && c <= 102) return c - 97 + 10;
1545
+ if (c >= 65 && c <= 70) return c - 65 + 10;
1546
+ return -1;
1547
+ }
1548
+ function cleanSlashesAndDots(s) {
1549
+ if (s === "") return s;
1550
+ const hadTrailing = s.length > 1 && s[s.length - 1] === "/";
1551
+ const stack = [];
1552
+ for (const p of s.split("/")) {
1553
+ if (p === "" || p === ".") continue;
1554
+ if (p === "..") {
1555
+ if (stack.length > 0) stack.pop();
1556
+ continue;
1557
+ }
1558
+ stack.push(p);
1559
+ }
1560
+ let res = "/" + stack.join("/");
1561
+ if (hadTrailing && res !== "/") res += "/";
1562
+ return res;
1626
1563
  }
1564
+ var TripwireRule = class {
1565
+ constructor(config = {}) {
1566
+ this.name = "tripwire";
1567
+ const paths = [...config.paths ?? []];
1568
+ if (config.includeDefaults ?? true) paths.push(...DEFAULT_TRIPWIRE_PATHS);
1569
+ this.exact = new Set(paths.map(canonicalizeTripwirePath));
1570
+ this.prefixes = (config.prefixes ?? []).map(canonicalizeTripwirePath);
1571
+ this.patterns = config.patterns ?? [];
1572
+ this.action = config.action ?? "DENY";
1573
+ this.dryRun = config.dryRun ?? false;
1574
+ }
1575
+ evaluate(context) {
1576
+ const path = canonicalizeTripwirePath(context.path);
1577
+ const hit = this.exact.has(path) || this.prefixes.some((prefix) => path.startsWith(prefix)) || this.patterns.some((re2) => re2.test(path));
1578
+ if (hit) {
1579
+ return {
1580
+ action: this.dryRun ? "ALLOW" : this.action,
1581
+ rule: this.name,
1582
+ reason: `Tripwire hit: ${path} \u2014 hidden honeypot path, deterministic automated-intent signal`,
1583
+ metadata: { path, dryRun: this.dryRun, confidence: 100 }
1584
+ };
1585
+ }
1586
+ return { action: "ALLOW", rule: this.name };
1587
+ }
1588
+ };
1589
+
1590
+ // src/rules/bot-rule.ts
1591
+ var BotRule = class {
1592
+ constructor(config = {}) {
1593
+ this.name = "bots";
1594
+ this.categories = new Set(config.categories ?? []);
1595
+ this.agents = new Set((config.agents ?? []).map((a) => a.toLowerCase()));
1596
+ this.ai = config.ai ?? false;
1597
+ this.allow = new Set((config.allow ?? []).map((a) => a.toLowerCase()));
1598
+ this.action = config.action ?? "DENY";
1599
+ this.dryRun = config.dryRun ?? false;
1600
+ }
1601
+ evaluate(context) {
1602
+ const bot = context.bot;
1603
+ if (!bot?.known) return { action: "ALLOW", rule: this.name };
1604
+ const id = bot.id?.toLowerCase();
1605
+ const name = bot.name?.toLowerCase();
1606
+ if (id && this.allow.has(id) || name && this.allow.has(name)) {
1607
+ return { action: "ALLOW", rule: this.name };
1608
+ }
1609
+ const matched = this.ai && bot.isAI || this.categories.has(bot.category) || id !== void 0 && this.agents.has(id) || name !== void 0 && this.agents.has(name);
1610
+ if (!matched) return { action: "ALLOW", rule: this.name };
1611
+ return {
1612
+ action: this.dryRun ? "ALLOW" : this.action,
1613
+ rule: this.name,
1614
+ reason: `${bot.name ?? "Bot"} (${bot.category}) matched a bot policy rule`,
1615
+ metadata: {
1616
+ bot: bot.id,
1617
+ botName: bot.name,
1618
+ category: bot.category,
1619
+ organization: bot.organization,
1620
+ dryRun: this.dryRun,
1621
+ // Deliberately not 100. The match is a self-declared User-Agent, and a
1622
+ // downstream consumer that treats this like a tripwire hit would be
1623
+ // wrong: a tripwire proves behaviour, this repeats a claim.
1624
+ confidence: 70
1625
+ }
1626
+ };
1627
+ }
1628
+ };
1627
1629
 
1628
1630
  // src/rules/bot-policy.ts
1629
1631
  var AI_CATEGORIES2 = /* @__PURE__ */ new Set([
@@ -5030,7 +5032,7 @@ async function wr(e, t, r) {
5030
5032
  return false;
5031
5033
  }
5032
5034
  }
5033
- var Ye = [["reflectionbot", "Reflectionbot", "reflectionbot", "crawler"], ["gptbot", "GPTBot", "gptbot", "crawler"], ["claudebot", "ClaudeBot", "claudebot", "crawler"], ["anthropic-ai", "Anthropic", "anthropic", "crawler"], ["claude-web", "Claude-Web", "claude-web", "crawler"], ["ccbot", "CCBot", "ccbot", "crawler"], ["google-extended", "Google-Extended", "google-extended", "crawler"], ["bytespider", "ByteSpider", "bytespider", "crawler"], ["amazonbot", "Amazonbot", "amazonbot", "crawler"], ["facebookbot", "FacebookBot", "facebookbot", "crawler"], ["meta-externalagent", "Meta-ExternalAgent", "meta-externalagent", "crawler"], ["cohere-ai", "Cohere", "cohere-ai", "crawler"], ["cohere", "Cohere", "cohere-ai", "crawler"], ["applebot-extended", "Applebot-Extended", "applebot-extended", "crawler"], ["youbot", "YouBot", "youbot", "crawler"], ["mistralbot", "MistralBot", "mistral", "crawler"], ["gemini", "Gemini", "gemini", "crawler"], ["ai2bot", "AI2Bot", "ai2bot", "crawler"], ["deepseek", "DeepSeek", "deepseek", "crawler"], ["qwen", "Qwen", "qwen", "crawler"], ["webzio", "Webz.io", "webzio", "crawler"], ["sentibot", "Sentibot", "sentibot", "crawler"], ["omgili", "Omgili", "omgili", "crawler"], ["img2dataset", "img2dataset", "img2dataset", "crawler"], ["timpibot", "Timpibot", "timpibot", "crawler"], ["velenpublicwebcrawler", "VelenPublicWebCrawler", "velenpublicwebcrawler", "crawler"], ["isscyberriskcrawler", "ISSCyberRiskCrawler", "isscyberriskcrawler", "crawler"], ["friendlycrawler", "FriendlyCrawler", "friendlycrawler", "crawler"], ["duckassistbot", "DuckAssistBot", "duckassistbot", "crawler"], ["sofyabot", "SofyaBot", "sofyabot", "crawler"], ["xai-searchbot", "xAI-SearchBot", "xai-searchbot", "crawler"], ["linkupbot", "LinkupBot", "linkupbot", "crawler"], ["perplexitybot", "PerplexityBot", "perplexitybot", "crawler"], ["claude-searchbot", "Claude-SearchBot", "claude-searchbot", "crawler"], ["oai-searchbot", "OAI-SearchBot", "oai-searchbot", "crawler"], ["searchgpt", "SearchGPT", "searchgpt", "crawler"], ["phind", "Phind", "phind", "crawler"], ["kagi", "Kagi", "kagi", "crawler"], ["exasearchbot", "Exa", "exa", "crawler"], ["exabot", "Exa", "exa", "crawler"], ["shapbot", "ShapBot", "shapbot", "crawler"], ["meta-webindexer", "Meta-WebIndexer", "meta-webindexer", "crawler"], ["metaphor", "Metaphor", "metaphor", "crawler"], ["tavily", "Tavily", "tavily", "crawler"], ["bravesearch", "BraveSearch", "brave-search", "crawler"], ["neevabot", "NeevaBot", "neeva", "crawler"], ["operator", "Operator", "operator", "crawler"], ["claude-user", "Claude-User", "claude-user", "crawler"], ["gemini-user", "Gemini-User", "gemini-user", "crawler"], ["googleagent-mariner", "GoogleAgent-Mariner", "googleagent-mariner", "crawler"], ["mariner", "GoogleAgent-Mariner", "googleagent-mariner", "crawler"], ["amazonbuyforme", "AmazonBuyForMe", "amazon-buyforme", "crawler"], ["buyforme", "AmazonBuyForMe", "amazon-buyforme", "crawler"], ["browser-use", "Browser-Use", "browser-use", "crawler"], ["stagehand", "Stagehand", "stagehand", "crawler"], ["manus-user", "Manus-User", "manus-user", "crawler"], ["multion", "MultiOn", "multion", "crawler"], ["iboubot", "IbouBot", "iboubot", "crawler"], ["googlebot", "Googlebot", "googlebot", "crawler"], ["google-inspectiontool", "Google-InspectionTool", "google-inspectiontool", "crawler"], ["bingbot", "Bingbot", "bingbot", "crawler"], ["msnbot", "MSNBot", "msnbot", "crawler"], ["yandexbot", "YandexBot", "yandexbot", "crawler"], ["baiduspider", "Baiduspider", "baiduspider", "crawler"], ["duckduckbot", "DuckDuckBot", "duckduckbot", "crawler"], ["applebot", "Applebot", "applebot", "crawler"], ["sogou", "Sogou Spider", "sogou", "crawler"], ["qwantify", "Qwantify", "qwantify", "crawler"], ["naver", "Naver", "naver", "crawler"], ["yeti", "Naver", "naver", "crawler"], ["seznambot", "SeznamBot", "seznam", "crawler"], ["ecosia", "Ecosia", "ecosia", "crawler"], ["mojeekbot", "MojeekBot", "mojeek", "crawler"], ["slurp", "Yahoo! Slurp", "yahoo-slurp", "crawler"], ["ahrefsbot", "AhrefsBot", "ahrefsbot", "crawler"], ["ahrefs", "AhrefsBot", "ahrefsbot", "crawler"], ["semrushbot", "SemrushBot", "semrushbot", "crawler"], ["semrush", "SemrushBot", "semrushbot", "crawler"], ["mj12bot", "MJ12bot", "mj12bot", "crawler"], ["dotbot", "DotBot", "dotbot", "crawler"], ["rogerbot", "Rogerbot", "rogerbot", "crawler"], ["screaming frog", "Screaming Frog", "screaming-frog", "crawler"], ["sitebulb", "Sitebulb", "sitebulb", "crawler"], ["deepcrawl", "DeepCrawl", "deepcrawl", "crawler"], ["oncrawl", "OnCrawl", "oncrawl", "crawler"], ["botify", "Botify", "botify", "crawler"], ["contentking", "ContentKing", "contentking", "crawler"], ["sistrix", "SISTRIX", "sistrix", "crawler"], ["serpstat", "Serpstat", "serpstat", "crawler"], ["spyfu", "SpyFu", "spyfu", "crawler"], ["nessus", "Nessus", "nessus", "crawler"], ["qualys", "Qualys", "qualys", "crawler"], ["shodan", "Shodan", "shodan", "crawler"], ["censys", "Censys", "censys", "crawler"], ["nmap", "Nmap", "nmap", "crawler"], ["zap/", "OWASP ZAP", "zap", "crawler"], ["burp", "Burp Suite", "burp", "crawler"], ["nikto", "Nikto", "nikto", "crawler"], ["nuclei", "Nuclei", "nuclei", "crawler"], ["acunetix", "Acunetix", "acunetix", "crawler"], ["netsparker", "Netsparker", "netsparker", "crawler"], ["detectify", "Detectify", "detectify", "crawler"], ["intruder", "Intruder", "intruder", "crawler"], ["python-requests", "Python-Requests", "python-requests", "tool"], ["python-urllib", "Python-urllib", "python-urllib", "tool"], ["python/", "Python", "python", "tool"], ["scrapy", "Scrapy", "scrapy", "tool"], ["httpx", "HTTPX", "httpx", "tool"], ["aiohttp", "aiohttp", "aiohttp", "tool"], ["beautifulsoup", "BeautifulSoup", "beautifulsoup", "tool"], ["node-fetch", "node-fetch", "node-fetch", "tool"], ["axios/", "Axios", "axios", "tool"], ["got/", "Got", "got", "tool"], ["undici", "Undici", "undici", "tool"], ["go-http-client", "Go-HTTP-Client", "go-http-client", "tool"], ["colly", "Colly", "colly", "tool"], ["java/", "Java", "java", "tool"], ["okhttp", "OkHttp", "okhttp", "tool"], ["apache-httpclient", "Apache-HttpClient", "apache-httpclient", "tool"], ["jsoup", "Jsoup", "jsoup", "tool"], ["guzzlehttp", "GuzzleHttp", "guzzlehttp", "tool"], ["php/", "PHP", "php", "tool"], ["ruby", "Ruby", "ruby", "tool"], ["faraday", "Faraday", "faraday", "tool"], ["mechanize", "Mechanize", "mechanize", "tool"], ["headlesschrome", "HeadlessChrome", "headlesschrome", "tool"], ["puppeteer", "Puppeteer", "puppeteer", "tool"], ["playwright", "Playwright", "playwright", "tool"], ["selenium", "Selenium", "selenium", "tool"], ["phantomjs", "PhantomJS", "phantomjs", "tool"], ["splash", "Splash", "splash", "tool"], ["browserless", "Browserless", "browserless", "tool"], ["browserbase", "Browserbase", "browserbase", "tool"], ["ia_archiver", "Internet Archive", "ia-archiver", "crawler"], ["archive.org_bot", "Archive.org", "archive-org-bot", "crawler"], ["wayback", "Wayback Machine", "wayback", "crawler"], ["heritrix", "Heritrix", "heritrix", "crawler"], ["brozzler", "Brozzler", "brozzler", "crawler"], ["facebookexternalhit", "Facebook", "facebookexternalhit", "crawler"], ["facebot", "Facebot", "facebot", "crawler"], ["twitterbot", "Twitterbot", "twitterbot", "crawler"], ["linkedinbot", "LinkedInBot", "linkedinbot", "crawler"], ["slackbot", "Slackbot", "slackbot", "crawler"], ["telegrambot", "TelegramBot", "telegrambot", "crawler"], ["whatsapp", "WhatsApp", "whatsapp", "crawler"], ["discordbot", "Discordbot", "discordbot", "crawler"], ["pinterest", "Pinterest", "pinterestbot", "crawler"], ["tumblr", "Tumblr", "tumblr", "crawler"], ["reddit", "Reddit", "reddit", "crawler"], ["embedly", "Embedly", "embedly", "crawler"], ["iframely", "Iframely", "iframely", "crawler"], ["curl/", "cURL", "curl", "tool"], ["wget/", "Wget", "wget", "tool"], ["libwww-perl", "libwww-perl", "libwww-perl", "tool"], ["lwp-", "LWP", "lwp", "tool"], ["httrack", "HTTrack", "httrack", "tool"], ["webdecoybot", "WebDecoyBot", "webdecoybot", "crawler"], ["uptimerobot", "UptimeRobot", "uptimerobot", "crawler"], ["pingdom", "Pingdom", "pingdom", "crawler"], ["statuscake", "StatusCake", "statuscake", "crawler"], ["betteruptime", "Better Uptime", "better-uptime", "crawler"], ["datadog", "Datadog Synthetics", "datadog-synthetics", "crawler"], ["newrelic", "New Relic", "newrelic", "crawler"], ["site24x7", "Site24x7", "site24x7", "crawler"], ["freshping", "Freshping", "freshping", "crawler"], ["hetrixtools", "HetrixTools", "hetrixtools", "crawler"], ["nodeping", "NodePing", "nodeping", "crawler"], ["gtmetrix", "GTmetrix", "gtmetrix", "crawler"], ["chrome-lighthouse", "Lighthouse", "chrome-lighthouse", "crawler"], ["google page speed", "Lighthouse", "chrome-lighthouse", "crawler"], ["feedly", "Feedly", "feedly", "crawler"], ["feedfetcher", "Feedfetcher-Google", "feedfetcher-google", "crawler"], ["newsblur", "NewsBlur", "newsblur", "crawler"], ["inoreader", "Inoreader", "inoreader", "crawler"], ["theoldreader", "The Old Reader", "theoldreader", "crawler"], ["feedbin", "Feedbin", "feedbin", "crawler"], ["miniflux", "Miniflux", "miniflux", "crawler"], ["freshrss", "FreshRSS", "freshrss", "crawler"], ["commafeed", "CommaFeed", "commafeed", "crawler"], ["diffbot", "Diffbot", "diffbot", "crawler"], ["import.io", "Import.io", "import-io", "crawler"], ["brightdata", "Bright Data", "bright-data", "crawler"], ["luminati", "Bright Data", "bright-data", "crawler"], ["oxylabs", "Oxylabs", "oxylabs", "crawler"], ["scrapingbee", "ScrapingBee", "scrapingbee", "crawler"], ["scrapingant", "ScrapingAnt", "scrapingant", "crawler"], ["zyte", "Zyte", "zyte", "crawler"], ["scrapinghub", "Zyte", "zyte", "crawler"], ["apify", "Apify", "apify", "crawler"], ["crawlbase", "Crawlbase", "crawlbase", "crawler"], ["webscrapingapi", "WebScrapingAPI", "webscrapingapi", "crawler"], ["chatgpt-user", "ChatGPT-User", "chatgpt-user", "crawler"], ["perplexity-user", "Perplexity-User", "perplexity-user", "crawler"], ["mistralai-user", "MistralAI-User", "mistralai-user", "crawler"], ["exauser", "ExaUser", "exauser", "crawler"], ["shap-user", "Shap-User", "shap-user", "crawler"], ["meta-externalfetcher", "Meta-ExternalFetcher", "meta-externalfetcher", "crawler"], ["gemini-deep-research", "Gemini-Deep-Research", "gemini-deep-research", "crawler"], ["copilot", "Microsoft Copilot", "copilot", "crawler"], ["cortana", "Cortana", "cortana", "crawler"], ["siri", "Siri", "siri", "crawler"]];
5035
+ var Ye = [["reflectionbot", "Reflectionbot", "reflectionbot", "crawler"], ["gptbot", "GPTBot", "gptbot", "crawler"], ["claudebot", "ClaudeBot", "claudebot", "crawler"], ["anthropic-ai", "Anthropic", "anthropic", "crawler"], ["claude-web", "Claude-Web", "claude-web", "crawler"], ["ccbot", "CCBot", "ccbot", "crawler"], ["google-extended", "Google-Extended", "google-extended", "crawler"], ["bytespider", "ByteSpider", "bytespider", "crawler"], ["amazonbot", "Amazonbot", "amazonbot", "crawler"], ["facebookbot", "FacebookBot", "facebookbot", "crawler"], ["meta-externalagent", "Meta-ExternalAgent", "meta-externalagent", "crawler"], ["cohere-ai", "Cohere", "cohere-ai", "crawler"], ["cohere", "Cohere", "cohere-ai", "crawler"], ["applebot-extended", "Applebot-Extended", "applebot-extended", "crawler"], ["youbot", "YouBot", "youbot", "crawler"], ["mistralbot", "MistralBot", "mistral", "crawler"], ["gemini", "Gemini", "gemini", "crawler"], ["ai2bot", "AI2Bot", "ai2bot", "crawler"], ["deepseek", "DeepSeek", "deepseek", "crawler"], ["qwen", "Qwen", "qwen", "crawler"], ["webzio", "Webz.io", "webzio", "crawler"], ["sentibot", "Sentibot", "sentibot", "crawler"], ["omgili", "Omgili", "omgili", "crawler"], ["img2dataset", "img2dataset", "img2dataset", "crawler"], ["timpibot", "Timpibot", "timpibot", "crawler"], ["velenpublicwebcrawler", "VelenPublicWebCrawler", "velenpublicwebcrawler", "crawler"], ["isscyberriskcrawler", "ISSCyberRiskCrawler", "isscyberriskcrawler", "crawler"], ["friendlycrawler", "FriendlyCrawler", "friendlycrawler", "crawler"], ["duckassistbot", "DuckAssistBot", "duckassistbot", "crawler"], ["sofyabot", "SofyaBot", "sofyabot", "crawler"], ["xai-searchbot", "xAI-SearchBot", "xai-searchbot", "crawler"], ["linkupbot", "LinkupBot", "linkupbot", "crawler"], ["perplexitybot", "PerplexityBot", "perplexitybot", "crawler"], ["claude-searchbot", "Claude-SearchBot", "claude-searchbot", "crawler"], ["oai-searchbot", "OAI-SearchBot", "oai-searchbot", "crawler"], ["searchgpt", "SearchGPT", "searchgpt", "crawler"], ["phind", "Phind", "phind", "crawler"], ["kagi", "Kagi", "kagi", "crawler"], ["exasearchbot", "Exa", "exa", "crawler"], ["exabot", "Exa", "exa", "crawler"], ["shapbot", "ShapBot", "shapbot", "crawler"], ["meta-webindexer", "Meta-WebIndexer", "meta-webindexer", "crawler"], ["metaphor", "Metaphor", "metaphor", "crawler"], ["tavily", "Tavily", "tavily", "crawler"], ["bravesearch", "BraveSearch", "brave-search", "crawler"], ["neevabot", "NeevaBot", "neeva", "crawler"], ["operator", "Operator", "operator", "crawler"], ["claude-user", "Claude-User", "claude-user", "crawler"], ["gemini-user", "Gemini-User", "gemini-user", "crawler"], ["googleagent-mariner", "GoogleAgent-Mariner", "googleagent-mariner", "crawler"], ["mariner", "GoogleAgent-Mariner", "googleagent-mariner", "crawler"], ["amazonbuyforme", "AmazonBuyForMe", "amazon-buyforme", "crawler"], ["buyforme", "AmazonBuyForMe", "amazon-buyforme", "crawler"], ["browser-use", "Browser-Use", "browser-use", "crawler"], ["stagehand", "Stagehand", "stagehand", "crawler"], ["manus-user", "Manus-User", "manus-user", "crawler"], ["multion", "MultiOn", "multion", "crawler"], ["iboubot", "IbouBot", "iboubot", "crawler"], ["googlebot", "Googlebot", "googlebot", "crawler"], ["google-inspectiontool", "Google-InspectionTool", "google-inspectiontool", "crawler"], ["bingbot", "Bingbot", "bingbot", "crawler"], ["msnbot", "MSNBot", "msnbot", "crawler"], ["yandexbot", "YandexBot", "yandexbot", "crawler"], ["baiduspider", "Baiduspider", "baiduspider", "crawler"], ["petalbot", "PetalBot", "petalbot", "crawler"], ["duckduckbot", "DuckDuckBot", "duckduckbot", "crawler"], ["applebot", "Applebot", "applebot", "crawler"], ["sogou", "Sogou Spider", "sogou", "crawler"], ["qwantify", "Qwantify", "qwantify", "crawler"], ["naver", "Naver", "naver", "crawler"], ["yeti", "Naver", "naver", "crawler"], ["seznambot", "SeznamBot", "seznam", "crawler"], ["ecosia", "Ecosia", "ecosia", "crawler"], ["mojeekbot", "MojeekBot", "mojeek", "crawler"], ["slurp", "Yahoo! Slurp", "yahoo-slurp", "crawler"], ["ahrefsbot", "AhrefsBot", "ahrefsbot", "crawler"], ["ahrefs", "AhrefsBot", "ahrefsbot", "crawler"], ["semrushbot", "SemrushBot", "semrushbot", "crawler"], ["semrush", "SemrushBot", "semrushbot", "crawler"], ["mj12bot", "MJ12bot", "mj12bot", "crawler"], ["dotbot", "DotBot", "dotbot", "crawler"], ["rogerbot", "Rogerbot", "rogerbot", "crawler"], ["screaming frog", "Screaming Frog", "screaming-frog", "crawler"], ["sitebulb", "Sitebulb", "sitebulb", "crawler"], ["deepcrawl", "DeepCrawl", "deepcrawl", "crawler"], ["oncrawl", "OnCrawl", "oncrawl", "crawler"], ["botify", "Botify", "botify", "crawler"], ["contentking", "ContentKing", "contentking", "crawler"], ["sistrix", "SISTRIX", "sistrix", "crawler"], ["serpstat", "Serpstat", "serpstat", "crawler"], ["spyfu", "SpyFu", "spyfu", "crawler"], ["nessus", "Nessus", "nessus", "crawler"], ["qualys", "Qualys", "qualys", "crawler"], ["shodan", "Shodan", "shodan", "crawler"], ["censys", "Censys", "censys", "crawler"], ["nmap", "Nmap", "nmap", "crawler"], ["zap/", "OWASP ZAP", "zap", "crawler"], ["burp", "Burp Suite", "burp", "crawler"], ["nikto", "Nikto", "nikto", "crawler"], ["nuclei", "Nuclei", "nuclei", "crawler"], ["acunetix", "Acunetix", "acunetix", "crawler"], ["netsparker", "Netsparker", "netsparker", "crawler"], ["detectify", "Detectify", "detectify", "crawler"], ["intruder", "Intruder", "intruder", "crawler"], ["python-requests", "Python-Requests", "python-requests", "tool"], ["python-urllib", "Python-urllib", "python-urllib", "tool"], ["python/", "Python", "python", "tool"], ["scrapy", "Scrapy", "scrapy", "tool"], ["httpx", "HTTPX", "httpx", "tool"], ["aiohttp", "aiohttp", "aiohttp", "tool"], ["beautifulsoup", "BeautifulSoup", "beautifulsoup", "tool"], ["node-fetch", "node-fetch", "node-fetch", "tool"], ["axios/", "Axios", "axios", "tool"], ["got/", "Got", "got", "tool"], ["undici", "Undici", "undici", "tool"], ["go-http-client", "Go-HTTP-Client", "go-http-client", "tool"], ["colly", "Colly", "colly", "tool"], ["java/", "Java", "java", "tool"], ["okhttp", "OkHttp", "okhttp", "tool"], ["apache-httpclient", "Apache-HttpClient", "apache-httpclient", "tool"], ["jsoup", "Jsoup", "jsoup", "tool"], ["guzzlehttp", "GuzzleHttp", "guzzlehttp", "tool"], ["php/", "PHP", "php", "tool"], ["ruby", "Ruby", "ruby", "tool"], ["faraday", "Faraday", "faraday", "tool"], ["mechanize", "Mechanize", "mechanize", "tool"], ["headlesschrome", "HeadlessChrome", "headlesschrome", "tool"], ["puppeteer", "Puppeteer", "puppeteer", "tool"], ["playwright", "Playwright", "playwright", "tool"], ["selenium", "Selenium", "selenium", "tool"], ["phantomjs", "PhantomJS", "phantomjs", "tool"], ["splash", "Splash", "splash", "tool"], ["browserless", "Browserless", "browserless", "tool"], ["browserbase", "Browserbase", "browserbase", "tool"], ["ia_archiver", "Internet Archive", "ia-archiver", "crawler"], ["archive.org_bot", "Archive.org", "archive-org-bot", "crawler"], ["wayback", "Wayback Machine", "wayback", "crawler"], ["heritrix", "Heritrix", "heritrix", "crawler"], ["brozzler", "Brozzler", "brozzler", "crawler"], ["facebookexternalhit", "Facebook", "facebookexternalhit", "crawler"], ["facebot", "Facebot", "facebot", "crawler"], ["twitterbot", "Twitterbot", "twitterbot", "crawler"], ["linkedinbot", "LinkedInBot", "linkedinbot", "crawler"], ["slackbot", "Slackbot", "slackbot", "crawler"], ["telegrambot", "TelegramBot", "telegrambot", "crawler"], ["whatsapp", "WhatsApp", "whatsapp", "crawler"], ["discordbot", "Discordbot", "discordbot", "crawler"], ["pinterest", "Pinterest", "pinterestbot", "crawler"], ["tumblr", "Tumblr", "tumblr", "crawler"], ["reddit", "Reddit", "reddit", "crawler"], ["embedly", "Embedly", "embedly", "crawler"], ["iframely", "Iframely", "iframely", "crawler"], ["curl/", "cURL", "curl", "tool"], ["wget/", "Wget", "wget", "tool"], ["libwww-perl", "libwww-perl", "libwww-perl", "tool"], ["lwp-", "LWP", "lwp", "tool"], ["httrack", "HTTrack", "httrack", "tool"], ["webdecoybot", "WebDecoyBot", "webdecoybot", "crawler"], ["uptimerobot", "UptimeRobot", "uptimerobot", "crawler"], ["pingdom", "Pingdom", "pingdom", "crawler"], ["statuscake", "StatusCake", "statuscake", "crawler"], ["betteruptime", "Better Uptime", "better-uptime", "crawler"], ["datadog", "Datadog Synthetics", "datadog-synthetics", "crawler"], ["newrelic", "New Relic", "newrelic", "crawler"], ["site24x7", "Site24x7", "site24x7", "crawler"], ["freshping", "Freshping", "freshping", "crawler"], ["hetrixtools", "HetrixTools", "hetrixtools", "crawler"], ["nodeping", "NodePing", "nodeping", "crawler"], ["gtmetrix", "GTmetrix", "gtmetrix", "crawler"], ["chrome-lighthouse", "Lighthouse", "chrome-lighthouse", "crawler"], ["google page speed", "Lighthouse", "chrome-lighthouse", "crawler"], ["feedly", "Feedly", "feedly", "crawler"], ["feedfetcher", "Feedfetcher-Google", "feedfetcher-google", "crawler"], ["newsblur", "NewsBlur", "newsblur", "crawler"], ["inoreader", "Inoreader", "inoreader", "crawler"], ["theoldreader", "The Old Reader", "theoldreader", "crawler"], ["feedbin", "Feedbin", "feedbin", "crawler"], ["miniflux", "Miniflux", "miniflux", "crawler"], ["freshrss", "FreshRSS", "freshrss", "crawler"], ["commafeed", "CommaFeed", "commafeed", "crawler"], ["diffbot", "Diffbot", "diffbot", "crawler"], ["import.io", "Import.io", "import-io", "crawler"], ["brightdata", "Bright Data", "bright-data", "crawler"], ["luminati", "Bright Data", "bright-data", "crawler"], ["oxylabs", "Oxylabs", "oxylabs", "crawler"], ["scrapingbee", "ScrapingBee", "scrapingbee", "crawler"], ["scrapingant", "ScrapingAnt", "scrapingant", "crawler"], ["zyte", "Zyte", "zyte", "crawler"], ["scrapinghub", "Zyte", "zyte", "crawler"], ["apify", "Apify", "apify", "crawler"], ["crawlbase", "Crawlbase", "crawlbase", "crawler"], ["webscrapingapi", "WebScrapingAPI", "webscrapingapi", "crawler"], ["chatgpt-user", "ChatGPT-User", "chatgpt-user", "crawler"], ["perplexity-user", "Perplexity-User", "perplexity-user", "crawler"], ["mistralai-user", "MistralAI-User", "mistralai-user", "crawler"], ["exauser", "ExaUser", "exauser", "crawler"], ["shap-user", "Shap-User", "shap-user", "crawler"], ["meta-externalfetcher", "Meta-ExternalFetcher", "meta-externalfetcher", "crawler"], ["gemini-deep-research", "Gemini-Deep-Research", "gemini-deep-research", "crawler"], ["copilot", "Microsoft Copilot", "copilot", "crawler"], ["cortana", "Cortana", "cortana", "crawler"], ["siri", "Siri", "siri", "crawler"]];
5034
5036
  function br(e) {
5035
5037
  for (let [t, r, n, o] of Ye) if (e.includes(t)) return { name: r, id: n, kind: o };
5036
5038
  return null;
@@ -5076,7 +5078,7 @@ function kr(e = fetch) {
5076
5078
  function Qe(e, t, r, n = fetch) {
5077
5079
  return Ze(e, t, r, kr(n));
5078
5080
  }
5079
- var ne = "vercel-2f65cde49015";
5081
+ var ne = "vercel-158ba59289ce";
5080
5082
  var et = "https://in.webdecoy.com";
5081
5083
  function tt(e) {
5082
5084
  let t = new Headers(e.headers);
@@ -5144,115 +5146,6 @@ function createClearanceGate(options = {}) {
5144
5146
  };
5145
5147
  }
5146
5148
 
5147
- // src/client-signals.ts
5148
- var MemoryClientSignalStore = class {
5149
- constructor(options = {}) {
5150
- this.sync = true;
5151
- this.entries = /* @__PURE__ */ new Map();
5152
- this.ttl = options.ttl ?? 9e5;
5153
- this.max = options.max ?? 1e4;
5154
- }
5155
- get(sessionId) {
5156
- const entry = this.entries.get(sessionId);
5157
- if (!entry) return void 0;
5158
- if (Date.now() - entry.at > this.ttl) {
5159
- this.entries.delete(sessionId);
5160
- return void 0;
5161
- }
5162
- return entry;
5163
- }
5164
- set(verdict) {
5165
- this.entries.delete(verdict.sessionId);
5166
- this.entries.set(verdict.sessionId, verdict);
5167
- while (this.entries.size > this.max) {
5168
- const oldest = this.entries.keys().next();
5169
- if (oldest.done) break;
5170
- this.entries.delete(oldest.value);
5171
- }
5172
- }
5173
- get size() {
5174
- return this.entries.size;
5175
- }
5176
- };
5177
- var CLIENT_SESSION_COOKIE = "wd_cs";
5178
- var CLIENT_SESSION_HEADER = "x-wd-session";
5179
- function readClientSession(headers) {
5180
- const cookie = headers["cookie"];
5181
- if (cookie) {
5182
- for (const part of cookie.split(";")) {
5183
- const eq = part.indexOf("=");
5184
- if (eq < 0) continue;
5185
- if (part.slice(0, eq).trim() === CLIENT_SESSION_COOKIE) {
5186
- const value = part.slice(eq + 1).trim();
5187
- if (value) return value;
5188
- }
5189
- }
5190
- }
5191
- const header2 = headers[CLIENT_SESSION_HEADER];
5192
- return header2 || void 0;
5193
- }
5194
- var ClientSignalRule = class {
5195
- constructor(config) {
5196
- this.name = "client-signals";
5197
- this.store = config.store;
5198
- this.minScore = config.minScore;
5199
- this.action = config.action ?? "DENY";
5200
- this.dryRun = config.dryRun ?? false;
5201
- }
5202
- async prepare(context) {
5203
- if (this.store.sync) return;
5204
- const sessionId = readClientSession(context.headers);
5205
- if (!sessionId) return;
5206
- const verdict = await this.store.get(sessionId);
5207
- if (verdict) {
5208
- context.prepared ?? (context.prepared = {});
5209
- context.prepared[this.name] = verdict;
5210
- }
5211
- }
5212
- evaluate(context) {
5213
- const sessionId = readClientSession(context.headers);
5214
- if (!sessionId) {
5215
- return {
5216
- action: "ALLOW",
5217
- rule: this.name,
5218
- state: "NOT_RUN",
5219
- reason: "No browser session \u2014 the client widget did not run for this request"
5220
- };
5221
- }
5222
- const verdict = this.store.sync ? this.store.get(sessionId) : context.prepared?.[this.name];
5223
- if (!verdict) {
5224
- return {
5225
- action: "ALLOW",
5226
- rule: this.name,
5227
- state: "NOT_RUN",
5228
- reason: "No signals recorded for this session yet"
5229
- };
5230
- }
5231
- const bad = this.minScore !== void 0 ? verdict.score >= this.minScore : verdict.recommendation === "block";
5232
- if (!bad) {
5233
- return {
5234
- action: "ALLOW",
5235
- rule: this.name,
5236
- metadata: { score: verdict.score, recommendation: verdict.recommendation }
5237
- };
5238
- }
5239
- return {
5240
- action: this.dryRun ? "ALLOW" : this.action,
5241
- rule: this.name,
5242
- reason: `Client signals scored ${verdict.score.toFixed(2)} (${verdict.recommendation})`,
5243
- metadata: {
5244
- score: verdict.score,
5245
- recommendation: verdict.recommendation,
5246
- sessionId,
5247
- dryRun: this.dryRun
5248
- }
5249
- };
5250
- }
5251
- };
5252
- function clientSignals(config) {
5253
- return new ClientSignalRule(config);
5254
- }
5255
-
5256
5149
  // src/adapter-core.ts
5257
5150
  function shouldSkipPath(path, patterns) {
5258
5151
  if (!patterns || patterns.length === 0) return false;
@@ -5390,6 +5283,184 @@ function createFetchGuard(options = {}) {
5390
5283
  };
5391
5284
  }
5392
5285
 
5286
+ // src/detect-and-gate.ts
5287
+ var DECISION_HEADER = "x-webdecoy-decision";
5288
+ var DETECTION_ID_HEADER = "x-webdecoy-detection-id";
5289
+ var WOULD_BLOCK_HEADER = "x-webdecoy-would-block";
5290
+ var warnedBadKey = false;
5291
+ function createDetectAndGate(options = {}) {
5292
+ const gate = createClearanceGate(options);
5293
+ const trustProxy = options.trustProxy ?? 1;
5294
+ let guard = null;
5295
+ let guardKey = "";
5296
+ let failedKey = "";
5297
+ function guardFor(apiKey) {
5298
+ if (guard && guardKey === apiKey) return guard;
5299
+ if (failedKey === apiKey) return null;
5300
+ try {
5301
+ guard = createFetchGuard({ ...options, apiKey, trustProxy, honeytoken: false, mode: options.mode ?? "monitor" });
5302
+ guardKey = apiKey;
5303
+ return guard;
5304
+ } catch (error) {
5305
+ failedKey = apiKey;
5306
+ if (!warnedBadKey) {
5307
+ warnedBadKey = true;
5308
+ console.warn(
5309
+ `[WebDecoy] detection is off: ${error instanceof Error ? error.message : "the API key was rejected"}`
5310
+ );
5311
+ }
5312
+ return null;
5313
+ }
5314
+ }
5315
+ async function detect(request, apiKey) {
5316
+ try {
5317
+ const g = guardFor(apiKey);
5318
+ if (!g) return null;
5319
+ if (shouldSkipPath(new URL(request.url).pathname, options.skipPaths)) return null;
5320
+ return await g.check(request);
5321
+ } catch {
5322
+ return null;
5323
+ }
5324
+ }
5325
+ async function runGate(request, context) {
5326
+ try {
5327
+ return await gate(request, context);
5328
+ } catch {
5329
+ return { action: "continue", headers: null, verdict: null };
5330
+ }
5331
+ }
5332
+ return async (request, context) => {
5333
+ const apiKey = (options.apiKey ?? fromEnv("WEBDECOY_API_KEY")).trim();
5334
+ if (!apiKey) return { outcome: await runGate(request, context), decision: null };
5335
+ const [guarded, gated] = await Promise.all([detect(request, apiKey), runGate(request, context)]);
5336
+ if (!guarded) return { outcome: gated, decision: null };
5337
+ const { decision, response } = guarded;
5338
+ if (response) return { outcome: { action: "respond", response }, decision };
5339
+ if (gated.action === "respond") return { outcome: gated, decision };
5340
+ try {
5341
+ const headers = gated.headers ? new Headers(gated.headers) : tt(request);
5342
+ headers.delete(DECISION_HEADER);
5343
+ headers.delete(DETECTION_ID_HEADER);
5344
+ headers.delete(WOULD_BLOCK_HEADER);
5345
+ headers.set(DECISION_HEADER, decision.detection?.decision ?? "");
5346
+ headers.set(DETECTION_ID_HEADER, decision.detection?.detection_id ?? "");
5347
+ headers.set(WOULD_BLOCK_HEADER, String(!decision.allowed));
5348
+ return { outcome: { action: "continue", headers, verdict: gated.verdict }, decision };
5349
+ } catch {
5350
+ return { outcome: gated, decision };
5351
+ }
5352
+ };
5353
+ }
5354
+
5355
+ // src/client-signals.ts
5356
+ var MemoryClientSignalStore = class {
5357
+ constructor(options = {}) {
5358
+ this.sync = true;
5359
+ this.entries = /* @__PURE__ */ new Map();
5360
+ this.ttl = options.ttl ?? 9e5;
5361
+ this.max = options.max ?? 1e4;
5362
+ }
5363
+ get(sessionId) {
5364
+ const entry = this.entries.get(sessionId);
5365
+ if (!entry) return void 0;
5366
+ if (Date.now() - entry.at > this.ttl) {
5367
+ this.entries.delete(sessionId);
5368
+ return void 0;
5369
+ }
5370
+ return entry;
5371
+ }
5372
+ set(verdict) {
5373
+ this.entries.delete(verdict.sessionId);
5374
+ this.entries.set(verdict.sessionId, verdict);
5375
+ while (this.entries.size > this.max) {
5376
+ const oldest = this.entries.keys().next();
5377
+ if (oldest.done) break;
5378
+ this.entries.delete(oldest.value);
5379
+ }
5380
+ }
5381
+ get size() {
5382
+ return this.entries.size;
5383
+ }
5384
+ };
5385
+ var CLIENT_SESSION_COOKIE = "wd_cs";
5386
+ var CLIENT_SESSION_HEADER = "x-wd-session";
5387
+ function readClientSession(headers) {
5388
+ const cookie = headers["cookie"];
5389
+ if (cookie) {
5390
+ for (const part of cookie.split(";")) {
5391
+ const eq = part.indexOf("=");
5392
+ if (eq < 0) continue;
5393
+ if (part.slice(0, eq).trim() === CLIENT_SESSION_COOKIE) {
5394
+ const value = part.slice(eq + 1).trim();
5395
+ if (value) return value;
5396
+ }
5397
+ }
5398
+ }
5399
+ const header2 = headers[CLIENT_SESSION_HEADER];
5400
+ return header2 || void 0;
5401
+ }
5402
+ var ClientSignalRule = class {
5403
+ constructor(config) {
5404
+ this.name = "client-signals";
5405
+ this.store = config.store;
5406
+ this.minScore = config.minScore;
5407
+ this.action = config.action ?? "DENY";
5408
+ this.dryRun = config.dryRun ?? false;
5409
+ }
5410
+ async prepare(context) {
5411
+ if (this.store.sync) return;
5412
+ const sessionId = readClientSession(context.headers);
5413
+ if (!sessionId) return;
5414
+ const verdict = await this.store.get(sessionId);
5415
+ if (verdict) {
5416
+ context.prepared ?? (context.prepared = {});
5417
+ context.prepared[this.name] = verdict;
5418
+ }
5419
+ }
5420
+ evaluate(context) {
5421
+ const sessionId = readClientSession(context.headers);
5422
+ if (!sessionId) {
5423
+ return {
5424
+ action: "ALLOW",
5425
+ rule: this.name,
5426
+ state: "NOT_RUN",
5427
+ reason: "No browser session \u2014 the client widget did not run for this request"
5428
+ };
5429
+ }
5430
+ const verdict = this.store.sync ? this.store.get(sessionId) : context.prepared?.[this.name];
5431
+ if (!verdict) {
5432
+ return {
5433
+ action: "ALLOW",
5434
+ rule: this.name,
5435
+ state: "NOT_RUN",
5436
+ reason: "No signals recorded for this session yet"
5437
+ };
5438
+ }
5439
+ const bad = this.minScore !== void 0 ? verdict.score >= this.minScore : verdict.recommendation === "block";
5440
+ if (!bad) {
5441
+ return {
5442
+ action: "ALLOW",
5443
+ rule: this.name,
5444
+ metadata: { score: verdict.score, recommendation: verdict.recommendation }
5445
+ };
5446
+ }
5447
+ return {
5448
+ action: this.dryRun ? "ALLOW" : this.action,
5449
+ rule: this.name,
5450
+ reason: `Client signals scored ${verdict.score.toFixed(2)} (${verdict.recommendation})`,
5451
+ metadata: {
5452
+ score: verdict.score,
5453
+ recommendation: verdict.recommendation,
5454
+ sessionId,
5455
+ dryRun: this.dryRun
5456
+ }
5457
+ };
5458
+ }
5459
+ };
5460
+ function clientSignals(config) {
5461
+ return new ClientSignalRule(config);
5462
+ }
5463
+
5393
5464
  // src/detection/weights.ts
5394
5465
  var DEFAULT_WEIGHTS = {
5395
5466
  vision_ai: 0.15,
@@ -7414,6 +7485,7 @@ function createCaptchaEndpoints(options = {}) {
7414
7485
  createAgentVerifier,
7415
7486
  createCaptchaEndpoints,
7416
7487
  createClearanceGate,
7488
+ createDetectAndGate,
7417
7489
  createFetchGuard,
7418
7490
  deriveAndArm,
7419
7491
  deriveKey,