/** * Subprocess execution primitive for the shell adapter. Owns the spawn, * timeout, stdin/stdout/stderr handling, and placeholder substitution. * Factory wires these together into the four TaskSource operations. * * Placeholders (`${id}`, `${canonicalId}`, `${name}`) are shell-quoted before * substitution so a task id containing shell metacharacters cannot * inject. The host invokes via `sh -c ` so users can * use full shell syntax (pipes, redirection, etc.) in their command strings. * * Exit code 0 = success; exit code 3 = "not found" (caller decides how to * interpret); any other nonzero exit throws. */ export declare class ShellAdapterTimeoutError extends Error { constructor(arguments_: { command: string; timeoutMs: number; }); } interface InvokeArgs { command: string; timeoutMs: number; stdin?: string | undefined; cwd?: string | undefined; env?: Record | undefined; substitutions?: Record | undefined; /** Source name for log prefixing. */ sourceName: string; /** Override the default per-stream stdout/stderr cap (10 MB). Used by tests. */ maxOutputBytes?: number; } interface InvokeResult { stdout: string; stderr: string; exitCode: number; /** True if either stream hit the byte cap and the rest was discarded. */ truncated: boolean; } export declare function applySubstitutions(command: string, subs: Record): string; export declare function invokeShellCommand(args: InvokeArgs): Promise; export {}; //# sourceMappingURL=invoke.d.ts.map