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

@agentproto/transcript-fixtures

v0.2.1

Published

@agentproto/transcript-fixtures — canonical RAW daemon-transcript fixtures. The single source of truth for the `{seq, ts, kind, ...}` records produced by the daemon's transcript writer, consumed as anti-drift conformity data by the `packages/runtime` test

Readme

@agentproto/transcript-fixtures

Canonical RAW daemon-transcript fixtures — typed data, zero runtime dependencies. This package is the producer (source of truth) for the {seq, ts, kind, ...} records the agentproto daemon's transcript writer emits, so that two consumers in two different repos can run conformity tests against exactly the same bytes.

What this is for — the anti-drift contract

The transcript record format lives in packages/runtime/src/transcript-writer.ts (this repo). Any change there — renaming a field, adding a kind, changing an optionality — that breaks this file breaks the conformity suites of both consumers below. That is the point.

  • Consumer B (this repo): the future /sessions/:id/chat route's test suite in packages/runtime.
  • Consumer A (agentik-studio repo): packages/react-agentproto's normalize.ts, pulled in as workspace:*.

Any modification to a kind or a field in transcript-writer.ts MUST be reflected here. A field rename that breaks this file breaks both suites. When you change the writer, regenerate the fixture and update the types.

Format (RAW, not normalized)

These are the RAW records the daemon writes to events.jsonl — not the client-side normalized format that normalize.ts produces. Each record has {seq, ts, kind} plus kind-specific fields.

| kind | Fields | | --- | --- | | user-prompt | sessionId, text, source? | | thought | sessionId, text, partial? | | text-delta | sessionId, text, partial? | | tool-call | sessionId, toolCallId, toolName, arguments, isUpdate? | | tool-result | sessionId, toolCallId, result (RAW, unwrapped), isError? | | tool-call-record | sessionId, tool, command?, args?, isError, durationMs?, createdPrUrl?, createdPrNumber? | | permission-resolved | sessionId, toolCallId, decision, optionId? | | turn-end | sessionId, reason? | | notice | sessionId, text |

notice is the "unknown kind" exercise. Agentik-studio's normalize.ts does not handle it explicitly — it falls through to the client's "other" fallback. This deliberately exercises the "unknown kind" behavior of both consumers' test suites.

Files

  • src/records.ts — the TS types for each RAW record plus the canonical fixture as a typed array (CANONICAL_SESSION_RECORDS). The single source of truth.
  • fixtures/canonical-session.jsonl — the same fixture as one JSON object per line, for anyone seeding an events.jsonl file or replaying a stream. It is generated from the array (never authored by hand) and verified against it by the test suite, so the two can never diverge.
  • src/index.ts — exports the types, CANONICAL_SESSION_RECORDS, and CANONICAL_SESSION_JSONL (the JSONL string pre-assembled for direct replay).

Usage

import {
  CANONICAL_SESSION_RECORDS,
  CANONICAL_SESSION_JSONL,
} from "@agentproto/transcript-fixtures"

// typed array (RAW records)
for (const rec of CANONICAL_SESSION_RECORDS) {
  /* rec.kind is narrowed across the union */
}

// ready-to-replay JSONL string (one JSON object per line)
const stream: string = CANONICAL_SESSION_JSONL

Regenerating the JSONL file

pnpm --filter @agentproto/transcript-fixtures build
pnpm --filter @agentproto/transcript-fixtures generate:fixtures

The generate:fixtures script loads the built dist and writes fixtures/canonical-session.jsonl from the array. If you edit the array and don't regenerate, the test suite fails — that is the sync guarantee.

License

Apache-2.0 — see LICENSE.