/**
 * HTTP client wrapper for `hippo serve`.
 *
 * Mirrors the function signatures in src/api.ts so the CLI can route through
 * either path uniformly. Each function takes (serverUrl, apiKey?, ...) and
 * returns the same shape that api.ts would.
 *
 * Errors from the server (4xx/5xx) are mapped back into thrown Errors with
 * the server's `error` message preserved verbatim so existing CLI handlers
 * that match on substrings (e.g. "not found", "already superseded") still
 * work unchanged.
 *
 * Network errors (ECONNREFUSED on a stale pidfile, etc.) propagate as the
 * native fetch failure so the caller can detect them and self-heal.
 */
import type { AuditEvent } from './audit.js';
import type { ApiKeyListItem } from './auth.js';
import type { RememberOpts, RememberResult, RecallOpts, RecallResult, AuthCreateOpts, AuthCreateResult, AuditListOpts } from './api.js';
export declare function remember(serverUrl: string, apiKey: string | undefined, opts: RememberOpts): Promise<RememberResult>;
export declare function recall(serverUrl: string, apiKey: string | undefined, opts: RecallOpts): Promise<RecallResult>;
export declare function forget(serverUrl: string, apiKey: string | undefined, id: string): Promise<{
    ok: true;
    id: string;
}>;
export declare function promote(serverUrl: string, apiKey: string | undefined, id: string): Promise<{
    ok: true;
    sourceId: string;
    globalId: string;
}>;
export declare function supersede(serverUrl: string, apiKey: string | undefined, oldId: string, newContent: string): Promise<{
    ok: true;
    oldId: string;
    newId: string;
}>;
export declare function archiveRaw(serverUrl: string, apiKey: string | undefined, id: string, reason: string): Promise<{
    ok: true;
    archivedAt: string;
}>;
export declare function authCreate(serverUrl: string, apiKey: string | undefined, opts: AuthCreateOpts): Promise<AuthCreateResult>;
export declare function authList(serverUrl: string, apiKey: string | undefined, opts: {
    active: boolean;
}): Promise<ApiKeyListItem[]>;
export declare function authRevoke(serverUrl: string, apiKey: string | undefined, keyId: string): Promise<{
    ok: true;
    revokedAt: string;
}>;
export declare function auditList(serverUrl: string, apiKey: string | undefined, opts: AuditListOpts): Promise<AuditEvent[]>;
/**
 * True for fetch failures that look like "server not actually running" (the
 * pidfile said one was, but the connection refused, or DNS / abort errors).
 * The CLI uses this to detect a stale pidfile and self-heal back to direct mode.
 */
export declare function isConnectionRefused(err: unknown): boolean;
//# sourceMappingURL=client.d.ts.map