You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: move payments and the firewall recommender behind subpaths
The root bundle had grown from 9,643 to 22,497 bytes — undoing most of the 65%
reduction in #21 — because payments, gateway, entitlement and firewall all
exported from the package root. Every consumer paid for them whether or not they
charged anyone, and the firewall recommender in particular is an offline
analysis tool that will never execute in middleware.
dist/index.js 22,497 -> 11,608 B (8,695 -> 4,546 gzipped)
dist/pay.js 10,861 B opt-in
dist/firewall.js 6,821 B opt-in
Entry points now:
@apideck/agent-analytics detection, classification, agentPolicy, trackVisit
@apideck/agent-analytics/verify Web Bot Auth + published IP range tables
@apideck/agent-analytics/payments 402 challenges, gateways, entitlements
@apideck/agent-analytics/firewall WAF recommendations (offline)
@apideck/agent-analytics/markdown Markdown-twin negotiation
agentPolicy stays in the root: classification without a policy to apply it to is
half a library, and it costs ~2 kB. That is why the root lands at 11.6 kB rather
than back at 9.6 kB.
README gains an entry-point table with the real numbers, and every import
example in the README, the testing guide and the site now points at the right
subpath. Verified from a clean install of the packed package that all five entry
points resolve.
Found while pulling accurate figures for the site's install section, which was
still advertising "216 tests" and "CI on Node 18, 20 and 22" — Node 18 was
dropped in 0.12 for lacking globalThis.crypto, so the site was claiming support
for a runtime the library refuses to run on. Both corrected.
Copy file name to clipboardExpand all lines: package.json
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"name": "@apideck/agent-analytics",
3
3
"version": "0.15.0",
4
-
"description": "Track AI agent and bot traffic to your Next.js / Vercel app — PostHog, webhooks, or any custom analytics backend. Detects Claude, ChatGPT, Perplexity, Google-Extended, and more.",
4
+
"description": "Track AI agent and bot traffic to your Next.js / Vercel app \u2014 PostHog, webhooks, or any custom analytics backend. Detects Claude, ChatGPT, Perplexity, Google-Extended, and more.",
0 commit comments