import * as Sentry from "@sentry/node";
/**
 * Initialize Sentry error tracking.
 * No-ops if SENTRY_DSN is not set (opt-in via env var).
 * Call this immediately after loadDotEnv() + normalizeEnv().
 */
export declare function initSentry(): void;
/**
 * Capture an error in Sentry with optional extra context.
 * No-ops if Sentry was not initialized.
 */
export declare function captureError(err: unknown, context?: Record<string, unknown>): void;
/**
 * Flush pending Sentry events before process exit.
 * Awaiting this ensures queued error reports are sent before the process terminates.
 */
export declare function flushSentry(timeoutMs?: number): Promise<void>;
/**
 * Add a breadcrumb to the current Sentry scope.
 * No-ops if Sentry was not initialized.
 */
export declare function addSentryBreadcrumb(crumb: Sentry.Breadcrumb): void;
/**
 * Set a named context object on the current Sentry scope.
 * No-ops if Sentry was not initialized.
 */
export declare function setSentryContext(name: string, data: Record<string, unknown>): void;
/**
 * Set a tag on the current Sentry scope.
 * No-ops if Sentry was not initialized.
 */
export declare function setSentryTag(key: string, value: string): void;
/**
 * Start a Sentry span wrapping the provided async function.
 * No-ops (calls fn directly) if Sentry was not initialized.
 */
export declare function startSentrySpan<T>(options: {
    op: string;
    name: string;
    attributes?: Record<string, string | number | boolean>;
}, fn: (span: Sentry.Span | undefined) => Promise<T>): Promise<T>;
/**
 * Run a function in a Sentry isolation scope so concurrent agent runs
 * don't bleed context into each other.
 * No-ops (calls fn directly) if Sentry was not initialized.
 */
export declare function withSentryIsolationScope<T>(fn: () => Promise<T>): Promise<T>;
