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

@tangle-network/run-capsule

v0.4.0

Published

Turn any agent run's trace into a shareable video — code/terminal/screen/conversation capsule animations, recorded headless and uploaded to a temp link. Secrets are redacted before upload. Consumer of @tangle-network/agent-eval/storyboard.

Downloads

40

Readme

@tangle-network/run-capsule

Turn any agent run's trace into a shareable video.

run-capsule consumes a run's Span[] trace (the @tangle-network/agent-eval storyboard IR), renders modality-typed capsule animations — code, terminal, screen, conversation, and a unified replay — records each headless to MP4, and uploads to a temporary public link. Secrets are redacted before anything is rendered or uploaded.

The trace is the source of truth; the storyboard is the IR; the video is just one compiled target. Capture once, render many views.

import { runToVideo } from '@tangle-network/run-capsule'

const { results } = await runToVideo(spans, { title: 'Agent builds a DEX', outDir: 'out' })
for (const r of results) console.log(r.kind, r.url) // → shareable links
npx run-capsule --workdir ./generated-project      # code capsule from real files
npx run-capsule --playwright agent-result.json     # browser/screen from a Playwright run
npx run-capsule --claude stream.jsonl              # any Claude Messages stream
npx run-capsule --demo                             # built-in sample

What it renders

runToVideo auto-detects which capsules a trace supports and renders only those:

| Capsule | Built from | Shows | |---|---|---| | code | edit/write tool spans | the agent typing each file (themed, file tabs + explorer) | | terminal | shell/sandbox spans | commands typing out with their output | | screen | browser/computer-use spans | real screenshots replayed with action captions | | conversation | llm messages | the back-and-forth reasoning | | replay | the whole trace | the unified storyboard (title → moments → summary) |

Adapters — one per surface

Map your agent surface into Span[] once, then everything downstream is uniform:

| Adapter | Surface | |---|---| | spansFromPlaywrightResult | @tangle-network/agent-browser-driver TestResult (browser, with screenshots) | | spansFromComputerUse | computer-use loops (Anthropic computer-use, CUA, desktop drivers) | | spansFromClaudeMessages | any Anthropic Messages stream (e.g. sandbox-driver stream-shot-*.jsonl) | | spansFromRuntimeEvents | agent-eval RuntimeEventLike[] | | spansFromWorkdir | a generated project directory |

The output is only as rich as the trace: a screen capsule shows real frames when the trace carries attributes.screenshot; a code capsule shows real code when edits carry their content.

Privacy

The clip is published to a public host (litterbox by default, temporary; or catbox, permanent). runToVideo runs redactSpans first, which strips high-confidence credential shapes (provider tokens, JWTs, PEM keys, key=value secrets) from every string in the trace. It is fail-closed (over-redacts rather than leak), and leaves data: URIs (screenshots) intact. Still: only render runs you're comfortable sharing.

System dependencies

Recording needs a browser and (for MP4) ffmpeg:

  • Chromiumnpx playwright install chromium (or use the Docker image / Nix flake below).
  • ffmpeg — on PATH. Without it, output stays .webm (still playable/uploadable).

Docker (everything bundled)

docker build -t run-capsule .
docker run --rm -v "$PWD/out:/out" run-capsule --demo --out /out

The image is based on the official Playwright image (Chromium + system libs preinstalled) plus ffmpeg.

Nix

nix develop          # devShell with node, pnpm, ffmpeg, and Chromium wired for Playwright

API

  • runToVideo(spans, { title, kinds?, outDir, upload?, host?, expiry?, toMp4? }){ runDir, results }
  • supportedKinds(spans) → which capsules the trace supports
  • renderCodeCapsuleHtml / renderTerminalCapsuleHtml / renderScreenCapsuleHtml / renderConversationCapsuleHtml
  • recordHtmlToVideo(htmlPath, outDir, opts){ webm, mp4? }
  • uploadToShareHost(file, { host, expiry }) → URL
  • the adapters above, and redactSpans

License

MIT