/** * Fitting command output into an answer field. * * A field carries the output itself, so it needs a ceiling the transport * buffer does not give: 10 MiB of journal would arrive as data and crowd out * everything else the caller holds. What is cut is said in bytes rather than * shown by a seam alone — a command can print a line that looks exactly like * one, and only a number the server put there cannot be faked by the output. */ /** How much output of one command fits into a field */ export declare const FIELD_LIMIT_BYTES: number; export interface ClippedText { text: string; /** Bytes removed from the middle; `0` — the output arrived whole */ clippedBytes: number; } /** * The output as it goes into a field. * * Both ends are kept because the meaning sits at either one: a table puts it * in the header, a build or a log puts it in the last lines. `keepTail: false` * is for output that was already cut by the transport — there the end of what * arrived is not the end of the output, and offering it as a tail would pass * an incomplete answer off as a whole one. */ export declare function clipForField(text: string, options?: { limit?: number; keepTail?: boolean; }): ClippedText;