Skip to content
WIP

This guide is a work in progress. Barry is also a work in progress.

@barry-rocks/sdk/transcripts

Types for session transcripts: the events, sessions, sources, and scans that tools reading a harness’s conversation history work with.

import { … } from "@barry-rocks/sdk/transcripts";
Property Type Description
event SessionEvent -
key string Stable across re-reads — a key derived from read order would make every pass look new.

Property Type Description
entriesParsed number -
events TranscriptEvent[] -
linesRead number Both counts, because their ratio is the signal: a thousand lines yielding no entries is a reader that stopped understanding its format.

Property Type
cwd? string | null
harnessSessionId? string | null
metadata? Record<string, unknown>

locate(session): Promise<string | null>

null is an ordinary answer: a hosted session has no file, a new one has none yet.

Parameter Type
session TranscriptSession

Promise<string | null>

read(path, since?): Promise<TranscriptScan>

since is the last key persisted. A reader may skip work with it but need not: keys make re-reading safe, so correctness never depends on the cursor.

Parameter Type
path string
since? string

Promise<TranscriptScan>

optional roots(session): Promise<readonly string[]>

Allowed locations for recorded transcript reads. Callers must realpath both root and file. Absence is not unrestricted access: authorization-dependent reads must fail closed.

Parameter Type
session TranscriptSession

Promise<readonly string[]>