UNPKG

@code-yeongyu/senpi

Version:

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

24 lines • 1.75 kB
/** * The POSIX go-line shim every own-group launch starts through (senpi#3566 todo 4; review MEDIUM 4). The shim leads the * new process group and waits for `go` on a dedicated control descriptor - never stdin, which stays the caller's - so * the command runs only after the server recorded the launch. A program that cannot be found is reported back on the * same descriptor (`ENOENT`) before the shim exits, so the caller sees the same ENOENT `'error'` as an ungated spawn. * The descriptor is closed before the command starts, so the command never sees it. * * Measured on Node and Bun 1.4: an extra `"pipe"` stdio entry is bidirectional on both (a socket on Node, an fd number * on Bun). */ /** The shell script for a control descriptor `fd` (3 or above). `$0` is the program, `$@` its arguments. */ export declare function goShimScript(fd: number): string; /** The control descriptor for a launch: the first index after every descriptor the caller already asked for. */ export declare function controlFd(callerStdio: readonly unknown[]): number; /** The caller's stdio padded to `fd` entries, with the control pipe at `fd`. */ export declare function withControlPipe<T>(callerStdio: readonly T[], fd: number, pad: T, pipe: T): T[]; /** The program and arguments the shim execs: the command itself, or the caller's shell running it. */ export declare function shimTarget(command: string, args: readonly string[], shell: boolean | string | undefined): { readonly program: string; readonly args: readonly string[]; }; /** The error an ungated spawn emits for a program it cannot find. */ export declare function enoentError(command: string, args: readonly string[]): NodeJS.ErrnoException; //# sourceMappingURL=go-shim.d.ts.map