diff --git a/CHANGELOG.md b/CHANGELOG.md index 20fd982..ffc03d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,11 +15,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - New exports: `AgentVerifier`, `createAgentVerifier`, `DirectoryCache`, `DEFAULT_SIGNED_AGENT_DIRECTORIES`, and types `AgentVerdict`, `AgentStatus`, `AgentCategory`, `WebBotAuthConfig`, `AgentVerifierOptions`, `SignedAgentDirectory`. - Doc: "Verify AI agents with Web Bot Auth in Next.js" (`docs/verify-ai-agents-web-bot-auth.md`). +## [0.10.0] - 2026-07-31 + +### Added +- **Honeytoken injection for Fastify.** Express and Next.js gained this in 0.8.x; + Fastify still generated a token and left you to place the link. The plugin now + injects a hidden trap link into HTML replies and arms the tripwire it points at. + - On by default when `apiKey` is set; `honeytoken: false` opts out. + - Injected in an `onSend` hook, so only full `text/html` replies are rewritten + and Fastify recomputes `Content-Length`. + - The token is derived from the API key, so every replica advertises and arms + the same path. + - **Streamed replies are not rewritten** — buffering a stream to insert an + anchor would discard the streaming behaviour the app asked for. The plugin + logs a warning once per process with the markup to embed manually, so the + gap is visible rather than silent. + ## [0.9.0] - 2026-07-31 ### Added - **Bot classification in the request path** — rules can now act on who the - User-Agent says it is, which the AI-scraper docs described but nothing could do. + User-Agent says it is, synchronously and with no network call. - `bots()` rule: `bots({ categories: ['training_crawler'] })`, `bots({ ai: true, allow: ['perplexitybot'] })`, `bots({ agents: ['gptbot', 'ClaudeBot'], action: 'THROTTLE' })`. @@ -28,8 +44,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - New exports: `bots`, `BotRule`, `matchUserAgent`, `classifyUserAgent`, `BOT_REGISTRY`, `BOT_CATEGORIES`, and types `BotVerdict`, `BotAgent`, `BotCategory`, `BotRuleConfig`. - - 168 agents generated from the Go registry, matched locally with no network - call. Category names match the dashboard's `ai_scraper_category` column. + - 168 known agents, matched locally. Category names match the + `ai_scraper_category` values shown in your dashboard. - `ai: true` covers training crawlers, AI search crawlers, AI agents and AI assistants. It excludes `search_crawler` — blocking Googlebot would deindex your site. diff --git a/packages/client/package.json b/packages/client/package.json index 2000654..f0bcba4 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@webdecoy/client", - "version": "0.9.0", + "version": "0.10.0", "description": "Web Decoy browser widget - signal collection, proof-of-work, and captcha UI", "main": "./dist/index.js", "module": "./dist/index.mjs", diff --git a/packages/client/src/clearance-behavior.test.ts b/packages/client/src/clearance-behavior.test.ts index e5ede7c..aa7b6c8 100644 --- a/packages/client/src/clearance-behavior.test.ts +++ b/packages/client/src/clearance-behavior.test.ts @@ -1,7 +1,7 @@ /** * @jest-environment jsdom * - * Locks the behavioral-clearance contract (app repo #328, PRD FR10): what may + * Locks the behavioral-clearance contract : what may * leave the browser, when a session is summarized at all, and that scripted * input produces measurably different aggregates than a human hand. */ diff --git a/packages/client/src/clearance-behavior.ts b/packages/client/src/clearance-behavior.ts index 16f0a70..0c97a35 100644 --- a/packages/client/src/clearance-behavior.ts +++ b/packages/client/src/clearance-behavior.ts @@ -1,5 +1,5 @@ /** - * Behavioral human-likelihood for clearance minting (app repo #328, PRD FR10). + * Behavioral human-likelihood for clearance minting . * * A wd_clearance token normally says only "this is a real browser that hasn't * tripped deception". This module lets a session also present POSITIVE evidence diff --git a/packages/client/src/clearance.test.ts b/packages/client/src/clearance.test.ts index 19e8741..573c21d 100644 --- a/packages/client/src/clearance.test.ts +++ b/packages/client/src/clearance.test.ts @@ -1,7 +1,7 @@ /** * @jest-environment jsdom * - * Locks the wd_clearance device-fp contract (#128). The fp is the deny-list key, + * Locks the wd_clearance device-fp contract. The fp is the deny-list key, * so its exact composition MUST stay byte-identical to the edge challenge page * (app repo: edge/clearance-worker). This test pins the canonical string, a golden * hash the worker can cross-assert, and the no-canvas/WebGL guarantee. diff --git a/packages/client/src/clearance.ts b/packages/client/src/clearance.ts index 291034a..c0dfb56 100644 --- a/packages/client/src/clearance.ts +++ b/packages/client/src/clearance.ts @@ -90,7 +90,7 @@ interface MintResponse { /** Call the public issuance endpoint. Returns null on any failure (fail open). * `behavior`, when present, carries the session's interaction aggregates and - * can earn the token a graded 'human-likely' trust level (#328). */ + * can earn the token a graded 'human-likely' trust level. */ async function mint( ingestUrl: string, siteKey: string, @@ -156,7 +156,7 @@ export interface ClearanceOptions { scope?: string; /** * Collect interaction aggregates and upgrade the token to a graded - * 'human-likely' trust level once the visitor actually interacts (#328). + * 'human-likely' trust level once the visitor actually interacts. * Default true. Set false to mint clean tokens only — routes that require a * minimum trust level will then always challenge. * diff --git a/packages/client/src/global.ts b/packages/client/src/global.ts index 914851e..178e723 100644 --- a/packages/client/src/global.ts +++ b/packages/client/src/global.ts @@ -3,7 +3,7 @@ * * Exposes `window.WebDecoyCaptcha`, auto-initializes any `[data-webdecoy]` * elements, and — given a `data-site-key` on the script tag — silently mints a - * wd_clearance cookie for real browsers (closes the #124 decoy → deny loop in + * wd_clearance cookie for real browsers (closes the decoy → deny loop in * monitor/allow-and-observe mode). Deferred to idle; no page-load cost. * *