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

@miadi/capture

v0.2.1

Published

The capture core abstracted from gmtermux — a take lifecycle state machine over a pluggable capture driver, one TLID naming rule, provenance that survives a restart, and streamed sha256 for the bytes themselves. A take is durable before it belongs to anyt

Readme

@miadi/capture

The capture core abstracted from gmtermux — a take lifecycle state machine over a pluggable capture driver, one TLID naming rule, and provenance that survives the process that captured it.

A capture is any take a device makes in one unrepeatable instant — kinds: audio | video | midi | other. Captures include video ("I wanna be able to shoot video"); the lifecycle, the TLID rule, and the sidecar are the same for every kind, because none of them ever learned what a microphone is.

Extraction contract: gmtermux/rispecs/composition-recorder-suite.spec.md (the recording aspect) and gmtermux/rispecs/recording.spec.md. Vocabulary: @miadi/episodic-memory-schema (CaptureProvenance, ArtifactOrigin, ArtifactReference) — consumed, never re-declared.

What this package owns

  • Recorder — start / pause / resume / stop with lossless segment join. Context freezes at start() (the Songbird rule); every failure leaves more than nothing (graded degradation): a join that cannot happen retains its segments and the recorder stays paused.
  • TLIDYYMMDDHHMMSS, the take's local-instant name. Previously implemented three times in gmtermux; this is the one copy.
  • TakeStore — the flat take library plus a <take>.take.json provenance sidecar, closing the defect where provenance lived only in process memory and degraded to file mtime after a restart.
  • CaptureDriver / SegmentJoiner — the device seam. Termux, ALSA, or any host that owns a capture device implements these; the lifecycle never learns which.

What this package refuses to own

  • Association. A take is durable before it belongs to anything. Binding a take to a musical-composition is the studio domain's act (@miadi/musical-composition); binding to a chronicle episode belongs to @miadi/inquiry-weave / @miadi/musical-composition-to-episode. This package only guarantees there is something whole to associate, and toArtifactReference() to speak the episode vocabulary when asked.
  • Transport. The HTTP envelope lives in @miadi/capture-client.
  • Bytes at rest beyond the library directory. Registries (medicine-wheel's capture records) hold records and URIs, never media.

The origin law

A take is captured: a device, an instant, one chance — irreplaceable. Its transcription is derived — regenerable for exactly as long as the voice is kept. TakeStore.readTakeRecord refuses a sidecar whose origin fails the guard rather than defaulting it, because defaulting to derived marks an unrepeatable take safe to delete.

Example

import { Recorder, TakeStore } from "@miadi/capture"

const store = new TakeStore(process.env.CAPTURES_DIR ?? "./captures")
const recorder = new Recorder({
  driver: platformDriver,   // your CaptureDriver
  joiner: ffmpegJoiner,     // your lossless SegmentJoiner
  recordingsDir: store.dir,
  device: "larix",
})

await recorder.start({ composition: "ep097-ceremony" }) // context freezes here
await recorder.pause()
await recorder.resume()
const take = await recorder.stop()      // provenance: startedAt, duration, bytes, device
await store.recordCompletedTake(take)   // provenance now survives a restart