Files
skills/plugins/document-navigator/docs/foundation/bitpacker/bitpacker-network/README.md
admin 9bf56a806b Move docs/ package mirror into document-navigator plugin
Relocate the ~6k-file docs tree from the repo root into
plugins/document-navigator/docs/ so the plugin is self-contained and
portable. docs/superpowers/ (specs and plans) stays at the repo root.

Moved via cp+rm rather than git mv because directory rename() fails with
EPERM on this WSL /mnt DrvFs mount; git rename-detection pairs the
identical-content files at commit time.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 01:10:00 +01:00

9.8 KiB

@suaveplan/bitpacker-network - Bitpacker network plugin

Summary

Network simulation utilities for testing bitpacker under realistic network conditions.

Documentation tree

  • defaults — (no submodules)
    • default-clock — defaultClock is the single allow-listed wall-clock source in @suaveplan/bitpacker-network. The determin…
    • default-rng — defaultRng is the canonical CSPRNG-backed Rng factory used by NetworkSimulator and any other deterministic-when-a…
    • defaults — (no submodules)
  • otel — (no submodules)
  • register-schemas — Idempotent integration with @suaveplan/schema-registry for the @suaveplan/bitpacker-network package. Exposes `regis…
    • register-schemas — Idempotent integration with @suaveplan/schema-registry for the @suaveplan/bitpacker-network package. Exposes `regis…
  • simulator — (no submodules) - simulator.schema — Zod schema for `NetworkSimulator…
    • simulator — (no submodules) - simulator.schema — Zod schema for `NetworkSimulator…
    • simulator.schema — Zod schema for NetworkSimulatorConstructorOptions, the constructor bundle for NetworkSimulator and `createNetworkSi…
  • types — (no submodules) - types.schema — Zod schema for `NetworkSimulationOpt…
    • types — (no submodules) - types.schema — Zod schema for `NetworkSimulationOpt…
    • types.schema — Zod schema for NetworkSimulationOptions, the configuration accepted by NetworkSimulator's constructor and `setOptio…
  • index — Path: bitpacker-network/src/index.ts Export: See source for details.
- [default-clock](./src/defaults/default-clock.md) — `defaultClock` is the **single allow-listed wall-clock source** in `@suaveplan/bitpacker-network`. The determin…
  • default-rng — defaultRng is the canonical CSPRNG-backed Rng factory used by NetworkSimulator and any other deterministic-when-a…
  • defaults — (no submodules)- otel — (no submodules)- instruments — (no submodules)- simulator — (no submodules)- simulator.schema — Zod schema for `NetworkSimulator…
  • simulator — (no submodules)- simulator.schema — Zod schema for `NetworkSimulator…
  • simulator.schema — Zod schema for NetworkSimulatorConstructorOptions, the constructor bundle for NetworkSimulator and `createNetworkSi…
  • types — (no submodules)- types.schema — Zod schema for `NetworkSimulationOpt…
    • types — (no submodules)- types.schema — Zod schema for `NetworkSimulationOpt…
    • types.schema — Zod schema for NetworkSimulationOptions, the configuration accepted by NetworkSimulator's constructor and `setOptio…
  • index — Path: bitpacker-network/src/index.ts Export: See source for details.
  • register-schemas — Idempotent integration with @suaveplan/schema-registry for the @suaveplan/bitpacker-network package. Exposes `regis…
  • default-clock — defaultClock is the single allow-listed wall-clock source in @suaveplan/bitpacker-network. The determin…
  • default-rng — defaultRng is the canonical CSPRNG-backed Rng factory used by NetworkSimulator and any other deterministic-when-a…
  • defaults — (no submodules)- otel — (no submodules)- instruments — (no submodules)- simulator — (no submodules)- simulator.schema — Zod schema for `NetworkSimulator…
    • simulator — (no submodules)- simulator.schema — Zod schema for `NetworkSimulator…
    • simulator.schema — Zod schema for NetworkSimulatorConstructorOptions, the constructor bundle for NetworkSimulator and `createNetworkSi…
  • types — (no submodules)- types.schema — Zod schema for `NetworkSimulationOpt…
    • types — (no submodules)- types.schema — Zod schema for `NetworkSimulationOpt…
    • types.schema — Zod schema for NetworkSimulationOptions, the configuration accepted by NetworkSimulator's constructor and `setOptio…
  • index — Path: bitpacker-network/src/index.ts Export: See source for details.
  • register-schemas — Idempotent integration with @suaveplan/schema-registry for the @suaveplan/bitpacker-network package. Exposes `regis…
  • default-clock — defaultClock is the single allow-listed wall-clock source in @suaveplan/bitpacker-network. The determin…
  • default-rng — defaultRng is the canonical CSPRNG-backed Rng factory used by NetworkSimulator and any other deterministic-when-a…
  • defaults — (no submodules)- otel — (no submodules)- instruments — (no submodules)- simulator — (no submodules)- simulator.schema — Zod schema for `NetworkSimulator…
    • simulator — (no submodules)- simulator.schema — Zod schema for `NetworkSimulator…
    • simulator.schema — Zod schema for NetworkSimulatorConstructorOptions, the constructor bundle for NetworkSimulator and `createNetworkSi…
  • types — (no submodules)- types.schema — Zod schema for `NetworkSimulationOpt…
    • types — (no submodules)- types.schema — Zod schema for `NetworkSimulationOpt…
    • types.schema — Zod schema for NetworkSimulationOptions, the configuration accepted by NetworkSimulator's constructor and `setOptio…
  • index — Path: bitpacker-network/src/index.ts Export: See source for details.
  • register-schemas — Idempotent integration with @suaveplan/schema-registry for the @suaveplan/bitpacker-network package. Exposes `regis…
  • default-clock — defaultClock is the single allow-listed wall-clock source in @suaveplan/bitpacker-network. The determin…
  • default-rng — defaultRng is the canonical CSPRNG-backed Rng factory used by NetworkSimulator and any other deterministic-when-a…
  • defaults — (no submodules)- otel — (no submodules) - instruments — (no submodules)- simulator — (no submodules) - simulator — (no submodules) - simulator.schema — Zod schema for NetworkSimulatorConstructorOptions, the constructor bundle for NetworkSimulator and `createNetworkSi…
  • types — (no submodules) - types — (no submodules) - types.schema — Zod schema for NetworkSimulationOptions, the configuration accepted by NetworkSimulator's constructor and `setOptio…
  • index — Path: bitpacker-network/src/index.ts Export: See source for details.
  • register-schemas — Idempotent integration with @suaveplan/schema-registry for the @suaveplan/bitpacker-network package. Exposes `regis…

Install

bun add @suaveplan/bitpacker-network

Usage

import { NetworkSimulator } from "@suaveplan/bitpacker-network";

const sim = new NetworkSimulator({ latency: 50, jitter: 10, packetLoss: 0.02 });

sim.send(new Uint8Array([1, 2, 3]));
const received = sim.receive(); // may drop packet based on loss rate

Modules

  • src/index.ts — NetworkSimulator: configurable latency, jitter, and packet loss simulation