/**
 * Message queue service for agent sessions.
 *
 * Each agent session maintains a FIFO queue of pending messages.
 * When Claude is busy processing a message, new messages are queued.
 * Once the current message finishes, the next one in the queue is processed.
 *
 * Queue limit: MAX_QUEUE_PER_PROJECT (50) per session.
 */
export interface QueuedMessage {
    projectPath: string;
    content: string;
    sessionId: string;
    requestId: string;
    agentSessionId: string;
}
export type ProcessFn = (msg: QueuedMessage) => Promise<void>;
/**
 * Initialize a queue for a session with its process function.
 * Must be called before enqueueMessage for a given session.
 */
export declare function initQueue(agentSessionId: string, processFn: ProcessFn): void;
/**
 * Enqueue a message for a session.
 *
 * @returns "started" if the message will be processed immediately,
 *          "queued" if it was added to the queue behind a running process,
 *          "full" if the queue has reached the limit (reject with daemon_busy).
 */
export declare function enqueueMessage(msg: QueuedMessage): "started" | "queued" | "full";
/**
 * Start draining the queue for a session.
 * Call this AFTER sending the response to the client to avoid race conditions
 * where events fire before the response is sent.
 */
export declare function startDrain(agentSessionId: string): void;
/**
 * Check if a session is currently processing a message.
 */
export declare function isProcessing(agentSessionId: string): boolean;
/**
 * Get the number of pending messages in the queue.
 */
export declare function getQueueSize(agentSessionId: string): number;
/**
 * Clear the queue for a session (e.g. on cancel).
 * Does NOT stop the currently processing message.
 */
export declare function clearQueue(agentSessionId: string): void;
/**
 * Remove all state for a session.
 */
export declare function removeSession(agentSessionId: string): void;
/**
 * Clear all queues (used during shutdown).
 */
export declare function clearAllQueues(): void;
//# sourceMappingURL=message-queue.d.ts.map