/** Source extensions: code windows outline, and reads of these are "source reads". */ export declare const SOURCE_PATH: RegExp; /** Docs printed whole fold to their needed sections. */ export declare const DOC_FILE: RegExp; /** Extensions of files agents print as data: records, logs, reports, tool outputs. */ export declare const DATA_EXT: RegExp; /** * Segments of a shell command: split on `;`, `&&`, `||` and newlines outside quotes (`sed -n '1,9p;20,30p'` is one * segment); pipes stay inside a segment. */ export declare function segments(command: string): string[]; /** Some segment prints file contents (`cd x; ls; cat a.py`). */ export declare function printsFiles(command: string): boolean; /** Any token of the command is a source path or glob (`cat src/*.py`, `sed -n 1,80p app.ts`). */ export declare function namesSource(command: string): boolean; /** Every file-printing segment names only data files (by extension), e.g. `head -80 /results/EXP_A.log`. */ export declare function readsOnlyData(command: string): boolean; /** A segment runs tests or lint, and none prints source, docs or diffs (logs and bare `head -N`/`tail -N` are fine). */ export declare function isTestRun(command: string): boolean; /** The command runs a program of the agent's own (heredoc, interpreter). */ export declare function runsProgram(command: string): boolean; /** The command runs a coding agent whose printed report is its whole answer. */ export declare function runsAgent(command: string): boolean; /** The command or read path reads text a shaped result saved (`artifact://N`): the agent paging hidden lines back in. */ export declare function isPageBack(command: string): boolean; /** One file-printing segment of a command. */ export interface ReadTarget { /** The path or glob as written. */ arg: string; /** Printed with `cat -n` / `nl -ba` line-number prefixes (`%6d\t`). */ numbered: boolean; /** `cd` arguments of earlier segments, in order. */ cds: string[]; /** 1-based inclusive ranges in sed order; undefined = whole file. */ ranges?: [number, number][]; } /** * File-printing segments of `command`: `sed -n 'A,Bp' F` (also `A,Bp;C,Dp`), `head [-n] N F`, `cat -n F | sed -n …`, * `nl -ba F | sed -n …`, `cat F | head N`, `cat F | sed -n …`, and whole reads `cat|nl|bat|more|less [-flags] F…`. */ export declare function readTargets(command: string): ReadTarget[]; /** * The real absolute paths of the files `target` prints, resolved against `cwd` after its `cd` segments, globs expanded * in shell order. Missing files and directories are left out. */ export declare function resolveTarget(target: ReadTarget, cwd: string): Promise; /** The file's lines (a trailing newline does not add one); null when it can't be read. */ export declare function fileLines(abs: string): Promise;