@valiron/crawler-protection 0.8.0 → 0.8.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/CHANGELOG.md +5 -0
- package/README.md +8 -8
- package/dist/activation.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.1 (2026-11-24)
|
|
4
|
+
|
|
5
|
+
- The monthly allowance error now reads "Monthly Crawler Protection request limit exhausted" (was "bot protection"). The error class and code are unchanged.
|
|
6
|
+
- README uses the dashboard's current names: traffic insights, Self-hosted → Controls, and dollar pricing.
|
|
7
|
+
|
|
3
8
|
## 0.8.0 (2026-11-23)
|
|
4
9
|
|
|
5
10
|
- Add the `@valiron/crawler-protection/request-log` subpath export, so the request logger can be imported without the rest of the runtime (for example in Next.js `proxy.ts`).
|
package/README.md
CHANGED
|
@@ -22,9 +22,9 @@ Implemented:
|
|
|
22
22
|
|
|
23
23
|
This is an origin admission library, not a complete bot detector. A matching user-agent and source network establish provenance, not human identity or proven crawler intent. Meta classes can use verified AWS WAF evidence over a protected ingress path; no Meta CIDR/ASN verifier is assumed. Cloudflare Bot Management is a second opt-in `trusted_waf` source through `createCloudflareWafEvidence`: it maps configured `cf.verified_bot_category` values to crawler classes only across an attested edge-to-origin path where viewer-supplied `cf-verified-bot-category` headers are rejected before the trusted value is inserted, and it intentionally leaves `provider` unset because Cloudflare attests the category, not the operator identity. Header spoofing without a network match does not receive verified allowances.
|
|
24
24
|
|
|
25
|
-
##
|
|
25
|
+
## Traffic insights request log (no runtime required)
|
|
26
26
|
|
|
27
|
-
For Valiron's read-only
|
|
27
|
+
For Valiron's read-only traffic insights (Pro) on sites that cannot share CDN, WAF or server logs. Requires 0.8.0+. `createCrawlerRequestLog` records request metadata after each response finishes and uploads it in the background. It never blocks, delays or changes a request, and it does not need Redis, an operator API key or account activation. Create an **SDK request log** connection in Dashboard → Crawler Protection → Connect traffic for the endpoint and `vcl_` token.
|
|
28
28
|
|
|
29
29
|
```typescript
|
|
30
30
|
import { createCrawlerRequestLog } from '@valiron/crawler-protection';
|
|
@@ -103,7 +103,7 @@ pnpm test:crawlers:service
|
|
|
103
103
|
|
|
104
104
|
The Redis and service tests start temporary Redis processes and loopback Python/SQLite origins with generated fixture credentials. `redis-server` and Python 3 must be installed. External verification-feed egress is disabled in service lifecycle fixtures; no customer URLs or production databases are used. The Python unit suite uses local HTTP fixtures only for deliberate authentication/error/redirect cases. The package is distributed through npm as `@valiron/crawler-protection`.
|
|
105
105
|
|
|
106
|
-
Website availability:
|
|
106
|
+
Website availability: traffic insights and setup with **Pro**; runtime and edge enforcement with the **Crawler Protection add-on** ($29.99/month on top of Pro) or **Enterprise**, within each plan’s usage allowance. Dashboard → Crawler Protection offers authenticated configuration validation/export and integration guidance. Optional `createCrawlerTelemetry` reporting adds hosted rolling origin analytics, shared capacity, instance status and dashboard monitoring alerts. It does not deploy customer infrastructure. Optional 0.7.0+ managed controls support dashboard publishing/rollback within installed ceilings, bounded opt-in decision logs and separately configured email/webhook alerts. See the public integration guide for telemetry setup, retention and measurement limits.
|
|
107
107
|
|
|
108
108
|
## Release CI coverage
|
|
109
109
|
|
|
@@ -312,7 +312,7 @@ Directory data attribution: Verified Bots Directory by Mayank Gupta (https://ver
|
|
|
312
312
|
|
|
313
313
|
Monthly bot quotas require Crawler SDK 0.3.0 or later. Upgrade existing 0.2.x deployments to use Free accounts and hosted per-request quota admission. Earlier public SDK versions are not retroactively metered.
|
|
314
314
|
|
|
315
|
-
Free includes 10,000 protected HTTP requests per UTC calendar month; Pro ($149/month) includes 100,000. The
|
|
315
|
+
Free includes 10,000 protected HTTP requests per UTC calendar month; Pro ($149/month) includes 100,000. The Crawler Protection allowance is independent from agent access and shared across an account's API keys, sites and replicas. Local access/rate denials run before hosted quota admission and do not consume the allowance. Once hosted admission succeeds, the request is counted even if a later work-capacity check fails. Quota exhaustion returns HTTP 429; an unavailable usage check fails closed with 503. This adds a hosted round trip before protected origin work. Pro can enable additional Crawler Protection calls at $0.001 each after explicit price acceptance; Free remains capped at 10,000. Unconfigured or inactive usage billing retains the 100,000 Pro cap. Enterprise: email founders@valiron.co.
|
|
316
316
|
|
|
317
317
|
## Security compatibility and admission recovery
|
|
318
318
|
|
|
@@ -348,7 +348,7 @@ Trust boundaries, deliberately stricter than the draft minimum:
|
|
|
348
348
|
|
|
349
349
|
## Request usage
|
|
350
350
|
|
|
351
|
-
[Dashboard → Usage](https://www.valiron.co/dashboard/usage) shows account-wide monthly crawler requests, remaining allowance, additional calls and estimated request-overage charges. It refreshes every 15 seconds while visible. Free includes 10,000; Pro includes 100,000 and separately opted-in additional requests at 0.001 each
|
|
351
|
+
[Dashboard → Usage](https://www.valiron.co/dashboard/usage) shows account-wide monthly crawler requests, remaining allowance, additional calls and estimated request-overage charges. It refreshes every 15 seconds while visible. Free includes 10,000; Pro includes 100,000 and separately opted-in additional requests at $0.001 each. Middleware has a separate allowance and opt-in. Traffic charts come from optional runtime telemetry; billing counts come from hosted admission.
|
|
352
352
|
|
|
353
353
|
## Upgrade to 0.6.0
|
|
354
354
|
|
|
@@ -368,7 +368,7 @@ CRAWLER_SITE_ID=storefront
|
|
|
368
368
|
CRAWLER_MANAGED_CONTROLS=true
|
|
369
369
|
```
|
|
370
370
|
|
|
371
|
-
Use the same site ID for controls and telemetry. Continue `CRAWLER_TELEMETRY_URL` reporting for aggregate analytics and traffic alerts. On first successful control report, the installation registers with its current crawler access and mode, preserving a partial `enforceGroups` rollout. Selecting a new mode in
|
|
371
|
+
Use the same site ID for controls and telemetry. Continue `CRAWLER_TELEMETRY_URL` reporting for aggregate analytics and traffic alerts. On first successful control report, the installation registers with its current crawler access and mode, preserving a partial `enforceGroups` rollout. Selecting a new mode in Controls applies that mode to all configured route groups. Decision logging and outbound alerts start disabled. All instances sharing a site must use the same base configuration. Managed registration accepts at most 64 KiB of compact configuration JSON, 16 sites per account and 64 runtime instances per site in 24 hours.
|
|
372
372
|
|
|
373
373
|
### Connect Node middleware
|
|
374
374
|
|
|
@@ -395,7 +395,7 @@ The control client uses its fixed hosted endpoint by default. An optional `endpo
|
|
|
395
395
|
|
|
396
396
|
### Choose access and budgets
|
|
397
397
|
|
|
398
|
-
Open **Crawler Protection →
|
|
398
|
+
Open **Crawler Protection → Self-hosted → Controls**, select a registered site, edit and **Publish changes**:
|
|
399
399
|
|
|
400
400
|
- Choose **Allow within limits** or **Block** for each installed crawler class and route group. Search, user fetches and training are separate identities. Allowing a class still requires its configured verifier and available budget; it does not grant every browser identifying itself as that service access.
|
|
401
401
|
- Set the fallback for other verified crawlers. Unverified traffic has a separate control: it includes ordinary anonymous visitors, so blocking it can block people. Independently authenticated shopper/checkout grants retain their own lanes.
|
|
@@ -414,7 +414,7 @@ Changing routes, source candidates, work ceilings or the base configuration requ
|
|
|
414
414
|
|
|
415
415
|
### Inspect recent decisions
|
|
416
416
|
|
|
417
|
-
**Decision logs** is separately enabled in
|
|
417
|
+
**Decision logs** is separately enabled in Controls. It retains up to 1,000 decisions per site for 24 hours, with source/class, route group, action, reason, verification state, runtime time, server receipt time and generated event ID. No raw IPs, URLs, user agents, credentials or caller-supplied request identifiers are collected by this log buffer. These coarse dimensions can still be business-sensitive; access is account scoped.
|
|
418
418
|
|
|
419
419
|
Each process buffers up to 1,000 events, uploads at most 100 per control report, and drops new events when full. Retry event IDs are deduplicated in storage. This is a bounded recent sample, not a complete audit archive. The dashboard shows runtime drop indications; aggregate Traffic & analytics remains the source of reported totals. Filter by source, route or decision and export the matching rows. Disabling logging clears retained events and buffers once runtimes receive the update. Runtime clocks can differ; server receipt time controls retention.
|
|
420
420
|
|
package/dist/activation.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.activateCrawlerProtection = activateCrawlerProtection;
|
|
|
8
8
|
/** Account activation and authoritative per-request monthly admission. */
|
|
9
9
|
exports.CRAWLER_ACTIVATION_ENDPOINT = 'https://valiron-edge-proxy.onrender.com/operator/crawlers/activation';
|
|
10
10
|
class CrawlerMonthlyLimitError extends Error {
|
|
11
|
-
constructor() { super('Monthly
|
|
11
|
+
constructor() { super('Monthly Crawler Protection request limit exhausted'); }
|
|
12
12
|
}
|
|
13
13
|
exports.CrawlerMonthlyLimitError = CrawlerMonthlyLimitError;
|
|
14
14
|
const activations = new WeakMap();
|
package/package.json
CHANGED