mirror of
https://github.com/citeworthyio/seo-agent.git
synced 2026-08-11 13:22:39 +02:00
A fourth kind, `search`, for a human arriving from a search engine, so a self-hoster with a bound TELEMETRY D1 can see which engines send them traffic. SEARCH_REFERRER_RE matches the referrer HOSTNAME, anchored both ends, so google.com matches and gemini.google.com cannot; Google ccTLDs are matched structurally rather than enumerated. The AI check runs first as an else-if and now matches the HOSTNAME too. Before this it tested the full referrer URL, so a Google search whose query string mentioned an AI product — /search?q=is+claude.ai+good — was recorded as an AI referral, inflating the one number this tap exists to measure and storing a row whose kind and host contradicted each other. Anyone could mint AI referrals with a crafted Referer. Same-site referrers are no longer classified at all; duck.ai added to the AI list; the readers that enumerate kinds (analytics, dashboard, telemetry, mcp) learned the new one — analytics.ts would otherwise have silently dropped it. Host-only is now stated as a privacy guarantee in the header and schema, with a test that a referrer carrying a query string and fragment records only the host. The docs no longer overclaim: an AI surface answering from a search engine's own host (Google AI Mode, Bing Copilot, DDG and Kagi assistants) is counted as search, so `referral` is a floor on AI traffic, not a total. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1001 B
1001 B
title, type, permalink, tags, source_paths, source_paths_inferred, source_sha, created, updated, reviewed, reviewed_by
| title | type | permalink | tags | source_paths | source_paths_inferred | source_sha | created | updated | reviewed | reviewed_by | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Cloudflare Workers Stack | note | seo-agent/architecture/cloudflare-workers-stack |
|
|
false | cd64ffc736 |
2026-07-31 | 2026-07-31 | 2026-07-31 | audit:claude-haiku-4-5 |
Observations
- [requirement] Requires Cloudflare Workers Paid plan for queues; D1 (SQLite), KV namespace, Workers Queues, Workers AI, and HTMLRewriter for crawling #cloudflare
- [stack] TypeScript 5.8+, Wrangler 4.45+, Vitest 4.1.10 for testing. Main export points to
src/lib.ts(v1.8.0+);/workerexport accessessrc/index.ts#typescript - [deployment] All resources created via wrangler CLI:
wrangler d1 create seo-agent-db,wrangler kv namespace create SEO_OVERRIDES,wrangler queues create seo-agent-drafts#deployment
Relations
- depends_on Core Pipeline Architecture
- supports Design Principles & Safety