import type { ModelMessage, StepResult, ToolSet } from 'ai';
import type { AgentSessionState } from '../types';
/**
 * Interface for persisting agent session state.
 *
 * Implementations can use in-memory storage, databases,
 * or external services like Redis.
 */
export interface AgentSessionStore {
    /**
     * Get a session by ID.
     */
    get(sessionId: string): Promise<AgentSessionState | null>;
    /**
     * Create a new session.
     */
    create(session: Omit<AgentSessionState, 'createdAt' | 'updatedAt'>): Promise<AgentSessionState>;
    /**
     * Append a step to a session.
     */
    appendStep(sessionId: string, step: StepResult<ToolSet>): Promise<void>;
    /**
     * Append a message to a session.
     */
    appendMessage(sessionId: string, message: ModelMessage): Promise<void>;
    /**
     * Update session properties.
     */
    update(sessionId: string, updates: Partial<Pick<AgentSessionState, 'status' | 'metadata' | 'workflowId' | 'threadId' | 'traceId' | 'checkpointId' | 'pendingApprovalRequestId' | 'lastError'>>): Promise<void>;
    /**
     * Delete a session.
     */
    delete(sessionId: string): Promise<boolean>;
    /**
     * List sessions by agent ID.
     */
    listByAgent(agentId: string, limit?: number): Promise<AgentSessionState[]>;
    /**
     * List sessions by tenant ID.
     */
    listByTenant(tenantId: string, limit?: number): Promise<AgentSessionState[]>;
}
export interface InMemorySessionStoreOptions {
    maxSessions?: number;
    maxMessagesPerSession?: number;
    maxStepsPerSession?: number;
}
/**
 * In-memory session store for development and testing.
 */
export declare class InMemorySessionStore implements AgentSessionStore {
    private readonly sessions;
    private readonly maxSessions;
    private readonly maxMessagesPerSession;
    private readonly maxStepsPerSession;
    constructor(options?: InMemorySessionStoreOptions);
    get(sessionId: string): Promise<AgentSessionState | null>;
    create(session: Omit<AgentSessionState, 'createdAt' | 'updatedAt'>): Promise<AgentSessionState>;
    appendStep(sessionId: string, step: StepResult<ToolSet>): Promise<void>;
    appendMessage(sessionId: string, message: ModelMessage): Promise<void>;
    update(sessionId: string, updates: Partial<Pick<AgentSessionState, 'status' | 'metadata' | 'workflowId' | 'threadId' | 'traceId' | 'checkpointId' | 'pendingApprovalRequestId' | 'lastError'>>): Promise<void>;
    delete(sessionId: string): Promise<boolean>;
    listByAgent(agentId: string, limit?: number): Promise<AgentSessionState[]>;
    listByTenant(tenantId: string, limit?: number): Promise<AgentSessionState[]>;
    /**
     * Clear all sessions (for testing).
     */
    clear(): void;
    private evictIfNeeded;
    private trimArray;
}
/**
 * Create an in-memory session store.
 */
export declare function createInMemorySessionStore(options?: InMemorySessionStoreOptions): AgentSessionStore;
/**
 * Generate a unique session ID.
 */
export declare function generateSessionId(): string;
