assistantSideText
assistantSideText(
rawJsonl):string
Defined in: src/usage-halt.ts:49
Extract the text of NON-user transcript entries (assistant, system, tool, …) from a raw JSONL tail, dropping user-authored messages. Claude’s usage-limit notice is never user-authored, so excluding user prompts stops a transcript where the user merely typed usage-limit phrasing (e.g. a session discussing this very feature) from being mistaken for a real halt — the false-positive the corroboration gate cannot catch on the uncalibrated degrade path.
Each retained entry is serialized whole so the phrasing is found wherever it sits (content
blocks, system text, error fields). The token-accounting message.usage object never trips
the patterns (they require “usage limit”, “weekly limit”, “limit reached … reset”, etc.).
Fail-closed: when nothing parses (empty/garbled tail) or every entry is user-authored, this returns an empty string — never the raw tail. Transcripts are always JSONL, so a raw-tail fallback would only ever leak unparsed (possibly user-authored) text back into the match and re-open the false positive this filter exists to close.
Parameters
Section titled “Parameters”rawJsonl
Section titled “rawJsonl”string
Returns
Section titled “Returns”string