import type { MatcherResult, MatcherMethod } from './types.js';
export interface MatcherSession {
    results: MatcherResult[];
    startedAt: number;
}
/**
 * Run `fn` with a fresh, isolated matcher session and return the verdicts
 * recorded during it. Concurrency-safe: each call gets its own session via
 * AsyncLocalStorage, so interleaved bodies never share verdicts.
 *
 * Results are returned even when `fn` throws — the caller can inspect both
 * the partial results and the error (cleanup hooks that record after a body
 * failure therefore still surface in the breakdown).
 */
export declare function runInSession<T>(fn: () => Promise<T> | T): Promise<{
    results: MatcherResult[];
    value?: T;
    error?: unknown;
}>;
/**
 * Begin a fresh global session and make it active (legacy API).
 *
 * Prefer {@link runInSession} for anything that may run concurrently. This
 * remains for synchronous, single-threaded callers.
 */
export declare function startSession(): MatcherSession;
/** Stop the current global session and return its results (legacy API). */
export declare function endSession(): MatcherResult[];
/** True when a session is active (ALS scope or legacy global). */
export declare function isSessionActive(): boolean;
/** Record a single matcher verdict on the active session. No-op when none. */
export declare function recordVerdict(result: MatcherResult): void;
/**
 * Record a verdict computed from a try/catch around the matcher body.
 * Convenience wrapper used by judge() and traces helpers; chai matchers go
 * through the chai plugin in `./expect.ts`.
 */
export declare function recordWithTiming<T>(description: string, method: MatcherMethod, fn: () => Promise<T> | T): Promise<T>;
//# sourceMappingURL=session.d.ts.map