@kya-os/checkpoint-shared 1.1.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.js CHANGED
@@ -5243,6 +5243,17 @@ var AgentTypeSchema = external_exports.enum([
5243
5243
  // Content/Writing AI
5244
5244
  "writer",
5245
5245
  "jasper",
5246
+ // Additional AI vendors — Engine-Pattern-Codegen-Retirement-1 backfilled
5247
+ // these after the SSOT migration surfaced legacy patterns_generated.rs
5248
+ // entries (xAI Grok, DeepSeek-User/DeepSeekBot, Amazon Q + NovaAct,
5249
+ // KYA Agent) that were never represented in TS. Their patterns lived
5250
+ // only in the retired YAML→Rust pipeline; without these types the
5251
+ // backfilled `KNOWN_AGENT_PATTERNS` entries would have to coerce to
5252
+ // `'unknown'` and lose per-vendor classification downstream.
5253
+ "xai",
5254
+ "deepseek",
5255
+ "amazon",
5256
+ "kya",
5246
5257
  // Unknown AI agent
5247
5258
  "unknown"
5248
5259
  ]);
@@ -5497,7 +5508,11 @@ var KNOWN_AGENT_PATTERNS = [
5497
5508
  id: "openai-chatgpt",
5498
5509
  type: "openai",
5499
5510
  name: "ChatGPT",
5500
- patterns: ["ChatGPT-User", "gpt-4", "gpt-3.5", "gpt-4-turbo", "gpt-4o"],
5511
+ // `OAI-SearchBot` backfilled by Engine-Pattern-Codegen-Retirement-1
5512
+ // after the legacy YAML→Rust path was retired. Previously detected
5513
+ // only via the legacy generator; the new TS SSOT migration would
5514
+ // have silently lost it.
5515
+ patterns: ["ChatGPT-User", "OAI-SearchBot", "gpt-4", "gpt-3.5", "gpt-4-turbo", "gpt-4o"],
5501
5516
  headers: {
5502
5517
  "X-OpenAI-Assistant": "*"
5503
5518
  },
@@ -5554,6 +5569,18 @@ var KNOWN_AGENT_PATTERNS = [
5554
5569
  // was missing, which left ~14 real Claude-User sessions on
5555
5570
  // production stamped (bot, …) instead of (ai_agent, ai_assistant).
5556
5571
  "Claude-User",
5572
+ // `Claude-SearchBot` and `claude-code` backfilled by
5573
+ // Engine-Pattern-Codegen-Retirement-1 — both were in the retired
5574
+ // YAML→Rust pipeline but never represented in TS. Claude-Code is
5575
+ // Anthropic's CLI agent (this very tool); Claude-SearchBot is
5576
+ // their search-augmented fetcher (parallel to OAI-SearchBot).
5577
+ "Claude-SearchBot",
5578
+ "claude-code",
5579
+ // Engine-Pattern-Codegen-Retirement-1 round 2 (Bugbot #e111d65f):
5580
+ // the retired YAML→Rust pipeline matched both `claude-code` AND
5581
+ // `claude code` (space-separated). Some host wrappers stamp the
5582
+ // tool name with a space; the hyphenated form alone misses them.
5583
+ "claude code",
5557
5584
  "claude-3",
5558
5585
  "claude-2",
5559
5586
  "claude-instant",
@@ -5621,7 +5648,13 @@ var KNOWN_AGENT_PATTERNS = [
5621
5648
  id: "perplexity-user",
5622
5649
  type: "perplexity",
5623
5650
  name: "Perplexity",
5624
- patterns: ["Perplexity-User", "Perplexity-AI"],
5651
+ // `Comet` is Perplexity's AI-powered browser; backfilled into the
5652
+ // TS canonical via Engine-Pattern-Codegen-Retirement-1 after the
5653
+ // SSOT consolidation surfaced the gap. Previously detected only by
5654
+ // the legacy YAML→Rust codegen path; `apps/web/scripts/seed-agent-
5655
+ // types-data.ts` listed it as a Perplexity AI detection while
5656
+ // `KNOWN_AGENT_PATTERNS` did not. Now structurally enforced.
5657
+ patterns: ["Perplexity-User", "Perplexity-AI", "Comet"],
5625
5658
  confidence: 0.95,
5626
5659
  category: "ai_assistant",
5627
5660
  isLegitimate: true
@@ -5651,45 +5684,81 @@ var KNOWN_AGENT_PATTERNS = [
5651
5684
  category: "scraper",
5652
5685
  isLegitimate: true
5653
5686
  },
5687
+ {
5688
+ // ORDERING NOTE: `gemini-deep-research` MUST appear BEFORE
5689
+ // `google-bard` so the more-specific 'Gemini-Deep-Research'
5690
+ // pattern wins under the engine's first-match-wins iteration over
5691
+ // AI_AGENT_PATTERNS. The legacy YAML→Rust output collapsed all
5692
+ // Google patterns under a single "Google AI" name with identical
5693
+ // confidence (0.90), so shadowing was benign; the SSOT migration
5694
+ // surfaced different names + confidences (0.95 scraper vs 0.90
5695
+ // ai_assistant), making the order load-bearing.
5696
+ //
5697
+ // Google's "Deep Research" training/research crawler — distinct
5698
+ // UA from Bard/Gemini interactive sessions.
5699
+ id: "gemini-deep-research",
5700
+ type: "google",
5701
+ name: "Gemini-Deep-Research",
5702
+ patterns: ["Gemini-Deep-Research", "gemini-deep-research"],
5703
+ confidence: 0.95,
5704
+ category: "scraper",
5705
+ isLegitimate: true
5706
+ },
5654
5707
  {
5655
5708
  id: "google-bard",
5656
5709
  type: "google",
5657
5710
  name: "Google Bard",
5711
+ // Engine-Pattern-Codegen-Retirement-1 corrections:
5712
+ // - REMOVED `Google-InspectionTool` from this entry. The legacy
5713
+ // YAML→Rust pipeline classified Google-InspectionTool as a
5714
+ // Googlebot-family search inspection tool (Search Console
5715
+ // verification, structured-data testing), not a Bard/Gemini AI
5716
+ // session. Moved to `NON_AI_PATTERNS` in
5717
+ // `rust/crates/kya-os-engine/src/stages/patterns.rs` under the
5718
+ // `Googlebot` family so classification stays SearchCrawler.
5719
+ // - ADDED `LaMDA` (Google's pre-Bard conversational AI; legacy
5720
+ // YAML had it under Google AI) and `GoogleAgent-Mariner`
5721
+ // (Google's browser-controlling agent product) — both were in
5722
+ // the retired pipeline, never in TS.
5723
+ // - The broad 'gemini' pattern below shadows narrower Gemini-*
5724
+ // UAs under first-match-wins. The Gemini-Deep-Research entry
5725
+ // above must stay ordered first to avoid being shadowed.
5658
5726
  patterns: [
5659
5727
  "Bard",
5660
- "Google-InspectionTool",
5661
5728
  "gemini",
5662
5729
  "gemini-pro",
5663
5730
  "gemini-1.5",
5664
5731
  "gemini-1.5-pro",
5665
5732
  "gemini-ultra",
5666
5733
  "palm",
5667
- "palm2"
5734
+ "palm2",
5735
+ "LaMDA",
5736
+ "GoogleAgent-Mariner"
5668
5737
  ],
5669
5738
  confidence: 0.9,
5670
5739
  category: "ai_assistant",
5671
5740
  isLegitimate: true
5672
5741
  },
5673
- {
5674
- // Google's "Deep Research" training/research crawler — distinct UA
5675
- // from Bard/Gemini interactive sessions. Pattern matches the
5676
- // canonical 'Gemini-Deep-Research/<version>' UA token; the broad
5677
- // 'gemini' substring in google-bard would otherwise win and stamp
5678
- // these crawler hits as ai_assistant.
5679
- id: "gemini-deep-research",
5680
- type: "google",
5681
- name: "Gemini-Deep-Research",
5682
- patterns: ["Gemini-Deep-Research", "gemini-deep-research"],
5683
- confidence: 0.95,
5684
- category: "scraper",
5685
- isLegitimate: true
5686
- },
5687
5742
  // Microsoft Copilot
5688
5743
  {
5689
5744
  id: "microsoft-copilot",
5690
5745
  type: "microsoft",
5691
5746
  name: "Microsoft Copilot",
5692
- patterns: ["copilot", "github-copilot", "microsoft-copilot"],
5747
+ patterns: [
5748
+ "copilot",
5749
+ "github-copilot",
5750
+ "microsoft-copilot",
5751
+ // Engine-Pattern-Codegen-Retirement-1 round 2 (Bugbot #89cfb23d):
5752
+ // the retired YAML→Rust pipeline carried `BingPreview/.*ChatGPT`
5753
+ // for Bing Copilot UAs. Without this, BingPreview+ChatGPT UAs hit
5754
+ // the non-AI `BingPreview` Bingbot rule and resolve as SearchBot.
5755
+ // Note: this entry must order BEFORE the Bingbot regex in the
5756
+ // composed table — AI patterns lead, so the dispatch order in
5757
+ // patterns.rs::AI_AGENT_PATTERNS (AI_PATTERNS_FROM_TS then
5758
+ // NON_AI_PATTERNS) preserves the precedence the legacy table
5759
+ // gave Microsoft AI at confidence 0.9.
5760
+ "BingPreview/.*ChatGPT"
5761
+ ],
5693
5762
  confidence: 0.9,
5694
5763
  category: "ai_assistant",
5695
5764
  isLegitimate: true
@@ -5724,7 +5793,12 @@ var KNOWN_AGENT_PATTERNS = [
5724
5793
  id: "cohere-bot",
5725
5794
  type: "cohere",
5726
5795
  name: "CohereBot",
5727
- patterns: ["cohere-ai"],
5796
+ // Engine-Pattern-Codegen-Retirement-1 round 2 (Bugbot #8007b7a3):
5797
+ // the retired YAML→Rust pipeline matched the literal `CohereBot`
5798
+ // token; without it the UA falls through to the generic-bot
5799
+ // fallback (`bot` substring) and resolves as `Generic Bot` /
5800
+ // OtherBot, losing vendor attribution.
5801
+ patterns: ["cohere-ai", "CohereBot"],
5728
5802
  confidence: 0.85,
5729
5803
  category: "scraper",
5730
5804
  isLegitimate: true
@@ -5897,6 +5971,86 @@ var KNOWN_AGENT_PATTERNS = [
5897
5971
  confidence: 0.8,
5898
5972
  category: "ai_assistant",
5899
5973
  isLegitimate: true
5974
+ },
5975
+ // ─────────────────────────────────────────────────────────────────────
5976
+ // Engine-Pattern-Codegen-Retirement-1 backfills.
5977
+ //
5978
+ // Each entry below was detected by the retired YAML→Rust codegen path
5979
+ // (`patterns_generated.rs`) but never represented in TS. The SSOT
5980
+ // migration would have silently dropped detection for these vendors.
5981
+ // Names + confidences mirror the legacy pipeline so classify_agent /
5982
+ // classify_vendor downstream consumers don't see a behavioral shift.
5983
+ // ─────────────────────────────────────────────────────────────────────
5984
+ // xAI Grok — Elon's AI; user-facing assistant + crawler share the
5985
+ // same vendor brand, all routed through this single entry. The
5986
+ // legacy pipeline emitted them under one "xAI Grok" name, so a split
5987
+ // would change downstream classification.
5988
+ {
5989
+ id: "xai-grok",
5990
+ type: "xai",
5991
+ name: "xAI Grok",
5992
+ patterns: ["xAI-Grok", "GrokBot", "Grok-DeepSearch"],
5993
+ confidence: 0.95,
5994
+ category: "ai_assistant",
5995
+ isLegitimate: true
5996
+ },
5997
+ // DeepSeek — split into interactive (DeepSeek-User) and crawler
5998
+ // (DeepSeekBot), parallel to the openai-chatgpt / openai-gptbot
5999
+ // and anthropic-claude / anthropic-claudebot splits.
6000
+ {
6001
+ id: "deepseek-user",
6002
+ type: "deepseek",
6003
+ name: "DeepSeek AI",
6004
+ patterns: ["DeepSeek-User"],
6005
+ confidence: 0.95,
6006
+ category: "ai_assistant",
6007
+ isLegitimate: true
6008
+ },
6009
+ {
6010
+ id: "deepseek-bot",
6011
+ type: "deepseek",
6012
+ name: "DeepSeekBot",
6013
+ patterns: ["DeepSeekBot"],
6014
+ confidence: 0.95,
6015
+ category: "scraper",
6016
+ isLegitimate: true
6017
+ },
6018
+ // Amazon Q + NovaAct — Amazon's AI assistant product family.
6019
+ // NovaAct is the AWS-branded browser-controlling agent (parallel to
6020
+ // Anthropic's Claude-Code, Google's GoogleAgent-Mariner).
6021
+ {
6022
+ id: "amazon-q",
6023
+ type: "amazon",
6024
+ name: "Amazon Q",
6025
+ patterns: ["Amazon-Q", "NovaAct"],
6026
+ confidence: 0.95,
6027
+ category: "ai_assistant",
6028
+ isLegitimate: true
6029
+ },
6030
+ // KYA Agent — our own product family. KYA-Agent/<version> is the
6031
+ // canonical UA; KYA-OS is the umbrella protocol token; KYA-Compute/
6032
+ // is the signed-compute variant. All ai_assistant — none of these
6033
+ // are training crawlers.
6034
+ //
6035
+ // Display name is `'Kya Agent'` (sentence case), NOT `'KYA Agent'`
6036
+ // (brand all-caps). Matches every other consumer's expectation:
6037
+ // `did-verifier.ts` hardcodes `'Kya Agent'` as the display fallback
6038
+ // for did:key / unhumanizable did:web (3 sites), the gateway router
6039
+ // docstring refers to the "Kya Agent" pattern, and the signed-agent
6040
+ // e2e test asserts on `'Kya Agent'` for both the unsigned Tier-3 UA
6041
+ // path and the signed DID-verified path. The prior `'KYA Agent'`
6042
+ // value here was a codegen-source outlier that produced consistent
6043
+ // brand-case-vs-sentence-case drift between Tier 3 emissions (which
6044
+ // read this) and Tier 1 emissions (which use the did-verifier
6045
+ // hardcode). One source of truth, sentence case.
6046
+ {
6047
+ id: "kya-agent",
6048
+ type: "kya",
6049
+ name: "Kya Agent",
6050
+ patterns: ["KYA-Agent/", "KYA-OS", "KYA-Compute/"],
6051
+ confidence: 0.95,
6052
+ category: "ai_assistant",
6053
+ isLegitimate: true
5900
6054
  }
5901
6055
  ];
5902
6056
  var CLOUD_PROVIDER_RANGES = {
@@ -9424,6 +9578,10 @@ function getAgentDisplayName(agentType) {
9424
9578
  "01ai": "01.AI",
9425
9579
  writer: "Writer",
9426
9580
  jasper: "Jasper",
9581
+ xai: "xAI",
9582
+ deepseek: "DeepSeek",
9583
+ amazon: "Amazon",
9584
+ kya: "KYA",
9427
9585
  unknown: "Unknown"
9428
9586
  };
9429
9587
  return displayNames[agentType] || agentType;
package/dist/index.mjs CHANGED
@@ -5218,6 +5218,17 @@ var AgentTypeSchema = external_exports.enum([
5218
5218
  // Content/Writing AI
5219
5219
  "writer",
5220
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",
5221
5232
  // Unknown AI agent
5222
5233
  "unknown"
5223
5234
  ]);
@@ -5472,7 +5483,11 @@ var KNOWN_AGENT_PATTERNS = [
5472
5483
  id: "openai-chatgpt",
5473
5484
  type: "openai",
5474
5485
  name: "ChatGPT",
5475
- 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"],
5476
5491
  headers: {
5477
5492
  "X-OpenAI-Assistant": "*"
5478
5493
  },
@@ -5529,6 +5544,18 @@ var KNOWN_AGENT_PATTERNS = [
5529
5544
  // was missing, which left ~14 real Claude-User sessions on
5530
5545
  // production stamped (bot, …) instead of (ai_agent, ai_assistant).
5531
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",
5532
5559
  "claude-3",
5533
5560
  "claude-2",
5534
5561
  "claude-instant",
@@ -5596,7 +5623,13 @@ var KNOWN_AGENT_PATTERNS = [
5596
5623
  id: "perplexity-user",
5597
5624
  type: "perplexity",
5598
5625
  name: "Perplexity",
5599
- patterns: ["Perplexity-User", "Perplexity-AI"],
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"],
5600
5633
  confidence: 0.95,
5601
5634
  category: "ai_assistant",
5602
5635
  isLegitimate: true
@@ -5626,45 +5659,81 @@ var KNOWN_AGENT_PATTERNS = [
5626
5659
  category: "scraper",
5627
5660
  isLegitimate: true
5628
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
+ },
5629
5682
  {
5630
5683
  id: "google-bard",
5631
5684
  type: "google",
5632
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.
5633
5701
  patterns: [
5634
5702
  "Bard",
5635
- "Google-InspectionTool",
5636
5703
  "gemini",
5637
5704
  "gemini-pro",
5638
5705
  "gemini-1.5",
5639
5706
  "gemini-1.5-pro",
5640
5707
  "gemini-ultra",
5641
5708
  "palm",
5642
- "palm2"
5709
+ "palm2",
5710
+ "LaMDA",
5711
+ "GoogleAgent-Mariner"
5643
5712
  ],
5644
5713
  confidence: 0.9,
5645
5714
  category: "ai_assistant",
5646
5715
  isLegitimate: true
5647
5716
  },
5648
- {
5649
- // Google's "Deep Research" training/research crawler — distinct UA
5650
- // from Bard/Gemini interactive sessions. Pattern matches the
5651
- // canonical 'Gemini-Deep-Research/<version>' UA token; the broad
5652
- // 'gemini' substring in google-bard would otherwise win and stamp
5653
- // these crawler hits as ai_assistant.
5654
- id: "gemini-deep-research",
5655
- type: "google",
5656
- name: "Gemini-Deep-Research",
5657
- patterns: ["Gemini-Deep-Research", "gemini-deep-research"],
5658
- confidence: 0.95,
5659
- category: "scraper",
5660
- isLegitimate: true
5661
- },
5662
5717
  // Microsoft Copilot
5663
5718
  {
5664
5719
  id: "microsoft-copilot",
5665
5720
  type: "microsoft",
5666
5721
  name: "Microsoft Copilot",
5667
- 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
+ ],
5668
5737
  confidence: 0.9,
5669
5738
  category: "ai_assistant",
5670
5739
  isLegitimate: true
@@ -5699,7 +5768,12 @@ var KNOWN_AGENT_PATTERNS = [
5699
5768
  id: "cohere-bot",
5700
5769
  type: "cohere",
5701
5770
  name: "CohereBot",
5702
- 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"],
5703
5777
  confidence: 0.85,
5704
5778
  category: "scraper",
5705
5779
  isLegitimate: true
@@ -5872,6 +5946,86 @@ var KNOWN_AGENT_PATTERNS = [
5872
5946
  confidence: 0.8,
5873
5947
  category: "ai_assistant",
5874
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
5875
6029
  }
5876
6030
  ];
5877
6031
  var CLOUD_PROVIDER_RANGES = {
@@ -9399,6 +9553,10 @@ function getAgentDisplayName(agentType) {
9399
9553
  "01ai": "01.AI",
9400
9554
  writer: "Writer",
9401
9555
  jasper: "Jasper",
9556
+ xai: "xAI",
9557
+ deepseek: "DeepSeek",
9558
+ amazon: "Amazon",
9559
+ kya: "KYA",
9402
9560
  unknown: "Unknown"
9403
9561
  };
9404
9562
  return displayNames[agentType] || agentType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kya-os/checkpoint-shared",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Checkpoint shared types and schemas (formerly @kya-os/agentshield-shared)",
5
5
  "keywords": [
6
6
  "ai",
@@ -50,6 +50,11 @@
50
50
  "import": "./dist/canonical-signer/index.mjs",
51
51
  "require": "./dist/canonical-signer/index.js"
52
52
  },
53
+ "./beacon-types": {
54
+ "types": "./dist/beacon-types/index.d.ts",
55
+ "import": "./dist/beacon-types/index.mjs",
56
+ "require": "./dist/beacon-types/index.js"
57
+ },
53
58
  "./package.json": "./package.json"
54
59
  },
55
60
  "files": [
@@ -76,6 +81,7 @@
76
81
  "@vitest/coverage-v8": "^1.3.1",
77
82
  "rimraf": "^5.0.5",
78
83
  "tsup": "^8.0.2",
84
+ "tsx": "^4.7.0",
79
85
  "typescript": "^5.4.2",
80
86
  "vitest": "^1.3.1",
81
87
  "@kya-os/checkpoint-rules": "0.1.0"
@@ -86,9 +92,9 @@
86
92
  "sideEffects": false,
87
93
  "scripts": {
88
94
  "compile-rules": "node ../../scripts/compile-rules.js",
89
- "generate-rust": "node ../../scripts/generate-rust-rules.js",
95
+ "build:patterns": "tsx scripts/build-patterns-json.ts",
90
96
  "build-wasm": "cd ../../ && ./scripts/build-detection-engine.sh",
91
- "build": "rimraf dist && pnpm run generate-rust && tsup",
97
+ "build": "rimraf dist && pnpm run compile-rules && pnpm run build:patterns && tsup",
92
98
  "build:watch": "tsup --watch",
93
99
  "dev": "tsup --watch",
94
100
  "clean": "rimraf dist .tsbuildinfo",