Skip to content

passiveintent/core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PassiveIntent — Monorepo

License: AGPL-3.0-only TypeScript CLA assistant npm @passiveintent/core Bundle size CodeRabbit Pull Request Reviews npm @passiveintent/react Bundle size npm @passiveintent/remix Bundle size Open Vanilla JS demo in StackBlitz Open React demo in StackBlitz

Website: passiveintent.dev

This repository is structured as an npm workspaces monorepo containing all PassiveIntent packages.


Packages

Package Version Description
@passiveintent/core npm Privacy-first, on-device behavioral intent engine
@passiveintent/react npm React 18+ hook wrapper for @passiveintent/core
@passiveintent/remix npm Remix / Shopify Hydrogen adapter — SSR-safe dual entry points + clientLoader utils

Full documentation for each package lives inside the package directory:


Repository layout

.
├── package.json               # monorepo root — npm workspaces
├── package-lock.json
├── tsconfig.base.json         # shared TypeScript base config
├── .prettierrc
├── .prettierignore
├── .editorconfig
├── .gitignore
├── coderabbit.yaml
├── BINARY_CODEC_SPEC.md
├── CALIBRATION_GUIDE.md
├── CHANGELOG.md
├── CONTRIBUTING.md
├── FUTURE_FEATURES.md
├── LICENSE
├── PRICING.md
├── PUBLISHING.md
├── README.md
├── SECURITY.md
├── .github/
│   ├── CODEOWNERS
│   ├── FUNDING.yml
│   ├── PULL_REQUEST_TEMPLATE.md
│   ├── ISSUE_TEMPLATE/
│   └── workflows/
│       ├── ci.root.yml        # format:check (all packages)
│       ├── ci.core.yml        # build / test / perf for @passiveintent/core
│       ├── ci.react.yml       # build / test for @passiveintent/react
│       ├── ci.remix.yml       # build / test for @passiveintent/remix
│       ├── release-gate.yml   # full pre-release validation gates
│       └── perf-matrix.core.yml
├── demo/                      # vanilla JS demo app
├── demo-react/                # React demo app
├── landing/                   # landing page (passiveintent.dev)
└── packages/
    ├── core/                  # published as @passiveintent/core
    ├── react/                 # published as @passiveintent/react
    └── remix/                 # published as @passiveintent/remix

Root scripts

Script Description
npm run build Build all packages
npm run typecheck Type-check all packages
npm run test Test all packages
npm run format Format all files with Prettier
npm run format:check Check formatting (CI)

Run workspaces individually to target a single package:

npm run build --workspace=@passiveintent/core
npm run test  --workspace=@passiveintent/core

🎯 The Enterprise Calibration Engine

Generic intent libraries ship with hardcoded thresholds tuned on someone else's data. A fixed logLikelihood < -2.0 cutoff that works on a DTC checkout funnel is noise on a B2B SaaS dashboard — and an alert storm on a high-traffic media site.

PassiveIntent's statistical model is different. It normalizes every anomaly score against your site's own observed log-likelihood distribution, computed from real production sessions:

$$Z = \frac{LL_{observed} - \mu_{your,site}}{\sigma_{your,site}}$$

A Z-score of -2.0 means the same thing on every deployment: two standard deviations below your site's own normal. An enterprise SaaS with low behavioral variance and a media site with high variance both produce reliable, low-false-positive signals — without you touching a single threshold.

The calibration system rests on three pillars:

Pillar What it solves
Domain Baseline Trains the Markov model on your site's unique navigation topology (linear funnel vs. cyclical dashboard).
Statistical Calibration Extracts your site's baselineMeanLL and baselineStdLL so Z-score thresholds are portable across any traffic profile.
Intervention Mapping Wires mathematical anomalies to concrete, timed business actions — chat escalation, discount triggers, prefetch hints.

→ Read the full guide: CALIBRATION_GUIDE.md


🔒 Enterprise-Grade Privacy & Security

PassiveIntent flips the traditional analytics threat model. By executing entirely in the browser, it provides Zero Egress behavioral tracking.

  • Zero Network Egress: The engine does not make HTTP requests. Behavioral data never leaves the user's device, making Man-in-the-Middle (MitM) interception impossible.
  • Cryptographic Irreversibility: We do not store browsing history. State visits are hashed into a fixed-size Bloom Filter using FNV-1a. Even if a host application suffers an XSS attack, the stolen memory payload cannot be reverse-engineered into a list of visited URLs.
  • PII Eradication: The native RouteNormalizer aggressively strips UUIDs, MongoDB ObjectIDs, and query strings before any math occurs, ensuring no Personally Identifiable Information ever enters the Markov matrix.
  • GDPR & CCPA Safe: Because no PII is stored and no data is transmitted to third-party servers, PassiveIntent operates entirely outside the scope of traditional cookie-consent and data-processing liabilities.

Contributing

See CONTRIBUTING.md for guidelines and SECURITY.md for security disclosures.


License

PassiveIntent is dual-licensed — see LICENSE and PRICING.md for details.

About

PassiveIntent is a ~11 kB gzip, zero-egress intent engine that detects user hesitation and frustration in real-time. Catch rage-clicks, prevent checkout abandonment, and trigger personalized UI interventions in < 2ms all entirely within the browser.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors