import { type ApplicationErrorReporterInitializer, ApplicationErrorReporterInitializerName } from "../extensions/observability/application-error-reporter.js"; import type { ApplicationErrorContext, ApplicationErrorReporter } from "./application-error-contract.js"; export type { ApplicationErrorReporterInitializationContext, ApplicationErrorReporterInitializer, ApplicationErrorReporterSession, } from "../extensions/observability/application-error-reporter.js"; export type { ApplicationErrorAttributeValue, ApplicationErrorContext, ApplicationErrorReporter, } from "./application-error-contract.js"; export { ApplicationErrorReporterInitializerName }; /** Active application-error reporter ownership. */ export type ApplicationErrorReporterLifecycle = { readonly enabled: boolean; capture(error: unknown, context: ApplicationErrorContext): string | undefined; flush(timeoutMs?: number): Promise; dispose(): Promise; }; /** * Publish an unowned reporter directly, taking over from any active lifecycle. * * Direct replacement is a supported sequential handover: an active lifecycle * keeps its session and stays responsible for disposing it, but stops owning * the published reporter, so its capture/flush degrade to no-ops and its * dispose leaves the newly published reporter in place. * * Replacement during an in-flight initialization is rejected instead, because * that initialization publishes unconditionally once it settles and would * silently discard the reporter installed here. */ export declare function setApplicationErrorReporter(nextReporter: ApplicationErrorReporter | undefined): void; /** * Activate an explicitly selected reporter initializer. * * The latest initialization owns the process reporter. A superseded * initialization disposes the session it created instead of publishing stale * state. Provider initialization and disposal failures are not converted into * disabled/no-op behavior. */ export declare function initializeApplicationErrorReporter(options: { initializer?: ApplicationErrorReporterInitializer; serviceName: string; }): Promise; export declare function captureApplicationError(error: unknown, context: ApplicationErrorContext): string | undefined; export declare function flushApplicationErrors(timeoutMs?: number): Promise; export declare function isExpectedApplicationError(error: unknown): boolean; //# sourceMappingURL=application-errors.d.ts.map