/** * Short, redacted excerpt of a terminal screen for owner-facing alerts. * * When an agent's input box cannot be read, the owner is asked to look at * it. A few readable rows (a permission dialog, a bare shell prompt) usually * answer "what is it stuck on" without opening the terminal. The rows can * hold secrets, so every row goes through the secret redactor, long opaque * tokens are masked, and the excerpt is capped in rows and characters. * * @module screen-excerpt */ /** Rows kept (bottom-most non-empty ones) */ export declare const SCREEN_EXCERPT_MAX_ROWS = 6; /** Characters kept per row */ export declare const SCREEN_EXCERPT_MAX_ROW_CHARS = 100; /** Characters kept in total */ export declare const SCREEN_EXCERPT_MAX_CHARS = 420; /** * Build the excerpt from a screen's rows. * * @param lines - Screen rows, top to bottom * @returns The bottom rows, redacted and trimmed, joined by newlines ('' when blank) */ export declare function redactedScreenExcerpt(lines: readonly string[]): string; /** * Whether the last row looks like a bare shell prompt (`user@host dir %`, * `$ `, `# `): the agent's runtime has exited to the shell, so there is no * input box to read. * * @param excerpt - An excerpt from {@link redactedScreenExcerpt} * @returns True for a shell prompt */ export declare function looksLikeShellPrompt(excerpt: string): boolean; //# sourceMappingURL=screen-excerpt.d.ts.map