/** * Injectable effect boundaries. * * Every tool is a policy function that takes its effects as parameters, so unit * tests drive it with in-memory stubs (no network, no real git mutation, no * child processes). The thin bins wire the real Node/Bun implementations. */ /** Result of running a subprocess. */ export interface ExecResult { readonly status: number; readonly stdout: string; readonly stderr: string; } /** Runs a subprocess to completion and returns captured output. Never throws on non-zero exit. */ export type Exec = (command: string, args: readonly string[], options?: { readonly cwd?: string; readonly env?: NodeJS.ProcessEnv; readonly timeoutMs?: number; }) => ExecResult; /** Minimal read-only filesystem seam. */ export interface FsReader { readonly exists: (path: string) => boolean; readonly readText: (path: string) => string; readonly readDir: (path: string) => readonly string[]; readonly isExecutable: (path: string) => boolean; } /** An HTTP GET returning a parsed JSON body plus the transport status. */ export interface HttpResponse { readonly status: number; readonly body: unknown; } export type HttpGetJson = (url: string, headers: Readonly>) => Promise; /** Structured logger seam (tests capture lines; bins print to console). */ export interface Logger { readonly info: (line: string) => void; readonly warn: (line: string) => void; readonly error: (line: string) => void; } /** Sleep seam so pollers are deterministic in tests. */ export type Sleep = (ms: number) => Promise; /** Real subprocess runner: captures stdout/stderr, reports the exit status without throwing. */ export declare const realExec: Exec; /** Real filesystem reader rooted at an absolute base directory. */ export declare function realFsReader(root: string): FsReader; /** Real HTTP GET returning parsed JSON. Non-2xx does not throw, the status is reported so callers can branch (e.g. 503 fallback). */ export declare const realHttpGetJson: HttpGetJson; /** Console-backed logger. */ export declare const consoleLogger: Logger; /** In-memory logger for tests. */ export declare function captureLogger(): Logger & { readonly lines: string[]; }; export declare const realSleep: Sleep; //# sourceMappingURL=effects.d.ts.map