/** * TEMPORARY COMPATIBILITY SHIM for the adopted Harness generation, registered * in HARNESS_COMPAT. Confirmed against 0.2.0-rc.2 at * 639ed015397290b3745d163aafe02ffee4aa3f84: subprocess-local/src/output.ts * readFrom independently decodes each retained byte slice, and bash-local's * consuming reader advances through incomplete UTF-8 characters. * * Independent observed re-reads withhold ALL trailing U+FFFD until repaired or * captured-stream settlement. Literal replacement characters therefore incur * latency too. UTF-16 prefix counts, not re-encoded byte lengths, prevent * duplicates even for malformed bytes. A lossy read skips its uncertain snapshot * entirely, flushes only that stream's previous tail, and resynchronizes on later * text; empty polls cannot clear resynchronization. No spill paths are read or displayed. * * Removal: when the adopted executor supplies incremental, Unicode-correct * observed deltas (including malformed input, EOF and retained-window gaps), * delete this re-read adapter and its compatibility record/tests in that adoption. * Keep only ordinary bounded line framing and terminal escaping. * @module dshline/shell-output */ import type { ShellExecution } from '@deepseek-ai/dsh-shell'; /** * Bounded, terminal-safe projection of the shell's independent captured streams. * Completed rows are logical lines: Screen wraps them at its current width. */ export declare class ShellOutput { private readonly emit; private readonly stdout; private readonly stderr; private batch; private warned; /** * @param emit - commits completed bounded logical lines through Screen. */ constructor(emit: (rows: readonly string[]) => void); /** * Read without stealing the executor's consuming cursor. * @param readers - public non-consuming stdout/stderr readers. * @param ended - true only after done, when captured streams are definitive. * @returns nothing; completed lines go to the constructor callback. */ poll(readers: ShellExecution['observed'], ended?: boolean): void; /** * Commit remaining framed tails; call poll(readers, true) first at EOF. * @returns nothing; tails go to the constructor callback exactly once. */ flush(): void; /** * One short unfinished row per stream, never an unbounded wrapped live area. * @param columns - current available terminal columns. * @returns zero to two escaped, truncated, row-styled rows. */ live(columns: number): string[]; private read; private frame; private row; private tail; private queue; private drain; } //# sourceMappingURL=shell-output.d.ts.map