@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
31 lines • 1.24 kB
TypeScript
import type { ProcessHandle } from './handle.ts';
import type { ProcessInfo } from './types.ts';
import type { ProcessInput, ProcessOutput } from './stdio.ts';
export interface ProcessResult {
readonly stdout: Uint8Array;
readonly stderr: Uint8Array;
readonly exitCode: number;
}
/** Streams belong to one consumer; communicate drains both outputs concurrently. */
export declare class ChildProcess {
private readonly process;
readonly stdin: ProcessInput;
private readonly output;
private readonly cancel;
readonly stdout: AsyncIterable<Uint8Array>;
readonly stderr: AsyncIterable<Uint8Array>;
constructor(process: ProcessHandle, stdin: ProcessInput, output: ProcessOutput, cancel: (signal: number) => void);
get pid(): number;
closeOutput(stream: 'stdout' | 'stderr'): void;
poll(): number | null;
/**
* Stop the child with `signal`; its status is 128 plus it.
*
* @param signal what the stop stands for, KILL (9) unless the caller
* names another (`Popen.terminate` sends TERM).
*/
terminate(signal?: number): void;
wait(): Promise<ProcessInfo>;
communicate(data?: Uint8Array): Promise<ProcessResult>;
}
//# sourceMappingURL=child.d.ts.map