Target release: @codedeb/vitals-intelligence@0.1.0 passed isolated ESM installation and TypeScript consumer checks; public npm availability has not yet been independently verified.
Real-user Core Web Vitals diagnostics — intended for developers building reliable storefronts, search infrastructure and production applications. Unlike a hosted platform, the SDK does not require a Code Deb account for its pure functions.
Build, test and stage
npm ci
npm run test:nepal-sdks
npm run sdk:pack:verify
node scripts/sdk/stage-npm-package.mjs sdk-vitals-intelligence
These commands prepare the candidate without publishing it. Review the generated .sdk-artifacts/npm-stage/sdk-vitals-intelligence contents and all licenses. After a successful, independently verified npm release, the installation command will be npm install @codedeb/vitals-intelligence. Do not advertise this command as publicly working before release verification.
Quickstart using implemented exports
import {summarizeVitals} from '@codedeb/vitals-intelligence';
console.log(summarizeVitals([{name:'INP',value:180,route:'/shop'}],{minSamples:1}));
Public API contract
| Entry point or function | Responsibility |
|---|---|
classifyVital(name,value) | Classify LCP/INP/CLS against documented good thresholds |
percentile(values,fraction) | Compute deterministic p75/other quantiles |
summarizeVitals(records,options) | Group routes, apply privacy sample floors and calculate p75 |
compareVitalsReleases(before,after) | Flag performance regressions by release cohort |
attachWebVitals(adapter) | Subscribe to the official web-vitals callback interface with sampling |
Production integration
Provide the official web-vitals browser measurement adapter and backend collection endpoint. Avoid full URLs with personal identifiers; store only route templates and useful cohorts. Threshold interpretation does not guarantee rankings.
The published SDK must have bounded resource use, correct authentication boundaries where applicable, and tests for malformed input. Caller-owned storage, OAuth, background jobs or hosted services must be configured explicitly rather than invented by the library.
Compatibility and release history
- 0.1.0 candidate — 21 November 2026: First implementation of the documented independent module, subject to the complete release gate.
- JavaScript ESM with generated TypeScript declarations; Node.js 20+ for Node execution.
- No npm publication, hosted API, SLA, vendor certification, ranking guarantee or customer data access is implied by this candidate.
- Code Deb-owned package code is intended for Apache-2.0 distribution. Third-party dependencies, data and trademarks retain their own terms.
References and related SDKs
Implementation workflow
- Collect genuine browser LCP, INP and CLS measurements by route.
- Aggregate percentiles only when the required sample floor is met.
- Compare matching cohorts across releases and device classes.
- Keep anonymized telemetry in a backend storage service you control.
Registry verification and installation
npm view @codedeb/vitals-intelligence@0.1.0 version
# Install when the target release is listed and its tarball is retrievable:
npm install @codedeb/vitals-intelligence@0.1.0
A valid local package is not automatically a live npm release. A verified publication must expose version metadata, a current dist-tag and a public tarball. Keep installation versions pinned and check the included distribution license.
Production acceptance criteria
- Verify normal, corrupted, missing and boundary inputs with the actual package exports.
- Keep any secrets, authorization and persistent state in application-owned server adapters.
- Record explicit classifications, retry outcomes or regression evidence without turning unknown into verified.
- Audit access limits, failure handling and operational monitoring independently of the SDK.
Troubleshooting
Registry 404: Confirm the intended version on npm, and do not assume publication from local test output. Unexpected classification or diff: Review the original evidence fields and source data. External processing problem: Inspect your event store, browser runner, authenticated client or queue; the SDK is a library, not a hosted processing service.
Related SDKs
launch guard · render diff · Developer SDKs · Technical resources