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/composition

v0.1.2

Published

Read gmtermux composition folders and weave them into miadi-chronicle episodes. Reads compositions and authors episode provenance — never rewrites a composition.

Readme

@miadi/composition

Read a gmtermux composition folder and weave it into a miadi-chronicle episode.

A composition is where a recording lands: a folder on an Android device holding voice clips, Whisper transcripts, images, MIDI takes, and the songwriting layer of a piece — key, capo, tempo, sections, chords. It is a musician's artifact. This package reads that artifact and authors its provenance into the chronicle, so a film or musical production and an episode ledger can hold the same work without either one rewriting the other.

The ownership split

| Concern | Owner | | --- | --- | | Creating and narrating episodes | passages | | Relating and syncing artefacts to episodes | @miadi/inquiry-weave | | Reading compositions, authoring their provenance | @miadi/composition | | Observing heterogeneous sources without judging them | @miadi/episodic-memory-schema |

The dependency runs one way. This package imports inquiry-weave and the schema; neither may ever import it. There is exactly one episode scaffold algorithm in this repository and it lives in inquiry-weave — every filesystem primitive on the episode side is delegated there.

What it will not do

  • Rewrite a composition. Reading is the only operation performed on a composition folder. No repair, no normalization, no schema-version stamping.
  • Invent an episode number. A slug reading ep250- is evidence about a recording, not authorization to claim episode 250. The number is offered as a candidate; a caller must confirm it.
  • Bump the weave version. weave: 1 is what every existing reader parses. Composition provenance travels in episode.yaml, never by versioning up.
  • Claim to be canonical. Everything projected is marked canonical: false. A machine-derived projection is a proposal to the chronicle, not a ruling.
  • Project to authored EpisodicMemory. That schema requires a session id, an opened-at, a charter purpose, and consent decisions. A composition supplies none of them, and inventing them would be authoring disguised as reading.

Classification, not validation

The composition corpus is deliberately heterogeneous — hand-authored folders sit beside editor-written ones and both are legitimate. A boolean valid/invalid would declare half the corpus broken, so compositions are classified:

| Classification | Meaning | | --- | --- | | current-ui-ready | Carries every collection the current editor writes | | compatible-legacy | Readable and whole, predating some of those collections | | repairable | Readable, with defects a human could resolve | | unsafe-or-ambiguous | Cannot be read, or its identity cannot be trusted |

A folder with no composition.json is compatible-legacy, not an error — the directory is the identity and the manifest materializes on the first edit.

Usage

composition observe  <dir>              # read a composition, print its observation
composition classify <dir>              # classify it without touching it
composition project  <dir>              # print the episode.yaml overlay it would write
composition weave    <dir> --number 250 # create the vessel and relate both sides
composition weave    <dir> --episode 250 --dry-run
import { readComposition, classifyComposition, weaveComposition } from "@miadi/composition"

const source = await readComposition("/path/to/compositions-nyro/ep250-routing")
const assessment = classifyComposition(source)

const result = await weaveComposition({
  compositionDir: source.dir,
  number: 250,
  issue: "miadisabelle/gmtermux#31",
})

Environment

Inherited from @miadi/inquiry-weave, unchanged:

| Variable | Meaning | | --- | --- | | MIADI_CHRONICLE_ROOT | Episode vessel root | | MIADI_INQUIRY_ROOT | Where artefact folders are resolved from | | MIADI_INQUIRY_REPO | Fallback repo for issue references |

A composition folder anywhere on disk registers as an artefact by absolute path; it never has to be moved under the inquiry root.

What gets written

Weaving writes three files, none of them inside the composition's manifest:

<composition>/.weave.yaml                     durable relation (weave: 1)
<composition>/AGENTS.md                       back-link appended
<episode>/inquiry/weave.yaml                  sync state (weave: 1)
<episode>/episode.yaml                        source_composition, projection, lineage

In episode.yaml, only source_composition, projection, and composition_musical are ever replaced. lineage is written only when absent — a hand-authored lineage always wins. Every other key is left exactly as found.

Requires

@miadi/episodic-memory-schema@^0.3.0 — 0.2.0 swept the songwriting layer into unmappedFields and labelled .mid and .mp4 clips as audio.