import type { PipeStreamInfo, PipeStreams } from "@oh-my-pi/pi-natives"; import type { JobTextChunk, JobTextSource } from "./types.js"; /** * One tapped pipe of a bash run as a {@link JobTextSource} with id * `pipe:`. Offsets are stream bytes; a streaming decoder keeps multi-byte * characters split across reads intact and restarts whenever a read does not * continue where the previous one ended (a gap, or a reread from the start). * * A pipe that carried a NUL byte (`git archive | tar -x`, `curl | gunzip`) is * binary from then on and reads as empty text: decoded, its runs between * newlines would count as lines and surface as mojibake in the widget's stage * and the author's samples. Every read is scanned, not just the stream's head: * a fast producer outruns the retained window, so the first read can open deep * inside an archived text file. */ export declare class PipeTextSource implements JobTextSource { #private; readonly streams: PipeStreams; readonly id: string; readonly label: string; readonly streamId: number; constructor(streams: PipeStreams, info: PipeStreamInfo); read(from: number): JobTextChunk; } /** * The pipes of one bash run as text sources, one stable {@link PipeTextSource} * per stream so each keeps its decoder across refreshes. */ export declare class PipeTextSources { #private; readonly streams: PipeStreams; constructor(streams: PipeStreams); list(): PipeTextSource[]; }