Create a BBAS manager with optional scoring, rule, storage, and license configuration.
When a license key is supplied the constructor optimistically uses the paid-tier history depth until init validates the key. If validation fails, the instance falls back to the free-tier limits.
Optional runtime configuration.
Options accepted by the BbasManager constructor.
OptionalblockThreshold?: numberBot score threshold at which requests are blocked.
Default: 75.
OptionalchallengeThreshold?: numberBot score threshold at which requests are challenged.
Default: 50.
OptionalenableBehavioralAnalysis?: booleanEnable advanced behavioral biometrics analysis (mouse/typing dynamics).
Session-level behavioral heuristics still run when metrics are present.
Advanced analysis requires Pro or Enterprise. Default: true.
OptionalenableCrossPlugin?: booleanEnable cross-plugin signal enrichment from ip-devicer, tls-devicer, and
peer-devicer. Requires Pro or Enterprise license. Default: true.
OptionalenableUaAnalysis?: booleanEnable user-agent analysis. Default: true.
OptionalenableVelocity?: booleanEnable request velocity tracking. Default: true.
OptionallicenseKey?: stringPolar license key that unlocks Pro or Enterprise tier features.
| Tier | Price | Device limit | Servers |
|---|---|---|---|
| Free | $0/mo | 10,000 | — |
| Pro | $49/mo | Unlimited | 1 server |
| Enterprise | $299/mo | Unlimited | Unlimited |
Cross-plugin signal enrichment (enableCrossPlugin) requires Pro or
Enterprise. Obtain a key at https://polar.sh.
OptionalmaxHistoryPerDevice?: numberMaximum number of BBAS snapshots stored per device.
Default: 50 (Pro/Enterprise) or 10 (free tier).
OptionalmaxRequestsPerWindow?: numberMaximum allowed requests per velocityWindowMs before the velocity
signal fires. Default: 120.
Optionalrules?: BbasRule[]Custom rules to merge with the default rule set. Custom rules are
evaluated before default rules when their priority is < 100.
See BbasRule.
Optionalstorage?: BbasStorage | AsyncBbasStorageCustom storage backend. Defaults to the built-in in-memory store.
Use createSqliteBbasStorage, createPostgresBbasStorage, or
createRedisBbasStorage for persistent backends.
OptionalvelocityWindowMs?: numberLength of the request velocity sliding window in milliseconds.
Default: 60_000 (1 minute).
Active license tier. Resolves to 'free' until init completes.
Analyse a request for bot signals and return the enrichment + decision.
Call this directly or let registerWith call it automatically via
the DeviceManager post-processor pipeline.
The deviceId resolved by fp-devicer.
Request context (IP, headers, userId).
OptionalcrossPlugin: CrossPluginSignalsPre-extracted cross-plugin signals (optional; populated automatically in the post-processor path).
OptionalbehavioralMetrics: BehavioralMetricsRelease storage connections.
Return the stored BBAS snapshot history for a device.
Optionallimit: numberInitialise the manager and validate the Polar license key if supplied.
Call once at application startup. Safe to await multiple times —
subsequent calls return the cached promise.
Register this BbasManager as a DeviceManager post-processor plugin.
Plugin ordering matters. Register ip-devicer, tls-devicer, and
peer-devicer before calling this method so that their signals are
available in result.enrichmentInfo.details when bbas-devicer runs.
BbasManager — bot blocking and anti-scrape plugin for the FP-Devicer Suite.
Computes a
botScore(0–100) from three signal tiers:A configurable rule engine translates the score into a BotDecision (
allow | challenge | block).Integration