@kya-os/checkpoint-shared 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -5036,7 +5036,7 @@ var EngineInfoSchema = external_exports.object({
5036
5036
  buildSha: external_exports.string().optional(),
5037
5037
  extras: external_exports.record(external_exports.unknown()).optional()
5038
5038
  });
5039
- var DetectionResultSchema = external_exports.object({
5039
+ var DetectionDetailSchema = external_exports.object({
5040
5040
  // Core fields
5041
5041
  /**
5042
5042
  * @deprecated Use detectionClass instead. Will be removed in v2.0.0
@@ -5097,6 +5097,7 @@ var DetectionResultSchema = external_exports.object({
5097
5097
  * pre-Phase-0.1 SDKs; dashboard treats absence as "legacy SDK." */
5098
5098
  engine: EngineInfoSchema.optional()
5099
5099
  });
5100
+ var DetectionResultSchema = DetectionDetailSchema;
5100
5101
  var DetectionModeSchema = external_exports.enum(["strict", "balanced", "lenient"]);
5101
5102
  var CustomRuleSchema = external_exports.object({
5102
5103
  id: external_exports.string(),
@@ -5181,62 +5182,12 @@ var AI_CRAWLER_NAMES = [
5181
5182
  "amazon bedrock",
5182
5183
  "vertex"
5183
5184
  ];
5184
- function shouldEnforce(result) {
5185
- if (result.isAgent || result.isAiCrawler) return true;
5186
- const name = (result.agentName || result.agent || result.detectedAgent?.name || "").toLowerCase();
5187
- if (!name) return false;
5188
- return AI_CRAWLER_NAMES.some((crawler) => name.includes(crawler));
5189
- }
5190
5185
  function isKnownAiCrawler(agentName) {
5191
5186
  if (!agentName) return false;
5192
5187
  const lower = agentName.toLowerCase();
5193
5188
  return AI_CRAWLER_NAMES.some((crawler) => lower.includes(crawler));
5194
5189
  }
5195
5190
 
5196
- // src/core/enforcement.ts
5197
- function evaluateEnforcement(result, config = {}) {
5198
- const {
5199
- enabled = true,
5200
- confidenceThreshold = 70,
5201
- defaultAction = "allow",
5202
- redirectUrl,
5203
- allowList = [],
5204
- denyList = []
5205
- } = config;
5206
- if (!enabled) {
5207
- return { action: "allow", reason: "enforcement_disabled", shouldNotify: false };
5208
- }
5209
- if (!shouldEnforce(result)) {
5210
- return { action: "allow", reason: "not_enforced", shouldNotify: false };
5211
- }
5212
- const agentName = result.agentName || result.agent || result.detectedAgent?.name || void 0;
5213
- if (allowList.length > 0 && agentName) {
5214
- const lower = agentName.toLowerCase();
5215
- if (allowList.some((a) => lower.includes(a.toLowerCase()))) {
5216
- return { action: "allow", reason: "allow_list", shouldNotify: false };
5217
- }
5218
- }
5219
- if (denyList.length > 0 && agentName) {
5220
- const lower = agentName.toLowerCase();
5221
- if (denyList.some((d) => lower.includes(d.toLowerCase()))) {
5222
- return {
5223
- action: "block",
5224
- reason: "deny_list",
5225
- shouldNotify: true
5226
- };
5227
- }
5228
- }
5229
- if (result.confidence >= confidenceThreshold) {
5230
- return {
5231
- action: defaultAction,
5232
- reason: "threshold",
5233
- shouldNotify: true,
5234
- redirectUrl: defaultAction === "redirect" || defaultAction === "instruct" ? redirectUrl : void 0
5235
- };
5236
- }
5237
- return { action: "allow", reason: "below_threshold", shouldNotify: false };
5238
- }
5239
-
5240
5191
  // src/core/agent.ts
5241
5192
  var AgentTypeSchema = external_exports.enum([
5242
5193
  // OpenAI
@@ -5267,6 +5218,17 @@ var AgentTypeSchema = external_exports.enum([
5267
5218
  // Content/Writing AI
5268
5219
  "writer",
5269
5220
  "jasper",
5221
+ // Additional AI vendors — Engine-Pattern-Codegen-Retirement-1 backfilled
5222
+ // these after the SSOT migration surfaced legacy patterns_generated.rs
5223
+ // entries (xAI Grok, DeepSeek-User/DeepSeekBot, Amazon Q + NovaAct,
5224
+ // KYA Agent) that were never represented in TS. Their patterns lived
5225
+ // only in the retired YAML→Rust pipeline; without these types the
5226
+ // backfilled `KNOWN_AGENT_PATTERNS` entries would have to coerce to
5227
+ // `'unknown'` and lose per-vendor classification downstream.
5228
+ "xai",
5229
+ "deepseek",
5230
+ "amazon",
5231
+ "kya",
5270
5232
  // Unknown AI agent
5271
5233
  "unknown"
5272
5234
  ]);
@@ -5521,7 +5483,11 @@ var KNOWN_AGENT_PATTERNS = [
5521
5483
  id: "openai-chatgpt",
5522
5484
  type: "openai",
5523
5485
  name: "ChatGPT",
5524
- patterns: ["ChatGPT-User", "gpt-4", "gpt-3.5", "gpt-4-turbo", "gpt-4o"],
5486
+ // `OAI-SearchBot` backfilled by Engine-Pattern-Codegen-Retirement-1
5487
+ // after the legacy YAML→Rust path was retired. Previously detected
5488
+ // only via the legacy generator; the new TS SSOT migration would
5489
+ // have silently lost it.
5490
+ patterns: ["ChatGPT-User", "OAI-SearchBot", "gpt-4", "gpt-3.5", "gpt-4-turbo", "gpt-4o"],
5525
5491
  headers: {
5526
5492
  "X-OpenAI-Assistant": "*"
5527
5493
  },
@@ -5529,6 +5495,32 @@ var KNOWN_AGENT_PATTERNS = [
5529
5495
  category: "ai_assistant",
5530
5496
  isLegitimate: true
5531
5497
  },
5498
+ // GPT-Crawler — distinct from GPTBot (OpenAI's official training crawler);
5499
+ // tracked separately so the classifier can attribute hits to the
5500
+ // right entity. PDM-2 promoted from the INTERACTIVE_AGENT_PATTERNS
5501
+ // supplement.
5502
+ {
5503
+ id: "openai-gpt-crawler",
5504
+ type: "openai",
5505
+ name: "GPT Crawler",
5506
+ patterns: ["GPT-Crawler"],
5507
+ confidence: 0.95,
5508
+ category: "scraper",
5509
+ isLegitimate: true
5510
+ },
5511
+ // OpenAI generic vendor fallback — catches UAs that mention OpenAI
5512
+ // but use an undocumented sub-token (e.g. `OpenAI-Foo/1.0`,
5513
+ // `OpenAI-Web/2.0`). Word-boundary anchored (post-#2599). Lower
5514
+ // confidence than the strict per-token entries above. PDM-2.
5515
+ {
5516
+ id: "openai-generic",
5517
+ type: "openai",
5518
+ name: "OpenAI",
5519
+ patterns: ["OpenAI"],
5520
+ confidence: 0.9,
5521
+ category: "ai_assistant",
5522
+ isLegitimate: true
5523
+ },
5532
5524
  // Anthropic — split into interactive assistant vs training crawler.
5533
5525
  // The 'anthropic-ai' UA token used to live in this entry's patterns
5534
5526
  // alongside 'Claude-Web', which made every anthropic-ai crawler hit
@@ -5552,6 +5544,18 @@ var KNOWN_AGENT_PATTERNS = [
5552
5544
  // was missing, which left ~14 real Claude-User sessions on
5553
5545
  // production stamped (bot, …) instead of (ai_agent, ai_assistant).
5554
5546
  "Claude-User",
5547
+ // `Claude-SearchBot` and `claude-code` backfilled by
5548
+ // Engine-Pattern-Codegen-Retirement-1 — both were in the retired
5549
+ // YAML→Rust pipeline but never represented in TS. Claude-Code is
5550
+ // Anthropic's CLI agent (this very tool); Claude-SearchBot is
5551
+ // their search-augmented fetcher (parallel to OAI-SearchBot).
5552
+ "Claude-SearchBot",
5553
+ "claude-code",
5554
+ // Engine-Pattern-Codegen-Retirement-1 round 2 (Bugbot #e111d65f):
5555
+ // the retired YAML→Rust pipeline matched both `claude-code` AND
5556
+ // `claude code` (space-separated). Some host wrappers stamp the
5557
+ // tool name with a space; the hyphenated form alone misses them.
5558
+ "claude code",
5555
5559
  "claude-3",
5556
5560
  "claude-2",
5557
5561
  "claude-instant",
@@ -5584,8 +5588,24 @@ var KNOWN_AGENT_PATTERNS = [
5584
5588
  category: "scraper",
5585
5589
  isLegitimate: true
5586
5590
  },
5591
+ // Anthropic generic vendor fallback — catches UAs that mention
5592
+ // Anthropic but use an undocumented sub-token (e.g. `Anthropic-Web`,
5593
+ // future variants). Word-boundary anchored (post-#2599) — only
5594
+ // matches when `Anthropic` is a standalone token, not embedded in
5595
+ // e.g. `AnthropicAssistant`. Lower confidence than the per-token
5596
+ // entries above. PDM-2 promoted from the INTERACTIVE_AGENT_PATTERNS
5597
+ // supplement.
5598
+ {
5599
+ id: "anthropic-generic",
5600
+ type: "anthropic",
5601
+ name: "Anthropic",
5602
+ patterns: ["Anthropic"],
5603
+ confidence: 0.9,
5604
+ category: "ai_assistant",
5605
+ isLegitimate: true
5606
+ },
5587
5607
  // Perplexity (training crawler, distinct from the interactive Perplexity-User
5588
- // session captured by seed-agent-types-data.ts:perplexity)
5608
+ // session captured by perplexity-user below)
5589
5609
  {
5590
5610
  id: "perplexity-bot",
5591
5611
  type: "perplexity",
@@ -5595,6 +5615,40 @@ var KNOWN_AGENT_PATTERNS = [
5595
5615
  category: "scraper",
5596
5616
  isLegitimate: true
5597
5617
  },
5618
+ // Interactive Perplexity fetcher — parallel to ChatGPT-User shape;
5619
+ // the assistant pulls a URL on a human's behalf. Distinct from
5620
+ // PerplexityBot (training crawler). PDM-2 promoted this from the
5621
+ // INTERACTIVE_AGENT_PATTERNS supplement that #2599 carved out.
5622
+ {
5623
+ id: "perplexity-user",
5624
+ type: "perplexity",
5625
+ name: "Perplexity",
5626
+ // `Comet` is Perplexity's AI-powered browser; backfilled into the
5627
+ // TS canonical via Engine-Pattern-Codegen-Retirement-1 after the
5628
+ // SSOT consolidation surfaced the gap. Previously detected only by
5629
+ // the legacy YAML→Rust codegen path; `apps/web/scripts/seed-agent-
5630
+ // types-data.ts` listed it as a Perplexity AI detection while
5631
+ // `KNOWN_AGENT_PATTERNS` did not. Now structurally enforced.
5632
+ patterns: ["Perplexity-User", "Perplexity-AI", "Comet"],
5633
+ confidence: 0.95,
5634
+ category: "ai_assistant",
5635
+ isLegitimate: true
5636
+ },
5637
+ // Perplexity generic vendor fallback — catches UAs that mention
5638
+ // Perplexity but use an undocumented sub-token (future variants).
5639
+ // Lower confidence than the strict per-token entries above; the
5640
+ // matcher picks the highest-confidence match, so this only wins on
5641
+ // truly unknown shapes. Word-boundary anchored (post-#2599) so
5642
+ // `perplexity` only matches as a standalone token, not embedded.
5643
+ {
5644
+ id: "perplexity-generic",
5645
+ type: "perplexity",
5646
+ name: "Perplexity",
5647
+ patterns: ["Perplexity"],
5648
+ confidence: 0.85,
5649
+ category: "ai_assistant",
5650
+ isLegitimate: true
5651
+ },
5598
5652
  // Google — split into crawler (Google-Extended) vs interactive (Bard, Gemini, etc.) (PR-C)
5599
5653
  {
5600
5654
  id: "google-extended",
@@ -5605,45 +5659,81 @@ var KNOWN_AGENT_PATTERNS = [
5605
5659
  category: "scraper",
5606
5660
  isLegitimate: true
5607
5661
  },
5662
+ {
5663
+ // ORDERING NOTE: `gemini-deep-research` MUST appear BEFORE
5664
+ // `google-bard` so the more-specific 'Gemini-Deep-Research'
5665
+ // pattern wins under the engine's first-match-wins iteration over
5666
+ // AI_AGENT_PATTERNS. The legacy YAML→Rust output collapsed all
5667
+ // Google patterns under a single "Google AI" name with identical
5668
+ // confidence (0.90), so shadowing was benign; the SSOT migration
5669
+ // surfaced different names + confidences (0.95 scraper vs 0.90
5670
+ // ai_assistant), making the order load-bearing.
5671
+ //
5672
+ // Google's "Deep Research" training/research crawler — distinct
5673
+ // UA from Bard/Gemini interactive sessions.
5674
+ id: "gemini-deep-research",
5675
+ type: "google",
5676
+ name: "Gemini-Deep-Research",
5677
+ patterns: ["Gemini-Deep-Research", "gemini-deep-research"],
5678
+ confidence: 0.95,
5679
+ category: "scraper",
5680
+ isLegitimate: true
5681
+ },
5608
5682
  {
5609
5683
  id: "google-bard",
5610
5684
  type: "google",
5611
5685
  name: "Google Bard",
5686
+ // Engine-Pattern-Codegen-Retirement-1 corrections:
5687
+ // - REMOVED `Google-InspectionTool` from this entry. The legacy
5688
+ // YAML→Rust pipeline classified Google-InspectionTool as a
5689
+ // Googlebot-family search inspection tool (Search Console
5690
+ // verification, structured-data testing), not a Bard/Gemini AI
5691
+ // session. Moved to `NON_AI_PATTERNS` in
5692
+ // `rust/crates/kya-os-engine/src/stages/patterns.rs` under the
5693
+ // `Googlebot` family so classification stays SearchCrawler.
5694
+ // - ADDED `LaMDA` (Google's pre-Bard conversational AI; legacy
5695
+ // YAML had it under Google AI) and `GoogleAgent-Mariner`
5696
+ // (Google's browser-controlling agent product) — both were in
5697
+ // the retired pipeline, never in TS.
5698
+ // - The broad 'gemini' pattern below shadows narrower Gemini-*
5699
+ // UAs under first-match-wins. The Gemini-Deep-Research entry
5700
+ // above must stay ordered first to avoid being shadowed.
5612
5701
  patterns: [
5613
5702
  "Bard",
5614
- "Google-InspectionTool",
5615
5703
  "gemini",
5616
5704
  "gemini-pro",
5617
5705
  "gemini-1.5",
5618
5706
  "gemini-1.5-pro",
5619
5707
  "gemini-ultra",
5620
5708
  "palm",
5621
- "palm2"
5709
+ "palm2",
5710
+ "LaMDA",
5711
+ "GoogleAgent-Mariner"
5622
5712
  ],
5623
5713
  confidence: 0.9,
5624
5714
  category: "ai_assistant",
5625
5715
  isLegitimate: true
5626
5716
  },
5627
- {
5628
- // Google's "Deep Research" training/research crawler — distinct UA
5629
- // from Bard/Gemini interactive sessions. Pattern matches the
5630
- // canonical 'Gemini-Deep-Research/<version>' UA token; the broad
5631
- // 'gemini' substring in google-bard would otherwise win and stamp
5632
- // these crawler hits as ai_assistant.
5633
- id: "gemini-deep-research",
5634
- type: "google",
5635
- name: "Gemini-Deep-Research",
5636
- patterns: ["Gemini-Deep-Research", "gemini-deep-research"],
5637
- confidence: 0.95,
5638
- category: "scraper",
5639
- isLegitimate: true
5640
- },
5641
5717
  // Microsoft Copilot
5642
5718
  {
5643
5719
  id: "microsoft-copilot",
5644
5720
  type: "microsoft",
5645
5721
  name: "Microsoft Copilot",
5646
- patterns: ["copilot", "github-copilot", "microsoft-copilot"],
5722
+ patterns: [
5723
+ "copilot",
5724
+ "github-copilot",
5725
+ "microsoft-copilot",
5726
+ // Engine-Pattern-Codegen-Retirement-1 round 2 (Bugbot #89cfb23d):
5727
+ // the retired YAML→Rust pipeline carried `BingPreview/.*ChatGPT`
5728
+ // for Bing Copilot UAs. Without this, BingPreview+ChatGPT UAs hit
5729
+ // the non-AI `BingPreview` Bingbot rule and resolve as SearchBot.
5730
+ // Note: this entry must order BEFORE the Bingbot regex in the
5731
+ // composed table — AI patterns lead, so the dispatch order in
5732
+ // patterns.rs::AI_AGENT_PATTERNS (AI_PATTERNS_FROM_TS then
5733
+ // NON_AI_PATTERNS) preserves the precedence the legacy table
5734
+ // gave Microsoft AI at confidence 0.9.
5735
+ "BingPreview/.*ChatGPT"
5736
+ ],
5647
5737
  confidence: 0.9,
5648
5738
  category: "ai_assistant",
5649
5739
  isLegitimate: true
@@ -5678,7 +5768,12 @@ var KNOWN_AGENT_PATTERNS = [
5678
5768
  id: "cohere-bot",
5679
5769
  type: "cohere",
5680
5770
  name: "CohereBot",
5681
- patterns: ["cohere-ai"],
5771
+ // Engine-Pattern-Codegen-Retirement-1 round 2 (Bugbot #8007b7a3):
5772
+ // the retired YAML→Rust pipeline matched the literal `CohereBot`
5773
+ // token; without it the UA falls through to the generic-bot
5774
+ // fallback (`bot` substring) and resolves as `Generic Bot` /
5775
+ // OtherBot, losing vendor attribution.
5776
+ patterns: ["cohere-ai", "CohereBot"],
5682
5777
  confidence: 0.85,
5683
5778
  category: "scraper",
5684
5779
  isLegitimate: true
@@ -5851,6 +5946,86 @@ var KNOWN_AGENT_PATTERNS = [
5851
5946
  confidence: 0.8,
5852
5947
  category: "ai_assistant",
5853
5948
  isLegitimate: true
5949
+ },
5950
+ // ─────────────────────────────────────────────────────────────────────
5951
+ // Engine-Pattern-Codegen-Retirement-1 backfills.
5952
+ //
5953
+ // Each entry below was detected by the retired YAML→Rust codegen path
5954
+ // (`patterns_generated.rs`) but never represented in TS. The SSOT
5955
+ // migration would have silently dropped detection for these vendors.
5956
+ // Names + confidences mirror the legacy pipeline so classify_agent /
5957
+ // classify_vendor downstream consumers don't see a behavioral shift.
5958
+ // ─────────────────────────────────────────────────────────────────────
5959
+ // xAI Grok — Elon's AI; user-facing assistant + crawler share the
5960
+ // same vendor brand, all routed through this single entry. The
5961
+ // legacy pipeline emitted them under one "xAI Grok" name, so a split
5962
+ // would change downstream classification.
5963
+ {
5964
+ id: "xai-grok",
5965
+ type: "xai",
5966
+ name: "xAI Grok",
5967
+ patterns: ["xAI-Grok", "GrokBot", "Grok-DeepSearch"],
5968
+ confidence: 0.95,
5969
+ category: "ai_assistant",
5970
+ isLegitimate: true
5971
+ },
5972
+ // DeepSeek — split into interactive (DeepSeek-User) and crawler
5973
+ // (DeepSeekBot), parallel to the openai-chatgpt / openai-gptbot
5974
+ // and anthropic-claude / anthropic-claudebot splits.
5975
+ {
5976
+ id: "deepseek-user",
5977
+ type: "deepseek",
5978
+ name: "DeepSeek AI",
5979
+ patterns: ["DeepSeek-User"],
5980
+ confidence: 0.95,
5981
+ category: "ai_assistant",
5982
+ isLegitimate: true
5983
+ },
5984
+ {
5985
+ id: "deepseek-bot",
5986
+ type: "deepseek",
5987
+ name: "DeepSeekBot",
5988
+ patterns: ["DeepSeekBot"],
5989
+ confidence: 0.95,
5990
+ category: "scraper",
5991
+ isLegitimate: true
5992
+ },
5993
+ // Amazon Q + NovaAct — Amazon's AI assistant product family.
5994
+ // NovaAct is the AWS-branded browser-controlling agent (parallel to
5995
+ // Anthropic's Claude-Code, Google's GoogleAgent-Mariner).
5996
+ {
5997
+ id: "amazon-q",
5998
+ type: "amazon",
5999
+ name: "Amazon Q",
6000
+ patterns: ["Amazon-Q", "NovaAct"],
6001
+ confidence: 0.95,
6002
+ category: "ai_assistant",
6003
+ isLegitimate: true
6004
+ },
6005
+ // KYA Agent — our own product family. KYA-Agent/<version> is the
6006
+ // canonical UA; KYA-OS is the umbrella protocol token; KYA-Compute/
6007
+ // is the signed-compute variant. All ai_assistant — none of these
6008
+ // are training crawlers.
6009
+ //
6010
+ // Display name is `'Kya Agent'` (sentence case), NOT `'KYA Agent'`
6011
+ // (brand all-caps). Matches every other consumer's expectation:
6012
+ // `did-verifier.ts` hardcodes `'Kya Agent'` as the display fallback
6013
+ // for did:key / unhumanizable did:web (3 sites), the gateway router
6014
+ // docstring refers to the "Kya Agent" pattern, and the signed-agent
6015
+ // e2e test asserts on `'Kya Agent'` for both the unsigned Tier-3 UA
6016
+ // path and the signed DID-verified path. The prior `'KYA Agent'`
6017
+ // value here was a codegen-source outlier that produced consistent
6018
+ // brand-case-vs-sentence-case drift between Tier 3 emissions (which
6019
+ // read this) and Tier 1 emissions (which use the did-verifier
6020
+ // hardcode). One source of truth, sentence case.
6021
+ {
6022
+ id: "kya-agent",
6023
+ type: "kya",
6024
+ name: "Kya Agent",
6025
+ patterns: ["KYA-Agent/", "KYA-OS", "KYA-Compute/"],
6026
+ confidence: 0.95,
6027
+ category: "ai_assistant",
6028
+ isLegitimate: true
5854
6029
  }
5855
6030
  ];
5856
6031
  var CLOUD_PROVIDER_RANGES = {
@@ -5893,6 +6068,21 @@ var BOT_USER_AGENT_PATTERNS = [
5893
6068
  /yi(-?[0-9]+b)?/i,
5894
6069
  /stablelm/i,
5895
6070
  /\bphind\b/i,
6071
+ // `you.com` is detected as a UA SUBSTRING — the pattern is consumed
6072
+ // only by `BOT_USER_AGENT_PATTERNS.some(p => p.test(userAgent))`
6073
+ // (UA context, not URL). CodeQL js/regex/missing-regexp-anchor
6074
+ // speculated about URL misuse on PR #2576; PR #2591's tightened
6075
+ // consuming-class form (`[\s;()]`) introduced a real false-negative
6076
+ // for legit UA shapes containing `/`:
6077
+ // - `you.com/1.0` (You.com bot, version-suffixed)
6078
+ // - `Mozilla/5.0 you.com/bot` (token-with-version)
6079
+ // - `+https://you.com)` (token after URL inside parens)
6080
+ // Cursor caught the regression on PR #2591. Reverting to `\b` —
6081
+ // word-boundary is the correct anchor for UA-substring matching;
6082
+ // the original CodeQL flag is a context-blind false positive (the
6083
+ // codebase does not apply BOT_USER_AGENT_PATTERNS to URL strings).
6084
+ // If CodeQL re-flags, dismiss in the UI as "false positive" with
6085
+ // pointer to this comment.
5896
6086
  /\byou\.com\b/i,
5897
6087
  /\bneeva\b/i,
5898
6088
  /jasper/i,
@@ -6888,10 +7078,13 @@ var SUSPICIOUS_PATTERNS = {
6888
7078
  URL_ENCODED: /%[0-9a-f]{2}/i,
6889
7079
  BASE64_DATA: /data:[^;]+;base64,/i
6890
7080
  };
7081
+ var MAX_PATTERN_INPUT_LENGTH = 4096;
6891
7082
  function testPattern(pattern, value) {
7083
+ if (value.length > MAX_PATTERN_INPUT_LENGTH) return false;
6892
7084
  return pattern.test(value);
6893
7085
  }
6894
7086
  function extractMatch(pattern, value) {
7087
+ if (value.length > MAX_PATTERN_INPUT_LENGTH) return null;
6895
7088
  const match = value.match(pattern);
6896
7089
  return match ? match[1] || match[0] : null;
6897
7090
  }
@@ -9360,6 +9553,10 @@ function getAgentDisplayName(agentType) {
9360
9553
  "01ai": "01.AI",
9361
9554
  writer: "Writer",
9362
9555
  jasper: "Jasper",
9556
+ xai: "xAI",
9557
+ deepseek: "DeepSeek",
9558
+ amazon: "Amazon",
9559
+ kya: "KYA",
9363
9560
  unknown: "Unknown"
9364
9561
  };
9365
9562
  return displayNames[agentType] || agentType;
@@ -11311,62 +11508,6 @@ function createValidationErrorResponse(message, details, meta) {
11311
11508
  }
11312
11509
 
11313
11510
  // src/utils/verification.ts
11314
- function mapVerificationMethod(method) {
11315
- if (!method) return "none";
11316
- const normalized = method.toLowerCase().trim();
11317
- switch (normalized) {
11318
- // Signature-based verification
11319
- case "signature":
11320
- case "sig":
11321
- case "signature_verified":
11322
- case "http_signature":
11323
- return "signature";
11324
- // Pattern-based detection
11325
- case "pattern":
11326
- case "useragent":
11327
- case "user_agent":
11328
- case "pattern_matching":
11329
- case "ua_pattern":
11330
- return "pattern";
11331
- // Behavioral analysis
11332
- case "behavioral":
11333
- case "behavior":
11334
- case "behavioral_analysis":
11335
- case "mouse_keyboard":
11336
- return "behavioral";
11337
- // Network-based detection
11338
- case "network":
11339
- case "ip":
11340
- case "ip_analysis":
11341
- case "cloud_provider":
11342
- return "network";
11343
- // MCP handshake detection
11344
- case "mcp_i_handshake":
11345
- case "mcp":
11346
- case "handshake":
11347
- return "mcp_i_handshake";
11348
- // Error states
11349
- case "error":
11350
- case "failed":
11351
- case "timeout":
11352
- return "error";
11353
- // Default fallback
11354
- default:
11355
- if (normalized.includes("signature") || normalized.includes("sig")) {
11356
- return "signature";
11357
- }
11358
- if (normalized.includes("pattern") || normalized.includes("ua")) {
11359
- return "pattern";
11360
- }
11361
- if (normalized.includes("behavior") || normalized.includes("mouse")) {
11362
- return "behavioral";
11363
- }
11364
- if (normalized.includes("network") || normalized.includes("ip")) {
11365
- return "network";
11366
- }
11367
- return "none";
11368
- }
11369
- }
11370
11511
  function getVerificationMethodDescription(method) {
11371
11512
  switch (method) {
11372
11513
  case "signature":
@@ -12544,9 +12685,6 @@ var RuleLoader = class _RuleLoader {
12544
12685
  }
12545
12686
  }
12546
12687
  };
12547
- function loadRulesSync() {
12548
- return RuleLoader.loadSync();
12549
- }
12550
12688
  async function loadRulesAsync(options) {
12551
12689
  const loader = RuleLoader.getInstance();
12552
12690
  return loader.loadRules(options);
@@ -13757,10 +13895,60 @@ function base64UrlDecodeToString(s) {
13757
13895
  return Buffer.from(base64UrlDecodeToBytes(s)).toString("utf-8");
13758
13896
  }
13759
13897
 
13898
+ // src/parsers/jafar.ts
13899
+ var IPV4_CIDR_RE = /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\/(?:3[0-2]|[12]?\d)$/;
13900
+ var IPV6_CIDR_RE = /^[0-9a-fA-F:]+\/(?:12[0-8]|1[01]\d|\d{1,2})$/;
13901
+ var HAS_OFFSET_RE = /[zZ]|[+-]\d{2}:?\d{2}$/;
13902
+ var creationTimeSchema = external_exports.string().min(1).transform((raw, ctx) => {
13903
+ const normalized = HAS_OFFSET_RE.test(raw) ? raw : `${raw}Z`;
13904
+ const ms = Date.parse(normalized);
13905
+ if (Number.isNaN(ms)) {
13906
+ ctx.addIssue({
13907
+ code: external_exports.ZodIssueCode.custom,
13908
+ message: `creationTime is not a parseable ISO 8601 timestamp: ${raw}`
13909
+ });
13910
+ return external_exports.NEVER;
13911
+ }
13912
+ return new Date(ms);
13913
+ });
13914
+ var prefixSchema = external_exports.object({
13915
+ ipv4Prefix: external_exports.string().regex(IPV4_CIDR_RE).optional(),
13916
+ ipv6Prefix: external_exports.string().regex(IPV6_CIDR_RE).optional()
13917
+ }).strict().refine((p) => p.ipv4Prefix != null !== (p.ipv6Prefix != null), {
13918
+ message: "prefix entry must have exactly one of ipv4Prefix or ipv6Prefix"
13919
+ });
13920
+ var jafarFeedSchema = external_exports.object({
13921
+ creationTime: creationTimeSchema,
13922
+ prefixes: external_exports.array(prefixSchema),
13923
+ synctoken: external_exports.string().optional(),
13924
+ notes: external_exports.string().optional()
13925
+ }).passthrough();
13926
+ var JafarParseError = class extends Error {
13927
+ constructor(message, cause) {
13928
+ super(message);
13929
+ this.cause = cause;
13930
+ this.name = "JafarParseError";
13931
+ }
13932
+ };
13933
+ function parseJafarFeed(json) {
13934
+ let raw;
13935
+ try {
13936
+ raw = JSON.parse(json);
13937
+ } catch (err) {
13938
+ throw new JafarParseError("JAFAR feed is not valid JSON", err);
13939
+ }
13940
+ const result = jafarFeedSchema.safeParse(raw);
13941
+ if (!result.success) {
13942
+ throw new JafarParseError(
13943
+ `JAFAR feed failed schema validation: ${result.error.message}`,
13944
+ result.error
13945
+ );
13946
+ }
13947
+ return result.data;
13948
+ }
13949
+
13760
13950
  // src/index.ts
13761
13951
  var VERSION = "0.1.0";
13762
13952
  var PACKAGE_NAME = "@kya-os/checkpoint-shared";
13763
13953
 
13764
- export { AI_AGENT_HEADERS, API_ERRORS, API_ERROR_CODES, API_REQUEST_LIMITS, AUTHORIZATION_MODES, AUTH_ERRORS, AUTH_ERROR_MESSAGES, AccountSchema, AddFingerprintToProfileRequestSchema, AddUpdateProviderRequestSchema, AdminQueryParamsSchema, AgentCategorySchema, AgentClassificationRequestSchema, AgentClassificationResultSchema, AgentClassificationSchema, AgentInfoSchema, AgentPatternSchema, AgentProfileSchema, AgentShieldConfigSchema, AgentSourceDistributionSchema, AgentStatisticsSchema, AgentTypeDefinitionSchema, AgentTypeSchema, AggregationTypeSchema, AllowListEntrySchema, AnalyticsAgentSourcesQuerySchema, AnalyticsAgentTypesQuerySchema, AnalyticsChartDataSchema, AnalyticsDataPointSchema, AnalyticsExportParamsSchema, AnalyticsExportQuerySchema, AnalyticsQuerySchema2 as AnalyticsQuerySchema, AnalyticsRealtimeQuerySchema, AnalyticsSessionsQuerySchema, AnalyticsSessionsResponseSchema, AnalyticsSummarySchema2 as AnalyticsSessionsSummarySchema, AnalyticsSummarySchema, AnalyticsTimeSeriesSchema, AnalyticsTimeWindowSchema, ApiKeyPermissionSchema, ApiKeyRateLimitsSchema, ApiKeySchema, ApiKeysBulkCreateItemSchema, ApiKeysBulkRequestSchema, ApiKeysBulkRevokeItemSchema, ApiKeysBulkUpdateItemSchema, ApiKeysQuerySchema, ApiResponseSchema, AuthErrorType, AuthProviderTypeSchema, BLOCKED_PATH, BOT_USER_AGENT_PATTERNS, BROWSER_PATTERNS, BULK_ERROR_CODES, BaseAuthProviderSchema, BaseBulkRequestSchema, BatchDetectionRequestSchema, BatchDetectionResponseSchema, BatchEventRequestSchema, BatchEventResponseSchema, BatchEventSchema, BatchPixelEventRequestSchema, BeaconBatchSchema, BeaconCollectorDataSchema, BeaconConfigSchema, BeaconEventSchema, BeaconEventTypeSchema, BeaconWorkerMessageSchema, BeaconWorkerMessageTypeSchema, BehavioralAnalysisSchema, BehavioralDataSchema, BehavioralPatternSchema, BehavioralRulesSchema, BehavioralSignalsSchema, BehavioralThresholdSchema, BlockEventSchema, BlockReasonSchema, BotPatternSchema2 as BotPatternSchema, BotTypeSchema, BouncerConfigSchema, BouncerOutcomeSchema, BouncerProofSchema, BrowserInfoSchema, BulkDeletePreviewStatsSchema, BulkDeleteResponseSchema, BulkOperationOptionsSchema, BulkOperationParamsSchema, BulkOperationResultSchema, BulkOperationTypeSchema, BulkResponseSchema, BulkResultItemSchema, CACHE_LIMITS, CACHE_TTL, CLOUD_PROVIDER_RANGES, CONDITION_FIELDS, CONDITION_OPERATORS, CONFIDENCE_THRESHOLDS, CRISPBudgetSchema, CURRENT_POLICY_VERSION, CacheConfigSchema, CachedDetectionDataSchema, ChallengeParamsSchema, CircuitBreakerConfigSchema, CircuitBreakerStateSchema, ClickEventSchema, ClientDetectionSchema2 as ClientDetectionSchema, CollectFingerprintRequestSchema, CollectFingerprintResponseSchema, CollectedDataSchema, CollectorTypeSchema, ConditionFieldSchema, ConditionOperatorSchema, ConditionValueSchema, ConfidenceBreakdownSchema, ConfidenceLevelSchema, ConfidenceThresholdSchema, ConfidenceUtils, ConfiguredProviderSchema, ConnectionTypeSchema, ConsentAgentMetadataSchema, ConsentBrandingSchema, ConsentCapabilityGroupSchema, ConsentCapabilitySchema, ConsentConfigMetadataSchema, ConsentConfigSchema, ConsentTermsSchema, ConsentUISchema, CreateApiKeySchema, CreateOrganizationInputSchema, CreateOrganizationSchema, CreatePixelSchema, CreateProfileRequestSchema, CreateProjectSchema, CredentialProviderSchema, CustomRuleSchema, DATABASE_LIMITS, DEFAULT_AGENTSHIELD_CONFIG, DEFAULT_AGENT_TYPES, DEFAULT_API_KEY_RATE_LIMITS, DEFAULT_BEHAVIORAL_THRESHOLDS, DEFAULT_CACHE_CONFIG, DEFAULT_CONFIDENCE_THRESHOLDS, DEFAULT_CORS_CONFIG, DEFAULT_DETECTION_OPTIONS, DEFAULT_ENV_VARS, DEFAULT_LOG_CONFIG, DEFAULT_PASSWORD_REQUIREMENTS, DEFAULT_PIXEL_CONFIG, DEFAULT_POLICY, DEFAULT_PROJECT_SETTINGS, DEFAULT_RESPONSE_HEADERS, DEFAULT_RETRY_CONFIG, DEFAULT_RULE_PRIORITY, DEFAULT_SESSION_CONFIG, DEFAULT_THRESHOLDS, DEFAULT_TIMEOUTS, DEFAULT_WEBHOOK_EVENTS, DEPLOY_STEPS, DETECTION_ERRORS, DETECTION_LIMITS, DashboardStatsRequestSchema, DatabaseDetectionMetadataSchema, DatabaseStatusSchema, DecisionSchema, DelegationPollingStatusSchema, DelegationSchema, DelegationStatusSchema, DeleteAccountSchema, DenyListEntrySchema, DeployProgressEventSchema, DeployStepIdSchema, DeployStepStateSchema, DeployStepStatusSchema, DeploymentMetadataSchema, DetectionClassSchema, DetectionErrorDetailsSchema, DetectionEventSchema, DetectionInputSchema, DetectionLogSchema, DetectionMetadataSchema, DetectionModeSchema, DetectionOptionsSchema, DetectionReasoningSchema, DetectionRequestSchema, DetectionResponseSchema, DetectionResultSchema, DetectionRuleSchema, DetectionRulesSchema, DetectionSignalSchema, DetectionStatusSchema, DetectionTestResultSchema, DetectionViewTypeSchema, ENFORCEMENT_ACTIONS, ENFORCEMENT_MODES, ERROR_CATEGORIES, ERROR_CODES, ERROR_MESSAGES, ERROR_STATUS_CODES, EXPORT_LIMITS, EnforcementActionSchema, EnforcementModeSchema, EngineInfoSchema, EnhancedFingerprintResponseSchema, ErrorResponseSchema, EventConfigSchema, EventStorageRecordSchema, EventTrackingRequestSchema, EventTrackingResponseSchema, ExportAnalyticsSchema, ExpressMiddlewareOptionsSchema, FallbackOptionsSchema, FilterOperatorSchema, FingerprintAnalysisSchema, ClientDetectionSchema as FingerprintClientDetectionSchema, FingerprintDetectRequestSchema, FingerprintRecordSchema, FingerprintResponseSchema, FingerprintSearchQuerySchema, ForgeabilityRiskSchema, GrowthBatchRequestSchema, GrowthConfigurationResetSchema, GrowthConfigurationThresholdsSchema, GrowthConfigurationUpdateSchema, GrowthOpportunitiesQuerySchema, GrowthOpportunityUpdateSchema, HEADER_PATTERNS, HTTP_STATUS, HeaderRuleSchema, HeaderRulesSchema, HealthResponseSchema, HomeRailRollupsRequestSchema, INTERNAL_ERRORS, InstructPayloadSchema, IntegrationTypeSchema, InternalProcessingFlagsSchema, IpRangeCollectionSchema, IpRangeRuleSchema, JwsParseError, KNOWN_AGENT_PATTERNS, KeyboardEventSchema, LoggingConfigSchema, MATCH_ACTIONS, MAX_BULK_BATCH_SIZE, MOBILE_PATTERNS, MessagePrioritySchema, MiddlewareActionSchema, MiddlewareConfigSchema, MiddlewareSessionConfigSchema, MiddlewareSessionDataSchema, MigrationStatusSchema, MouseEventSchema, NETWORK_ERRORS, NetworkConfigSchema, NetworkInfoSchema, NetworkTimingSchema, NextMiddlewareOptionsSchema, OAuth2ProviderSchema, OAuthConnectionStatusSchema, OAuthModeSchema, OAuthProviderMetadataSchema, OAuthProviderTypeSchema, OAuthProvidersMapSchema, OAuthTokensResponseSchema, OS_PATTERNS, OfflineQueueEntrySchema, OrganizationErrorCode, OrganizationIdSchema, OrganizationRoleSchema, OrganizationSettingsSchema, OrganizationSsoModeSchema, OrganizationSsoProviderSchema, OrganizationSsoSettingsSchema, PACKAGE_NAME, PAGINATION_DEFAULTS, PERFORMANCE_THRESHOLDS, PERMISSION_ERRORS, PIXEL_ERRORS, PIXEL_EVENT_LIMITS, PLAN_FEATURE_LIMITS, PLAN_RATE_LIMITS, POLICY_MATCH_TYPES, PUBLIC_API_ERROR_CODES, PageContextSchema, PaginatedResponseSchema, PaginationInfoSchema, PaginationParamsSchema, PaginationResponseSchema, PatternUpdateRequestSchema, PerformanceRecalculationRequestSchema, PixelAnalyticsSchema, PixelConfigurationSchema, PixelEventSchema, PixelEventTypeSchema, PixelInitSchema, PixelInstallConfigSchema, PixelSchema, PixelSessionSchema, PixelStatsSchema, PixelTrackingRequestSchema, PixelTrackingResponseSchema, PixelUserIdentificationSchema, PixelVerificationStatusSchema, PixelsBulkCreateItemSchema, PixelsBulkDeleteItemSchema, PixelsBulkRegenerateItemSchema, PixelsBulkRequestSchema, PixelsBulkUpdateItemSchema, PixelsQuerySchema, PolicyConditionSchema, PolicyConfigSchema, PolicyEvaluationContextSchema, PolicyEvaluationResultSchema, PolicyFetcher, PolicyMatchTypeSchema, PolicyMetadataSchema, PolicyRuleSchema, ProjectIdSchema, ProjectSchema, ProjectSettingsSchema, ProjectsBulkCreateItemSchema, ProjectsBulkDeleteItemSchema, ProjectsBulkRequestSchema, ProjectsBulkUpdateItemSchema, ProjectsQuerySchema, ProtocolVersionSchema, ProviderDefinitionSchema2 as ProviderDefinitionSchema, ProvidersResponseSchema, PublicAnalyticsBotTypeSchema, PublicAnalyticsSchema, PublicAnalyticsSummarySchema, PublicAnalyticsTimeSeriesPointSchema, PublicApiHeadersSchema, PublicApiQueryParamsSchema, PublicApiResponseSchema, PublicDetectionSchema, PublicKeyConfigSchema, PaginationResponseSchema as PublicPaginationResponseSchema, PublicProjectSchema, PublishProfileRequestSchema, QueryFilterSchema, QuerySchema, RATE_LIMIT_ERRORS, RULE_CACHE, RULE_CATEGORIES, RULE_CDN, RULE_ERRORS, RULE_PATHS, RULE_VERSION, RealtimeEventSchema, RealtimeEventTypeSchema, ReasoningStepSchema, RecommendationGenerationSchema, RecommendationQuerySchema, RedirectTargetSchema, RedisSessionDataSchema, RedisStatsSchema, RefreshScopesRequestSchema, RequestContextSchema, ResourceUsageSchema, ResponseActionSchema, RetryStrategySchema, RiskAssessmentSchema, RuleLoadOptionsSchema, RuleLoader, RuleMatchResultSchema, RuleMetadataSchema, RuleParser, RuleUpdateEventSchema, RuleValidationResultSchema, RuleValidator, SECURITY_LIMITS, SESSION_ERRORS, SESSION_LIMITS, SLUG_REGEX, SUSPICIOUS_HEADERS, SUSPICIOUS_PATTERNS, ScopeSchema, ScrollEventSchema, SdkSessionDataSchema, SessionConfigSchema, SessionCreateRequestSchema, SessionDataSchema, SessionEventSchema, SessionEventTypeSchema, SessionQueryOptionsSchema, SessionSchema, SessionStateSchema, SessionStorageTypeSchema, SessionTokenPayloadSchema, SessionUpdateRequestSchema, AgentTypeDistributionSchema as SharedAgentTypeDistributionSchema, ConfidenceDistributionSchema as SharedConfidenceDistributionSchema, ShopifyProjectProvisionRequestSchema, ShopifyProjectProvisionResultSchema, ShopifyProjectSettingsUpdateSchema, ShopifyStatsResponseSchema, ShopifyThreatSchema, SignatureAlgorithmSchema, SignatureRuleSchema, SignatureVerificationRequestSchema, SignatureVerificationResponseSchema, SingleItemResponseSchema, StatsResponseSchema, StatsUpdateEventSchema, StrictEnforcementActionSchema, SuggestedActionSchema, SystemStatsSchema, TIME_WINDOWS, TLSFingerprintSchema, TRADITIONAL_BOT_PATTERNS, TRUSTED_BOTS, TestDetectionRequestSchema, ThresholdConfigSchema, ToolConsentOverridesSchema, TouchEventSchema, TransportConfigSchema, TransportMetricsSchema, TransportOptionsSchema, TransportResponseSchema, TransportStateSchema, TransportStatusSchema, UPDATE_FREQUENCIES, USER_AGENT_PATTERNS, UpdateApiKeySchema, UpdateBouncerConfigSchema, UpdateOrganizationInputSchema, UpdateOrganizationSchema, UpdatePixelSchema, UpdateProfileRequestSchema, UpdateProjectSchema, UpdateSettingsSchema, UserAgentRuleSchema, UserPlanSchema, UserSchema, VALIDATION_ERRORS, VALIDATION_MODES, VALIDATION_PATTERNS, VERDICT_COOKIE_NAME, VERSION, VerificationCacheEntrySchema, VerificationProviderSchema, VerificationRequestSchema, VerificationResponseSchema, VerificationTokenSchema, WEBHOOK_LIMITS, WasmAgentNameSchema, AgentTypeSchema as WasmAgentTypeSchema, WasmConfigSchema, WasmDetectionResultSchema, WasmRequestMetadataSchema, WasmRiskLevel, WasmVerificationMethod, WorkerActionSchema, WorkerCapabilitiesSchema, WorkerConfigSchema, WorkerErrorSchema, WorkerErrorTypeSchema, WorkerHealthStatusSchema, WorkerMessageSchema, WorkerMessageTypeSchema, WorkerMetricsSchema, WorkerPoolConfigSchema, WorkerStateSchema, WorkerTaskSchema, acceptsHtml, assignmentChangeRequestSchema, auditLogQuerySchema, batchAssignmentRequestSchema, buildInitialStepsState, calculateDeployProgress, canonicalSigningPayload, changePasswordSchema, classifyResponseShape, createError, createErrorResponse, createEvaluationContext, createPaginatedResponse, createPaginatedResponseSchema, createPolicyFetcher, createPublicErrorResponse, createPublicPaginatedResponse, createPublicSuccessResponse, createSuccessResponse, createValidationErrorResponse, defaultConfig, deriveVerdict, detectionClassToEnum, discoveredToolSchema, encodeVerdictCookie, enumToDetectionClass, evaluateEnforcement, evaluatePolicy, extractMatch, fetchPolicy, findMatchingPattern, forgotPasswordSchema, formatConfidence, fromProviderRegistryFormat, fromProviderRegistryFormatSafe, gatewayConfigInputSchema, gatewayConfigSchema, gatewayInternalDiscoverErrorSchema, gatewayInternalDiscoverSuccessSchema, gatewayInternalToolsListSchema, gatewayToolCallSchema, generateTestId, getAgentDisplayName, getBotType, getCategoryBadgeVariant, getCategoryColor, getConfidenceLevel, getDefaultPolicyFetcher, getEnvVar, getRateLimitWindow, getRemainingQuota, getStepInfo, getStepOrder, getVerificationMethodDescription, getVerificationReliability, getVerificationRiskLevel, initializePolicyFetcher, isBlockingAction, isHighConfidenceVerification, isKnownAgentType, isKnownAiCrawler, isLegacyDetectionClass, isLegitimateCategory, isLimitExceeded, isPassThroughAction, isPrivateOrReservedHost, isSupportedAuthType, isTraditionalBot, isValidFingerprintResponse, isValidWasmDetectionResult, isValidWasmRequestMetadata, loadRulesAsync, loadRulesSync, mapLegacyAuthType, mapToLegacyAuthType, mapVerificationMethod, matchPath, mergeWithDefaults, migrateLegacyDetectionClass, normalizeAgentName, normalizeConfidence, normalizeDetectionClass, normalizeDetectionClassEnum, normalizeOrganizationName, oauthClientSchema, parseAgentName, parseEvaluationContext, parseJwsCompact, parsePolicyConfig, parseRules, parseSigningKey, partial, passwordSchema, projectResetRequestSchema, resetPasswordSchema, resetPolicyFetcher, safeParsePolicyConfig, safeUrl, shouldEnforce, signInSchema, signMcpiEnvelope, signUpSchema, strict, supportsClientSide, supportsHeaders, supportsServerEnhanced, testPattern, testPatterns, toPercent, toProviderRegistryFormat, toWasmRequestMetadata, updateStepsState, upstreamDiscoveryErrorSchema, upstreamServerInputSchema, upstreamServerSchema, validate, validateClientDetection, validateFingerprintRequest, validateMcpIPayload, validateOrThrow, validateOrganizationName, validateRules, validateRulesLoose, vaultResolveDataSchema, vaultResolveErrorSchema, vaultResolveMetaSchema, vaultResolveResponseSchema, vaultResolveSuccessSchema, verifyEmailSchema, wasmToDetectionResult };
13765
- //# sourceMappingURL=index.mjs.map
13766
- //# sourceMappingURL=index.mjs.map
13954
+ export { AI_AGENT_HEADERS, API_ERRORS, API_ERROR_CODES, API_REQUEST_LIMITS, AUTHORIZATION_MODES, AUTH_ERRORS, AUTH_ERROR_MESSAGES, AccountSchema, AddFingerprintToProfileRequestSchema, AddUpdateProviderRequestSchema, AdminQueryParamsSchema, AgentCategorySchema, AgentClassificationRequestSchema, AgentClassificationResultSchema, AgentClassificationSchema, AgentInfoSchema, AgentPatternSchema, AgentProfileSchema, AgentShieldConfigSchema, AgentSourceDistributionSchema, AgentStatisticsSchema, AgentTypeDefinitionSchema, AgentTypeSchema, AggregationTypeSchema, AllowListEntrySchema, AnalyticsAgentSourcesQuerySchema, AnalyticsAgentTypesQuerySchema, AnalyticsChartDataSchema, AnalyticsDataPointSchema, AnalyticsExportParamsSchema, AnalyticsExportQuerySchema, AnalyticsQuerySchema2 as AnalyticsQuerySchema, AnalyticsRealtimeQuerySchema, AnalyticsSessionsQuerySchema, AnalyticsSessionsResponseSchema, AnalyticsSummarySchema2 as AnalyticsSessionsSummarySchema, AnalyticsSummarySchema, AnalyticsTimeSeriesSchema, AnalyticsTimeWindowSchema, ApiKeyPermissionSchema, ApiKeyRateLimitsSchema, ApiKeySchema, ApiKeysBulkCreateItemSchema, ApiKeysBulkRequestSchema, ApiKeysBulkRevokeItemSchema, ApiKeysBulkUpdateItemSchema, ApiKeysQuerySchema, ApiResponseSchema, AuthErrorType, AuthProviderTypeSchema, BLOCKED_PATH, BOT_USER_AGENT_PATTERNS, BROWSER_PATTERNS, BULK_ERROR_CODES, BaseAuthProviderSchema, BaseBulkRequestSchema, BatchDetectionRequestSchema, BatchDetectionResponseSchema, BatchEventRequestSchema, BatchEventResponseSchema, BatchEventSchema, BatchPixelEventRequestSchema, BeaconBatchSchema, BeaconCollectorDataSchema, BeaconConfigSchema, BeaconEventSchema, BeaconEventTypeSchema, BeaconWorkerMessageSchema, BeaconWorkerMessageTypeSchema, BehavioralAnalysisSchema, BehavioralDataSchema, BehavioralPatternSchema, BehavioralRulesSchema, BehavioralSignalsSchema, BehavioralThresholdSchema, BlockEventSchema, BlockReasonSchema, BotPatternSchema2 as BotPatternSchema, BotTypeSchema, BouncerConfigSchema, BouncerOutcomeSchema, BouncerProofSchema, BrowserInfoSchema, BulkDeletePreviewStatsSchema, BulkDeleteResponseSchema, BulkOperationOptionsSchema, BulkOperationParamsSchema, BulkOperationResultSchema, BulkOperationTypeSchema, BulkResponseSchema, BulkResultItemSchema, CACHE_LIMITS, CACHE_TTL, CLOUD_PROVIDER_RANGES, CONDITION_FIELDS, CONDITION_OPERATORS, CONFIDENCE_THRESHOLDS, CRISPBudgetSchema, CURRENT_POLICY_VERSION, CacheConfigSchema, CachedDetectionDataSchema, ChallengeParamsSchema, CircuitBreakerConfigSchema, CircuitBreakerStateSchema, ClickEventSchema, ClientDetectionSchema2 as ClientDetectionSchema, CollectFingerprintRequestSchema, CollectFingerprintResponseSchema, CollectedDataSchema, CollectorTypeSchema, ConditionFieldSchema, ConditionOperatorSchema, ConditionValueSchema, ConfidenceBreakdownSchema, ConfidenceLevelSchema, ConfidenceThresholdSchema, ConfidenceUtils, ConfiguredProviderSchema, ConnectionTypeSchema, ConsentAgentMetadataSchema, ConsentBrandingSchema, ConsentCapabilityGroupSchema, ConsentCapabilitySchema, ConsentConfigMetadataSchema, ConsentConfigSchema, ConsentTermsSchema, ConsentUISchema, CreateApiKeySchema, CreateOrganizationInputSchema, CreateOrganizationSchema, CreatePixelSchema, CreateProfileRequestSchema, CreateProjectSchema, CredentialProviderSchema, CustomRuleSchema, DATABASE_LIMITS, DEFAULT_AGENTSHIELD_CONFIG, DEFAULT_AGENT_TYPES, DEFAULT_API_KEY_RATE_LIMITS, DEFAULT_BEHAVIORAL_THRESHOLDS, DEFAULT_CACHE_CONFIG, DEFAULT_CONFIDENCE_THRESHOLDS, DEFAULT_CORS_CONFIG, DEFAULT_DETECTION_OPTIONS, DEFAULT_ENV_VARS, DEFAULT_LOG_CONFIG, DEFAULT_PASSWORD_REQUIREMENTS, DEFAULT_PIXEL_CONFIG, DEFAULT_POLICY, DEFAULT_PROJECT_SETTINGS, DEFAULT_RESPONSE_HEADERS, DEFAULT_RETRY_CONFIG, DEFAULT_RULE_PRIORITY, DEFAULT_SESSION_CONFIG, DEFAULT_THRESHOLDS, DEFAULT_TIMEOUTS, DEFAULT_WEBHOOK_EVENTS, DEPLOY_STEPS, DETECTION_ERRORS, DETECTION_LIMITS, DashboardStatsRequestSchema, DatabaseDetectionMetadataSchema, DatabaseStatusSchema, DecisionSchema, DelegationPollingStatusSchema, DelegationSchema, DelegationStatusSchema, DeleteAccountSchema, DenyListEntrySchema, DeployProgressEventSchema, DeployStepIdSchema, DeployStepStateSchema, DeployStepStatusSchema, DeploymentMetadataSchema, DetectionClassSchema, DetectionDetailSchema, DetectionErrorDetailsSchema, DetectionEventSchema, DetectionInputSchema, DetectionLogSchema, DetectionMetadataSchema, DetectionModeSchema, DetectionOptionsSchema, DetectionReasoningSchema, DetectionRequestSchema, DetectionResponseSchema, DetectionResultSchema, DetectionRuleSchema, DetectionRulesSchema, DetectionSignalSchema, DetectionStatusSchema, DetectionTestResultSchema, DetectionViewTypeSchema, ENFORCEMENT_ACTIONS, ENFORCEMENT_MODES, ERROR_CATEGORIES, ERROR_CODES, ERROR_MESSAGES, ERROR_STATUS_CODES, EXPORT_LIMITS, EnforcementActionSchema, EnforcementModeSchema, EngineInfoSchema, EnhancedFingerprintResponseSchema, ErrorResponseSchema, EventConfigSchema, EventStorageRecordSchema, EventTrackingRequestSchema, EventTrackingResponseSchema, ExportAnalyticsSchema, ExpressMiddlewareOptionsSchema, FallbackOptionsSchema, FilterOperatorSchema, FingerprintAnalysisSchema, ClientDetectionSchema as FingerprintClientDetectionSchema, FingerprintDetectRequestSchema, FingerprintRecordSchema, FingerprintResponseSchema, FingerprintSearchQuerySchema, ForgeabilityRiskSchema, GrowthBatchRequestSchema, GrowthConfigurationResetSchema, GrowthConfigurationThresholdsSchema, GrowthConfigurationUpdateSchema, GrowthOpportunitiesQuerySchema, GrowthOpportunityUpdateSchema, HEADER_PATTERNS, HTTP_STATUS, HeaderRuleSchema, HeaderRulesSchema, HealthResponseSchema, HomeRailRollupsRequestSchema, INTERNAL_ERRORS, InstructPayloadSchema, IntegrationTypeSchema, InternalProcessingFlagsSchema, IpRangeCollectionSchema, IpRangeRuleSchema, JafarParseError, JwsParseError, KNOWN_AGENT_PATTERNS, KeyboardEventSchema, LoggingConfigSchema, MATCH_ACTIONS, MAX_BULK_BATCH_SIZE, MOBILE_PATTERNS, MessagePrioritySchema, MiddlewareActionSchema, MiddlewareConfigSchema, MiddlewareSessionConfigSchema, MiddlewareSessionDataSchema, MigrationStatusSchema, MouseEventSchema, NETWORK_ERRORS, NetworkConfigSchema, NetworkInfoSchema, NetworkTimingSchema, NextMiddlewareOptionsSchema, OAuth2ProviderSchema, OAuthConnectionStatusSchema, OAuthModeSchema, OAuthProviderMetadataSchema, OAuthProviderTypeSchema, OAuthProvidersMapSchema, OAuthTokensResponseSchema, OS_PATTERNS, OfflineQueueEntrySchema, OrganizationErrorCode, OrganizationIdSchema, OrganizationRoleSchema, OrganizationSettingsSchema, OrganizationSsoModeSchema, OrganizationSsoProviderSchema, OrganizationSsoSettingsSchema, PACKAGE_NAME, PAGINATION_DEFAULTS, PERFORMANCE_THRESHOLDS, PERMISSION_ERRORS, PIXEL_ERRORS, PIXEL_EVENT_LIMITS, PLAN_FEATURE_LIMITS, PLAN_RATE_LIMITS, POLICY_MATCH_TYPES, PUBLIC_API_ERROR_CODES, PageContextSchema, PaginatedResponseSchema, PaginationInfoSchema, PaginationParamsSchema, PaginationResponseSchema, PatternUpdateRequestSchema, PerformanceRecalculationRequestSchema, PixelAnalyticsSchema, PixelConfigurationSchema, PixelEventSchema, PixelEventTypeSchema, PixelInitSchema, PixelInstallConfigSchema, PixelSchema, PixelSessionSchema, PixelStatsSchema, PixelTrackingRequestSchema, PixelTrackingResponseSchema, PixelUserIdentificationSchema, PixelVerificationStatusSchema, PixelsBulkCreateItemSchema, PixelsBulkDeleteItemSchema, PixelsBulkRegenerateItemSchema, PixelsBulkRequestSchema, PixelsBulkUpdateItemSchema, PixelsQuerySchema, PolicyConditionSchema, PolicyConfigSchema, PolicyEvaluationContextSchema, PolicyEvaluationResultSchema, PolicyFetcher, PolicyMatchTypeSchema, PolicyMetadataSchema, PolicyRuleSchema, ProjectIdSchema, ProjectSchema, ProjectSettingsSchema, ProjectsBulkCreateItemSchema, ProjectsBulkDeleteItemSchema, ProjectsBulkRequestSchema, ProjectsBulkUpdateItemSchema, ProjectsQuerySchema, ProtocolVersionSchema, ProviderDefinitionSchema2 as ProviderDefinitionSchema, ProvidersResponseSchema, PublicAnalyticsBotTypeSchema, PublicAnalyticsSchema, PublicAnalyticsSummarySchema, PublicAnalyticsTimeSeriesPointSchema, PublicApiHeadersSchema, PublicApiQueryParamsSchema, PublicApiResponseSchema, PublicDetectionSchema, PublicKeyConfigSchema, PaginationResponseSchema as PublicPaginationResponseSchema, PublicProjectSchema, PublishProfileRequestSchema, QueryFilterSchema, QuerySchema, RATE_LIMIT_ERRORS, RULE_CACHE, RULE_CATEGORIES, RULE_CDN, RULE_ERRORS, RULE_PATHS, RULE_VERSION, RealtimeEventSchema, RealtimeEventTypeSchema, ReasoningStepSchema, RecommendationGenerationSchema, RecommendationQuerySchema, RedirectTargetSchema, RedisSessionDataSchema, RedisStatsSchema, RefreshScopesRequestSchema, RequestContextSchema, ResourceUsageSchema, ResponseActionSchema, RetryStrategySchema, RiskAssessmentSchema, RuleLoadOptionsSchema, RuleLoader, RuleMatchResultSchema, RuleMetadataSchema, RuleParser, RuleUpdateEventSchema, RuleValidationResultSchema, RuleValidator, SECURITY_LIMITS, SESSION_ERRORS, SESSION_LIMITS, SLUG_REGEX, SUSPICIOUS_HEADERS, SUSPICIOUS_PATTERNS, ScopeSchema, ScrollEventSchema, SdkSessionDataSchema, SessionConfigSchema, SessionCreateRequestSchema, SessionDataSchema, SessionEventSchema, SessionEventTypeSchema, SessionQueryOptionsSchema, SessionSchema, SessionStateSchema, SessionStorageTypeSchema, SessionTokenPayloadSchema, SessionUpdateRequestSchema, AgentTypeDistributionSchema as SharedAgentTypeDistributionSchema, ConfidenceDistributionSchema as SharedConfidenceDistributionSchema, ShopifyProjectProvisionRequestSchema, ShopifyProjectProvisionResultSchema, ShopifyProjectSettingsUpdateSchema, ShopifyStatsResponseSchema, ShopifyThreatSchema, SignatureAlgorithmSchema, SignatureRuleSchema, SignatureVerificationRequestSchema, SignatureVerificationResponseSchema, SingleItemResponseSchema, StatsResponseSchema, StatsUpdateEventSchema, StrictEnforcementActionSchema, SuggestedActionSchema, SystemStatsSchema, TIME_WINDOWS, TLSFingerprintSchema, TRADITIONAL_BOT_PATTERNS, TRUSTED_BOTS, TestDetectionRequestSchema, ThresholdConfigSchema, ToolConsentOverridesSchema, TouchEventSchema, TransportConfigSchema, TransportMetricsSchema, TransportOptionsSchema, TransportResponseSchema, TransportStateSchema, TransportStatusSchema, UPDATE_FREQUENCIES, USER_AGENT_PATTERNS, UpdateApiKeySchema, UpdateBouncerConfigSchema, UpdateOrganizationInputSchema, UpdateOrganizationSchema, UpdatePixelSchema, UpdateProfileRequestSchema, UpdateProjectSchema, UpdateSettingsSchema, UserAgentRuleSchema, UserPlanSchema, UserSchema, VALIDATION_ERRORS, VALIDATION_MODES, VALIDATION_PATTERNS, VERDICT_COOKIE_NAME, VERSION, VerificationCacheEntrySchema, VerificationProviderSchema, VerificationRequestSchema, VerificationResponseSchema, VerificationTokenSchema, WEBHOOK_LIMITS, WasmAgentNameSchema, AgentTypeSchema as WasmAgentTypeSchema, WasmConfigSchema, WasmDetectionResultSchema, WasmRequestMetadataSchema, WasmRiskLevel, WasmVerificationMethod, WorkerActionSchema, WorkerCapabilitiesSchema, WorkerConfigSchema, WorkerErrorSchema, WorkerErrorTypeSchema, WorkerHealthStatusSchema, WorkerMessageSchema, WorkerMessageTypeSchema, WorkerMetricsSchema, WorkerPoolConfigSchema, WorkerStateSchema, WorkerTaskSchema, acceptsHtml, assignmentChangeRequestSchema, auditLogQuerySchema, batchAssignmentRequestSchema, buildInitialStepsState, calculateDeployProgress, canonicalSigningPayload, changePasswordSchema, classifyResponseShape, createError, createErrorResponse, createEvaluationContext, createPaginatedResponse, createPaginatedResponseSchema, createPolicyFetcher, createPublicErrorResponse, createPublicPaginatedResponse, createPublicSuccessResponse, createSuccessResponse, createValidationErrorResponse, defaultConfig, deriveVerdict, detectionClassToEnum, discoveredToolSchema, encodeVerdictCookie, enumToDetectionClass, evaluatePolicy, extractMatch, fetchPolicy, findMatchingPattern, forgotPasswordSchema, formatConfidence, fromProviderRegistryFormat, fromProviderRegistryFormatSafe, gatewayConfigInputSchema, gatewayConfigSchema, gatewayInternalDiscoverErrorSchema, gatewayInternalDiscoverSuccessSchema, gatewayInternalToolsListSchema, gatewayToolCallSchema, generateTestId, getAgentDisplayName, getBotType, getCategoryBadgeVariant, getCategoryColor, getConfidenceLevel, getDefaultPolicyFetcher, getEnvVar, getRateLimitWindow, getRemainingQuota, getStepInfo, getStepOrder, getVerificationMethodDescription, getVerificationReliability, getVerificationRiskLevel, initializePolicyFetcher, isBlockingAction, isHighConfidenceVerification, isKnownAgentType, isKnownAiCrawler, isLegacyDetectionClass, isLegitimateCategory, isLimitExceeded, isPassThroughAction, isPrivateOrReservedHost, isSupportedAuthType, isTraditionalBot, isValidFingerprintResponse, isValidWasmDetectionResult, isValidWasmRequestMetadata, loadRulesAsync, mapLegacyAuthType, mapToLegacyAuthType, matchPath, mergeWithDefaults, migrateLegacyDetectionClass, normalizeAgentName, normalizeConfidence, normalizeDetectionClass, normalizeDetectionClassEnum, normalizeOrganizationName, oauthClientSchema, parseAgentName, parseEvaluationContext, parseJafarFeed, parseJwsCompact, parsePolicyConfig, parseRules, parseSigningKey, partial, passwordSchema, projectResetRequestSchema, resetPasswordSchema, resetPolicyFetcher, safeParsePolicyConfig, safeUrl, signInSchema, signMcpiEnvelope, signUpSchema, strict, supportsClientSide, supportsHeaders, supportsServerEnhanced, testPattern, testPatterns, toPercent, toProviderRegistryFormat, toWasmRequestMetadata, updateStepsState, upstreamDiscoveryErrorSchema, upstreamServerInputSchema, upstreamServerSchema, validate, validateClientDetection, validateFingerprintRequest, validateMcpIPayload, validateOrThrow, validateOrganizationName, validateRules, validateRulesLoose, vaultResolveDataSchema, vaultResolveErrorSchema, vaultResolveMetaSchema, vaultResolveResponseSchema, vaultResolveSuccessSchema, verifyEmailSchema, wasmToDetectionResult };
@@ -113,5 +113,3 @@ exports.VAULT_WIRE_CONTRACT_EXPECTED_JWT = VAULT_WIRE_CONTRACT_EXPECTED_JWT;
113
113
  exports.VAULT_WIRE_CONTRACT_EXPECTED_REQUEST_BODY = VAULT_WIRE_CONTRACT_EXPECTED_REQUEST_BODY;
114
114
  exports.VAULT_WIRE_CONTRACT_TEST_KEYPAIR = VAULT_WIRE_CONTRACT_TEST_KEYPAIR;
115
115
  exports.VAULT_WIRE_CONTRACT_URL_PATH = VAULT_WIRE_CONTRACT_URL_PATH;
116
- //# sourceMappingURL=index.js.map
117
- //# sourceMappingURL=index.js.map