UNPKG

@code-yeongyu/senpi

Version:

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

21 lines • 1.5 kB
/** * Characters one rg command line may use. Windows caps a whole command line at * 32,767 characters. POSIX ARG_MAX (1 MiB on macOS, 2 MiB on Linux) also counts * the environment and one pointer per argument; 256 KiB leaves room for both. * Batches split to stay under it and never truncate an argument. */ export declare function argvBudget(platform?: NodeJS.Platform): number; /** Room kept for the executable path, which the command line carries but the argument list does not. */ export declare const EXECUTABLE_RESERVE = 4096; /** * Characters one argument occupies on the command line: its separator and, on Windows, * the surrounding quotes plus the backslash escapes libuv adds before quotes and trailing backslashes. */ export declare function argvCost(argument: string, platform?: NodeJS.Platform): number; /** Why this argument list cannot be launched on the platform, or undefined when it fits. */ export declare function commandLineOverflow(args: readonly string[], platform?: NodeJS.Platform): string | undefined; /** Room left for per-file arguments once a launch's fixed arguments are counted. */ export declare function roomAfter(fixed: readonly string[], budget: number, platform?: NodeJS.Platform): number; /** Splits items into ordered batches whose cost fits the room; an oversized single item still gets its own batch. */ export declare function packArgv<T>(items: readonly T[], costOf: (item: T) => number, room: number): T[][]; //# sourceMappingURL=argv.d.ts.map