@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
22 lines • 1.18 kB
TypeScript
export interface Kernel32Process {
CreateProcessW(commandLine: Uint8Array, flags: number, environment: Uint8Array, startupInfo: Uint8Array, processInfo: Uint8Array): number;
GetStdHandle(which: number): bigint;
WaitForSingleObject(handle: bigint, ms: number): number;
GetExitCodeProcess(handle: bigint, exitCode: Uint8Array): number;
CloseHandle(handle: bigint): number;
GetLastError(): number;
}
export declare class BreakawayError extends Error {
readonly code = "tool_child_breakaway_failed";
constructor(step: string, win32Error: number);
}
/** A `CREATE_UNICODE_ENVIRONMENT` block: `NAME=value\0` entries, sorted by name as Windows expects, then one more `\0`. */
export declare function environmentBlock(env: NodeJS.ProcessEnv): Uint8Array;
export interface BreakawayProcess {
readonly pid: number;
/** Blocks until the command exits and returns its exit code. */
wait(): number;
}
export declare function startBreakaway(kernel: Kernel32Process, commandLine: string, env: NodeJS.ProcessEnv): BreakawayProcess;
export declare function loadKernel32Process(): Kernel32Process | undefined;
//# sourceMappingURL=windows-breakaway.d.ts.map