import { EventQueue as IEventQueue, QueueOptions } from "@agentxjs/types/queue";
/**
* Create an EventQueue instance
*
* @param options - Queue configuration
* @returns EventQueue instance
*
* @example
* ```typescript
* import { createQueue } from "@agentxjs/queue";
*
* const queue = createQueue({ path: "./data/queue.db" });
*
* // Subscribe to events
* queue.subscribe("session-123", (entry) => {
*   console.log("Received:", entry.event);
* });
*
* // Publish events
* const cursor = queue.publish("session-123", { type: "message", text: "hello" });
*
* // ACK after processing
* await queue.ack("client-1", "session-123", cursor);
*
* // Recover on reconnection
* const lastCursor = await queue.getCursor("client-1", "session-123");
* const missed = await queue.recover("session-123", lastCursor);
* ```
*/
declare function createQueue(options: QueueOptions): IEventQueue;
/**
* CursorGenerator - Generates monotonically increasing cursors
*
* Format: "{timestamp_base36}-{sequence_padded}"
* Example: "lq5x4g2-0001"
*
* This format ensures:
* - Lexicographic ordering matches temporal ordering
* - Multiple events in same millisecond get unique cursors
* - Human-readable and compact
*/
declare class CursorGenerator {
	private lastTimestamp;
	private sequence;
	/**
	* Generate a new cursor
	*/
	generate(): string;
	/**
	* Compare two cursors
	* @returns negative if a < b, 0 if a == b, positive if a > b
	*/
	static compare(a: string, b: string): number;
}
import { EventQueue, QueueEntry, QueueOptions as QueueOptions2, Unsubscribe } from "@agentxjs/types/queue";
export { createQueue, Unsubscribe, QueueOptions2 as QueueOptions, QueueEntry, EventQueue, CursorGenerator };
