UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

17 lines • 963 B
/** The longest a print-then-exit command waits for its reader before exiting anyway. */ export declare const OUTPUT_DELIVERY_LIMIT_MS = 30000; type ExitCode = Parameters<typeof process.exit>[0]; /** * Runs `print` with stdout collected instead of written. Both runtimes can drop queued stdout at * exit: Node writes to a pipe asynchronously, and Bun discards `console.log` output queued behind * an earlier `process.stdout` write (senpi#2937). One write whose own callback is awaited is the * shape both deliver in full. Output already redirected (json mode sends it to stderr) is left alone. */ export declare function captureStdout<T>(print: () => T | Promise<T>): Promise<{ result: T; output: string; }>; export declare function exitAfterOutput(output?: string, code?: ExitCode): Promise<never>; export declare function printThenExit(print: () => unknown, code?: ExitCode): Promise<never>; export {}; //# sourceMappingURL=print-then-exit.d.ts.map