export declare function sleep(ms: number, signal?: AbortSignal): Promise; export declare function writeOutput(message?: string): void; export declare function writeError(message: string): void; export declare function setVerbose(value: boolean): void; export declare function isVerbose(): boolean; export declare function okMark(): string; export declare function failMark(): string; export declare function styleWarning(text: string): string; export declare function styleDim(text: string): string; export declare function setLogFile(filePath: string | undefined): void; /** The resolved log file path, or undefined before `setLogFile` runs. */ export declare function getLogFile(): string | undefined; /** * Byte offset in the log file where the current run's output begins (the * file size when `setLogFile` ran). `tail -c +N` from this offset shows only * this run. */ export declare function getLogRunStartByte(): number; export declare function withLogOutputSuppressed(operation: () => Promise): Promise; /** Important tier: always on the console (dimmed timestamp) and the log file. */ export declare function log(message: string): void; /** * Diagnostic tier: always tee'd to the log file, but echoed to the console only * under --verbose. Use for mechanics (git porcelain brackets, adapter probe * failures, "loaded config") that an operator rarely needs while watching. */ export declare function debug(message: string): void; type LogEventFieldValue = boolean | number | string | readonly string[] | undefined; export declare function logEvent(event: string, fields: Record): void; export declare function readEnvironmentVariable(name: string): string | undefined; /** * Reads the value that follows `--task` at `argv[index + 1]`. Throws a * uniform "task id is required" error if the value is missing, empty, or * looks like another flag (starts with `-`). Centralizes the validation so * each subcommand's arg parser stays DRY. */ export declare function readTaskArgument(argv: string[], index: number, command: string): string; export interface DryRunPositionals { dryRun: boolean; positionals: string[]; } /** * Parses an argv that accepts an optional `--dry-run` flag plus free * positionals, rejecting any other dash-prefixed token. Shared by the * subcommands whose only flag is `--dry-run` so each parser stays DRY; pass the * command's `usage` string for the "Unknown option" error. */ export declare function parseDryRunPositionals(argv: string[], usage: string): DryRunPositionals; interface SourceFilterArgs { targetSource: string | undefined; jsonOutput: boolean; } /** Parse the `[source] [--json]` argument pattern shared by source-scoped subcommands. */ export declare function parseSourceFilterArgs(argv: string[], commandName: string, usage: string): SourceFilterArgs; export declare function errorMessage(error: unknown): string; export {}; //# sourceMappingURL=util.d.ts.map