import type { Config } from "../config.js";
import type { RequestOptions } from "./types.js";
/**
 * Optional per-request account ID resolver. When provided, HarnessClient
 * calls this to get the real account ID (e.g. from JWT claims stored in
 * AsyncLocalStorage) instead of using the static config value.
 */
export type AccountIdResolver = () => string | undefined;
export declare class HarnessClient {
    private readonly baseUrl;
    private readonly token;
    private readonly accountId;
    private readonly timeout;
    private readonly maxRetries;
    private readonly rateLimiter;
    private readonly logUnsafeBodies;
    private accountIdResolver?;
    private currentUserId?;
    private currentUserPromise?;
    constructor(config: Config);
    /**
     * Set a per-request account ID resolver. When set, resolveAccountId()
     * calls this first, falling back to the static config value.
     */
    setAccountIdResolver(resolver: AccountIdResolver): void;
    /** Resolve the account ID: per-request override → static config fallback. */
    private resolveAccountId;
    get account(): string;
    get baseURL(): string;
    /**
     * Resolve the UUID of the user authenticated by the current PAT.
     * Cached for the lifetime of the process and inflight-deduped so concurrent
     * callers share a single GET /ng/api/user/currentUser request.
     *
     * Used by callers (e.g. STO exemption approve/reject/promote) that need to
     * stamp the authenticated user as the actor without forcing the LLM to ask
     * the human for a UUID.
     */
    getCurrentUserId(): Promise<string>;
    request<T>(options: RequestOptions): Promise<T>;
    /**
     * Make a request and return the raw Response (for streaming).
     * Reuses auth, URL building, rate limiting, and retry on non-OK status
     * (before body consumption). Caller is responsible for reading the body.
     */
    requestStream(options: RequestOptions): Promise<Response>;
    private buildUrl;
}
//# sourceMappingURL=harness-client.d.ts.map