import * as Effect from "effect/Effect"; import * as Layer from "effect/Layer"; import * as ServiceMap from "effect/Context"; import * as Stream from "effect/Stream"; import type { TerminalSize } from "./scene.js"; declare const CredentialDeliveryFailed_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "CredentialDeliveryFailed"; } & Readonly; export declare class CredentialDeliveryFailed extends CredentialDeliveryFailed_base<{ readonly cause: unknown; }> { } declare const OutputWriteFailed_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & { readonly _tag: "OutputWriteFailed"; } & Readonly; export declare class OutputWriteFailed extends OutputWriteFailed_base<{ readonly channel: "stdout" | "stderr"; readonly reason: string; }> { } interface WritableOutput { readonly write: (content: string, callback: (error?: Error | null) => void) => boolean; readonly on: (event: "error", listener: (cause: unknown) => void) => unknown; readonly off: (event: "error", listener: (cause: unknown) => void) => unknown; readonly once: (event: "error", listener: (cause: unknown) => void) => unknown; readonly destroyed: boolean; readonly writableEnded: boolean; } /** Node's write return value controls backpressure; its callback acknowledges delivery. */ export declare const writeOutput: (stream: WritableOutput, channel: "stdout" | "stderr", content: string) => Effect.Effect; interface OutputStreamFacts extends TerminalSize { /** Result layout follows stdout even when it is a different terminal. */ readonly stdoutColumns: number; readonly stdoutIsTTY: boolean; readonly stderrIsTTY: boolean; } declare const OutputStreams_base: ServiceMap.ServiceClass Effect.Effect; readonly stderr: (content: string) => Effect.Effect; /** Write a credential and acknowledge the stream callback before succeeding. */ readonly credential: (content: string) => Effect.Effect; readonly facts: Effect.Effect; /** Re-raise a failed channel before the invocation reports completion. */ readonly check: Effect.Effect; readonly resize: Stream.Stream; }>; export declare class OutputStreams extends OutputStreams_base { } export declare const OutputStreamsLive: Layer.Layer; /** Pre-runtime TTY fact for startup policy without exposing Node streams. */ export declare const stderrIsTTY: () => boolean; /** * Write one diagnostic line to stderr outside the Screen, for process-level * observers that run before a Screen exists or after it settled. Like every * Screen write it owns the stream's failure, so a broken stderr fails the * write, typed, instead of the process. */ export declare const writeDiagnosticLine: (line: string) => Effect.Effect; interface TestOutputStreamsState { readonly stdout: Array; readonly stderr: Array; /** The terminal the streams report. A test narrows it, then offers a resize. */ size: TerminalSize; } export declare const makeTestOutputStreams: (options?: { readonly stdoutIsTTY?: boolean; readonly stderrIsTTY?: boolean; readonly columns?: number; readonly stdoutColumns?: number; readonly rows?: number; readonly resize?: Stream.Stream; }) => { readonly layer: Layer.Layer; readonly state: TestOutputStreamsState; }; export {}; //# sourceMappingURL=streams.d.ts.map