/** * Parser implementations convert stdout and stderr from the underlying child * process to a more useable format. This can be a no-op passthrough if no * parsing is necessary. */ /** * Invoked once per task. * * @param stdout the concatenated stdout, stripped of the winning completion * token pattern when it first matches and any lines consumed by * `isRetirementRequest`. Later stdout is retained unchanged. * * @param stderr if defined, includes stderr except lines consumed by * `isRetirementRequest` or `shouldIgnoreStderrLine`. * * @param passed `true` if stdout's first completion match is pass (ties pass) * and no failure token was found on stderr before parsing. * * @throws an error if the Parser implementation wants to reject the task. It * is valid to raise Errors if stderr is undefined. * * @see BatchProcessOptions */ export type Parser = (stdout: string, stderr: string | undefined, passed: boolean) => T | Promise; export declare const SimpleParser: Parser;