import { t as Agent } from "../agent-BHkvYIH9.js";
import { Hn as HeadlessResult, In as FormattedHeadlessResult, Ln as FormattedHeadlessTurnEvent, Vn as HeadlessOutputFormat, zn as HeadlessEvent } from "../index-C4aT2kO_.js";

//#region src/output/stream-json.d.ts
type StreamJsonOutputFormat = HeadlessOutputFormat;
type StreamJsonTurnEvent = Extract<HeadlessEvent, {
  type: 'turn';
}>;
interface StreamJsonFormatOptions {
  format?: StreamJsonOutputFormat;
  providerName?: string;
}
interface StreamJsonOutputOptions extends StreamJsonFormatOptions {
  write?: (line: string) => void;
}
declare function formatStreamJsonTurnEvent(event: StreamJsonTurnEvent, options?: StreamJsonFormatOptions): FormattedHeadlessTurnEvent;
declare function streamJsonTurnEventToJsonl(event: StreamJsonTurnEvent, options?: StreamJsonFormatOptions): string;
declare function formatStreamJsonResult(result: HeadlessResult, options?: StreamJsonFormatOptions): FormattedHeadlessResult;
declare function streamJsonResultToJsonl(result: HeadlessResult, options?: StreamJsonFormatOptions): string;
declare function createStreamJsonOutputHandler(options?: StreamJsonOutputOptions): (event: HeadlessEvent) => void;
declare function setupStreamJsonOutput(agent: Agent, options?: StreamJsonOutputOptions): () => void;
//#endregion
export { StreamJsonFormatOptions, StreamJsonOutputFormat, StreamJsonOutputOptions, StreamJsonTurnEvent, createStreamJsonOutputHandler, formatStreamJsonResult, formatStreamJsonTurnEvent, setupStreamJsonOutput, streamJsonResultToJsonl, streamJsonTurnEventToJsonl };
//# sourceMappingURL=stream-json.d.ts.map