/**
* Shared error helpers. Leaf module: no config, no I/O, so every other module
* (and every consumer) can import it.
*/
import { Effect } from "effect";
/** Human-readable text for an arbitrary thrown/failed value. */
export declare function causeMessage(cause: unknown): string;
declare const OperationError_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: "OperationError";
} & Readonly;
/**
* The one wrapper for code that crosses an untyped boundary: a synchronous call
* that may throw (better-sqlite3, cbor, `node:fs`), a Promise API, a dynamic
* `import()`. `source` names the module, `operation` the step; the message
* reads `operation: cause` so a boundary renderer never prints a bare tag.
*
* Domain failures with fields consumers match on (`CorruptRowError`,
* `PushoverError`, `InvalidScheduleError`, ...) stay their own tagged classes.
* This exists so a module does not mint a per-file `XError { cause: unknown }`
* that nothing ever matches by tag.
*/
export declare class OperationError extends OperationError_base<{
readonly source: string;
readonly operation: string;
readonly cause: unknown;
}> {
get message(): string;
}
export interface OperationErrors {
/** `Effect.mapError` / `catch` callback that tags a failure. */
readonly wrap: (operation: string) => (cause: unknown) => OperationError;
/** Run a synchronous, possibly-throwing computation. */
readonly sync: (operation: string, evaluate: () => A) => Effect.Effect;
/** Adopt a Promise API. Interruption aborts the signal. */
readonly promise: (operation: string, evaluate: (signal: AbortSignal) => PromiseLike) => Effect.Effect;
}
/** Per-module boundary helpers: `const io = operationErrors("docstore")`. */
export declare function operationErrors(source: string): OperationErrors;
export {};