import { Readable } from "node:stream"; import { Effect, Stream } from "effect"; import { type OperationError } from "../errors/index.js"; /** Collects all chunks from a Readable stream into a single Buffer. Interruption destroys the stream. */ export declare function streamToBuffer(stream: Readable): Effect.Effect; /** A Node `Readable` as an Effect `Stream` of byte chunks. */ export declare function fromReadable(stream: Readable): Stream.Stream; /** * Reads `len` bytes at byte offset `start` from an open file descriptor, * decoded as UTF-8. A short read (a signal can cut one short) is sliced to the * bytes actually read, so the decoder never sees the buffer's zero-filled tail * as NUL characters. */ export declare const readFdSlice: (fd: number, start: number, len: number) => Effect.Effect; /** * Reads `len` bytes at byte offset `start` of `path`, opening and closing its * own descriptor. The tail-by-offset primitive: remember the offset you stopped * at and ask for the bytes after it. */ export declare const readFileSlice: (path: string, start: number, len: number) => Effect.Effect; /** * Timestamp of a jsonl log envelope: its `timestamp` field when present and * parseable, else the current time. An entry with no usable stamp still has to * sort somewhere, and "now" keeps it at the fresh end. */ export declare const jsonlTimestamp: (entry: Record) => Effect.Effect;