UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

25 lines • 1.5 kB
import type { RedirectResult } from '../../../../context/session_context.ts'; import { type AsyncLineIterator } from '../../../../io/async_line_iterator.ts'; import type { ByteSource } from '../../../../io/types.ts'; import type { SessionView } from '../../../../view/types.ts'; import type { SessionState } from '../../../session/session.ts'; import type { BuiltinCall } from '../types.ts'; /** * One line as a bare `read` stores it in REPLY: backslashes processed, a * continuation joined, nothing split off; null at end of input. `select` * takes its choice this way (bash calls this builtin). */ export declare function readReply(buffer: AsyncLineIterator, signal?: AbortSignal): Promise<string | null>; /** * Read one line (or delimited record, or character count) into * variables, with bash's option surface. `-r` turns off backslash * processing; `-d C` reads to `C`; `-n N`/`-N N` bound the read; `-a * NAME` stores fields in an array; `-t` accepts a timeout (0 answers * whether a source is present); `-p -s -e -i` are non-tty no-ops; `-u FD` * reads an open descriptor, sharing its cursor with aliases. The * status is 1 when end of input ended the read. */ export declare function handleRead(args: string[], session: SessionState, stdin: ByteSource | null, state?: SessionView | null, signal?: AbortSignal): Promise<RedirectResult>; /** The `read` arm. */ export declare function readBuiltin(call: BuiltinCall): Promise<RedirectResult>; //# sourceMappingURL=read.d.ts.map