npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@floegence/flowersec-core

v5.4.1

Published

Flowersec core TypeScript library for carrier-neutral encrypted sessions and multiplexed streams.

Readme

Flowersec for TypeScript

@floegence/flowersec-core is the ESM-only Flowersec SDK for browsers and Node.js. It provides encrypted sessions, RPC, notifications, reliable byte streams, connection recovery, server runtimes, and browser proxy integration.

Install

npm install @floegence/flowersec-core

Node.js 24.20.0 or newer is required.

Entrypoints

  • @floegence/flowersec-core exports the portable artifact, lease, Session, RPC, stream, metadata, error, and connection-controller contracts.
  • @floegence/flowersec-core/browser adds browser connect(...), createConnectionController(...), WSS, optional WebTransport, and the isolated private-loopback profile.
  • @floegence/flowersec-core/node adds Node connect(...), createConnectionController(...), createAcceptor(...), createTunnelRuntime(...), ProxyServer, SessionHandlers, and RPCHandlers.
  • @floegence/flowersec-core/proxy provides the browser HTTP/WebSocket proxy runtime, Service Worker integration, and exact-origin window bridges.

Client Sessions

Parse an opaque artifact, bind its durable spend callback, and connect:

import { createArtifactLease, parseArtifact } from "@floegence/flowersec-core";
import { connect } from "@floegence/flowersec-core/node";

const artifact = parseArtifact(serializedArtifact);
const lease = createArtifactLease(artifact, persistSpendExactlyOnce);
const session = await connect(lease, { origin: "https://app.example" });

Artifact hides credentials and candidate selection. ArtifactLease exposes no public spend method. Session exposes RPC, streams, unreliable messages when negotiated, liveness, rekeying, termination, and close without revealing its carrier.

StreamHandlers serves bounded application handlers on any Session. ConnectionController is the only reconnect scheduler and obtains a fresh lease for each attempt. Work from a terminated Session is never migrated or replayed.

Node Servers and ProxyServer

createAcceptor(...) accepts direct application Sessions. SessionHandlers binds accepted RPC, notification, and stream handlers before establishment. createTunnelRuntime(...) pairs and forwards opaque relay legs without terminating the end-to-end Session.

ProxyServer registers the bounded HTTP and WebSocket application protocol on StreamHandlers or SessionHandlers. It enforces fixed upstream hosts, origins, header and cookie policy, body/frame limits, timeouts, cancellation, and a close barrier. The /proxy browser runtime uses the same application wire through a Service Worker or exact-origin window bridge.

Supported Connections

Browsers support WSS and optional browser-owned WebTransport. Node.js supports WSS and raw QUIC client, direct-server, and tunnel-runtime roles. Raw QUIC uses the optional Flowersec native package for macOS or glibc Linux on arm64/x64. Node.js does not expose WebTransport or an artifact issuer; use an application control plane such as the Go control-plane package.

CA candidates use platform or configured private roots. Pin candidates verify only the complete artifact-bound active pin set and never fall back to CA. Public errors remain closed and redacted.

CLI

The package installs flowersec-ts-cli. Its client and server commands accept only Transport v3 artifacts. The server requires a TLS certificate and private key for its WebSocket listener.

Verify

npm run build
npm test
npm run verify:package

See the TypeScript cookbook, API contract, Transport v3 architecture, wire contract, and error model.

Connection retry status

While a connection controller is waiting, its snapshot and diagnostic include nextRetryAtUnixMilliseconds, the scheduler-owned wall-clock estimate of the next attempt. It accounts for both exponential backoff and any server retry_after minimum. Hosts may display a countdown without duplicating the retry policy. The field is absent outside waiting. retryNow() can skip backoff but cannot bypass a server minimum; close() cancels the wait. Wall-clock corrections can change the displayed estimate; the scheduler still enforces its monotonic backoff.

Session-bound HTTP events

Request preparation supports browsers that expose Body.blob() without a Request.body stream. Both paths preserve the request bytes, headers, body limit and cancellation boundary before opening a carrier stream.

Use createProxyRuntime({ session, externalOrigin }).fetch("/api/events", { headers: { Accept: "text/event-stream" }, signal }) to read a standard streaming Response over the existing session. Consume or cancel the body and dispose the runtime when its session is replaced. The runtime never retries requests. It shares policy, framing, cancellation and admission with the browser bridges. The Go and Node proxy servers support negotiated SSE with bounded backpressure and activity deadlines; ordinary requests retain finite response limits. Default HTTP admission is 24 requests, including at most 16 event streams. Rejected event subscriptions report resource_exhausted immediately.