/**
 * HTTP Client for Runtime REST API
 *
 * Makes HTTP requests to the runtime server's REST endpoints.
 */
import type { AgentsResponse, AgentDetails } from '../types.js';
import { type FetchErrorCode } from '../utils/fetch.js';
export interface HealthCheckResult {
    reachable: boolean;
    status?: number;
    details?: Record<string, unknown>;
    error?: string;
    errorCode?: FetchErrorCode;
}
export declare class HttpClient {
    private baseUrl;
    private authToken;
    constructor(baseUrl?: string);
    /**
     * Set auth token for authenticated requests
     */
    setAuthToken(token: string): void;
    /**
     * Get the current auth token (if set).
     * @internal Use only for cross-service requests where HttpClient methods can't be used
     */
    getAuthToken(): string | null;
    /**
     * Get headers with optional auth
     */
    private getHeaders;
    /**
     * List all available agents
     */
    listAgents(): Promise<AgentsResponse>;
    /**
     * Get agent details
     */
    getAgent(_domain: string, name: string): Promise<AgentDetails | null>;
    /**
     * Runtime health check — hits GET /health with a 5s timeout.
     * Returns structured result with reachability, status, and details.
     */
    runtimeHealthCheck(): Promise<HealthCheckResult>;
    /**
     * Health check (deprecated — use runtimeHealthCheck() instead)
     * @deprecated
     */
    healthCheck(): Promise<boolean>;
    /**
     * Generic authenticated GET request.
     * Returns the parsed JSON body or throws on non-2xx responses.
     */
    get<T = unknown>(path: string): Promise<T>;
    /**
     * Generic authenticated POST request.
     * Returns the parsed JSON body or throws on non-2xx responses.
     */
    post<T = unknown>(path: string, body?: unknown): Promise<T>;
    /**
     * Generic authenticated PUT request.
     * Returns the parsed JSON body or throws on non-2xx responses.
     */
    put<T = unknown>(path: string, body?: unknown): Promise<T>;
    /**
     * Generic authenticated DELETE request.
     * Returns the parsed JSON body or throws on non-2xx responses.
     * Returns empty object for 204 No Content or zero-length responses.
     */
    del<T = unknown>(path: string): Promise<T>;
    /**
     * Set base URL
     */
    setBaseUrl(url: string): void;
    /**
     * Get base URL
     */
    getBaseUrl(): string;
}
//# sourceMappingURL=http-client.d.ts.map