/**
 * SupermemoryProvider — Cloud-backed MemoryProvider using the Supermemory REST API.
 *
 * Authenticates via Bearer token, supports project scoping via x-sm-project header.
 * All data lives in Supermemory's cloud — sync() is a no-op since it's cloud-native.
 *
 * API base: https://api.supermemory.com/v3
 */
import type { MemoryProvider, ProviderConfig, MemoryInput, Memory, MemoryRelation, RecallOptions, ListOptions, UserProfile, SyncResult } from "./memoryProvider.js";
export declare class SupermemoryError extends Error {
    readonly statusCode?: number | undefined;
    readonly responseBody?: string | undefined;
    constructor(message: string, statusCode?: number | undefined, responseBody?: string | undefined);
}
export declare class SupermemoryAuthError extends SupermemoryError {
    constructor(message?: string);
}
export declare class SupermemoryRateLimitError extends SupermemoryError {
    readonly retryAfterMs?: number | undefined;
    constructor(retryAfterMs?: number | undefined);
}
export declare class SupermemoryProvider implements MemoryProvider {
    readonly name = "supermemory";
    readonly type: "supermemory";
    private config;
    private connected;
    private baseUrl;
    private apiKey;
    private projectId?;
    connect(config: ProviderConfig): Promise<void>;
    disconnect(): Promise<void>;
    isConnected(): boolean;
    private ensureConnected;
    private request;
    store(memory: MemoryInput): Promise<string>;
    update(id: string, memory: MemoryInput): Promise<void>;
    delete(id: string): Promise<void>;
    recall(query: string, options?: RecallOptions): Promise<Memory[]>;
    get(id: string): Promise<Memory | null>;
    list(options?: ListOptions): Promise<Memory[]>;
    relate(fromId: string, toId: string, relation: MemoryRelation): Promise<void>;
    getProfile(userId?: string): Promise<UserProfile | null>;
    /**
     * Fallback: build a basic UserProfile by listing memories for the user.
     * Used when the API doesn't have a dedicated profile endpoint.
     */
    private buildProfileFromList;
    sync(direction: "push" | "pull" | "both"): Promise<SyncResult>;
    /**
     * Convert a Supermemory API memory response to the MemoryProvider Memory type.
     * Supermemory stores scope/tags/source inside metadata — we extract them.
     */
    private apiMemoryToMemory;
    /**
     * Convert a Supermemory search result to a Memory with relevance score.
     */
    private searchResultToMemory;
}
