New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

webblackbox

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webblackbox

Browser-side lite capture SDK for recording, exporting, and embedding WebBlackbox sessions.

latest
Source
npmnpm
Version
0.4.0
Version published
Maintainers
1
Created
Source

WebBlackbox

webblackbox

Browser-side lite capture SDK — record, export, and embed WebBlackbox sessions in any web app.

npm version License WebBlackbox

The browser-side lite capture SDK for WebBlackbox. Embed session recording directly in your web application — no Chrome extension required. Captures user interactions, console logs, network requests, DOM mutations, storage operations, screenshots, and more, then exports portable .webblackbox archives compatible with the full WebBlackbox Player.

Installation

npm install webblackbox

Quick Start

import { WebBlackboxLiteSdk } from "webblackbox/lite-sdk";

const sdk = new WebBlackboxLiteSdk({
  showIndicator: true,
  storage: "memory"
});

await sdk.start();

// ... user interacts with the page ...

const exported = await sdk.export({ stopCapture: true });
sdk.downloadArchive(exported);
await sdk.dispose();

What's Included

ExportDescription
WebBlackboxLiteSdkMain SDK class — start/stop/flush/export .webblackbox archives in-page
LiteCaptureAgentReusable capture agent for input, DOM/storage snapshots, screenshots, and injected bridge
installInjectedLiteCaptureHooksRuntime hooks for console/network/storage/error interception
materializeLiteRawEventShared lite raw-event materialization pipeline

Entry Points

import { WebBlackboxLiteSdk } from "webblackbox/lite-sdk";
import { LiteCaptureAgent } from "webblackbox/lite-capture-agent";
import { installInjectedLiteCaptureHooks } from "webblackbox/injected-hooks";
import { materializeLiteRawEvent } from "webblackbox/lite-materializer";

Optional IndexedDB Cache Encryption

When using storage: "indexeddb", you can provide pipelineStorageEncryptionKey to encrypt cached chunk/blob payload bytes at rest.

import { derivePipelineStorageKey } from "@webblackbox/pipeline";
import { WebBlackboxLiteSdk } from "webblackbox/lite-sdk";

const derived = await derivePipelineStorageKey("cache-passphrase");

const sdk = new WebBlackboxLiteSdk({
  storage: "indexeddb",
  pipelineStorageEncryptionKey: derived.key
});

Persist derived.salt + derived.iterations using your own key-management policy if you need to reopen the same encrypted cache.

Default Safety Tuning

WebBlackboxLiteSdk applies lite-focused runtime defaults to reduce long-session freezes and archive bloat:

SettingDefaultWhy
freezeOnErrortrueCapture uncaught JS exceptions/rejections
freezeOnNetworkFailurefalseAvoid noisy freezes from transient network issues
freezeOnLongTaskSpikefalseAvoid freezes from expected long tasks
mousemoveHz14Lower frequency than full mode (20 Hz)
scrollHz10Lower frequency than full mode (15 Hz)
domFlushMs160Longer flush interval than full mode (100 ms)
bodyCaptureMaxBytes0Disabled — keeps lite sessions page-thread friendly

Override any of these through options.config.

Export Policy Defaults

SettingDefault
includeScreenshotstrue
maxArchiveBytes100 MB
recentWindowMs20 minutes

Extension Reuse

The Chrome extension (apps/extension) reuses this package in lite capture mode:

  • Content scriptwebblackbox/lite-capture-agent
  • Injected scriptwebblackbox/injected-hooks

This keeps capture logic centralized and shared across the SDK and extension lite mode.

Testing

# Unit & integration tests
pnpm --filter webblackbox test

# End-to-end full-chain verification (extension → export → player)
pnpm --filter @webblackbox/extension e2e:fullchain:lite
pnpm --filter @webblackbox/extension e2e:fullchain:lite:reload
pnpm --filter @webblackbox/extension e2e:fullchain:full

License

MIT

Keywords

webblackbox-sdk

FAQs

Package last updated on 24 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts