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

@cat-factory/observability-langfuse

v0.11.49

Published

Opt-in Langfuse trace sink for the Agent Architecture Board. The workerd-safe OTLP/HTTP exporter pointed at Langfuse's OpenTelemetry endpoint, so LLM generations and container tool spans stream unchanged on both the Cloudflare Worker and Node facades.

Readme

@cat-factory/observability-langfuse

Opt-in Langfuse trace sink for the Agent Architecture Board.

It implements the runtime-neutral LlmTraceSink port from @cat-factory/kernel, so when wired into a facade every LLM call: container-agent calls (through the LLM proxy) and inline calls (requirements review, document planner, fragment selector, inline agent): surfaces in Langfuse as a generation grouped under its run's trace, plus optional container tool spans.

What it is: the OTLP exporter, pointed at Langfuse

The sink is @cat-factory/observability-otel's fetch-based OTLP/HTTP exporter with three Langfuse-specific decisions in its constructor: the endpoint {baseUrl}/api/public/otel (onto which the exporter appends /v1/traces), HTTP Basic auth over the key pair, and the x-langfuse-ingestion-version: 4 header that v4 needs for real-time ingestion. Metrics are off, because Langfuse implements the traces signal only.

It used to be its own client speaking Langfuse's batch ingestion API (POST /api/public/ingestion). That API is deprecated, sunsets on Langfuse Cloud on 2026-11-16, and the trace-create / generation-create / span-create events it sent are already unsupported on the v4 data model. OTLP is the supported path and this repo already spoke it.

Neither package depends on the official langfuse Node SDK or on any @opentelemetry/* package: those rely on Node-only APIs unavailable on the Cloudflare Worker runtime (workerd), which is what keeps the sink byte-for-byte identical on both facades.

Behaviour

  • Never throws into the caller: every flush swallows its own errors (logging at most a warning). Observability must never break agent work.
  • Honours the same LLM_RECORD_PROMPTS privacy switch as the local metric store: when prompt recording is off, generations carry usage/timing/metadata but no prompt or response bodies.

Usage

import { createLangfuseSink } from '@cat-factory/observability-langfuse'

const sink = createLangfuseSink({
  publicKey: env.LANGFUSE_PUBLIC_KEY,
  secretKey: env.LANGFUSE_SECRET_KEY,
  baseUrl: env.LANGFUSE_BASE_URL, // optional; defaults to Langfuse Cloud
})

Wired into a facade via its container's selectLangfuseSink(config); absent config ⇒ the sink is never built and there is no external emission or behaviour change.