@agentstats/sdk 0.5.0 → 0.5.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/README.md CHANGED
@@ -44,6 +44,16 @@ No WebMCP tools? `lite.js` (~1.7 KB) records visitors only, and `AgentStats.trac
44
44
  | `custom` | anything you send with `AgentStats.track('checkout_completed', { value: 42 })` |
45
45
  | pageviews (Visitors) | each page a person views, including client-side navigation; `track()` events count as goals. Sent to `/api/ingest/web` without cookies; the server keeps no IP or user agent |
46
46
 
47
+ ## The bot catalogue
48
+
49
+ `@agentstats/sdk/bots` is the catalogue behind `detectBot()`, for code that classifies user agents itself, such as a log pipeline: `BOT_PATTERNS` (the hand-checked `CURATED` list, then the generic `CATCH_ALL` patterns), `BOT_PRODUCTS`, `firstMatch(patterns, userAgent)`, `classifyUserAgent()`, `classifyReferral()` and the AI categories.
50
+
51
+ ```ts
52
+ import { BOT_PATTERNS, firstMatch } from '@agentstats/sdk/bots'
53
+
54
+ firstMatch(BOT_PATTERNS, userAgent) // { product: 'chatgpt', category: 'training', … } or null
55
+ ```
56
+
47
57
  ## Options
48
58
 
49
59
  ```ts