export interface StoredEvent {
    /** Monotonically increasing ID from the ingestor */
    id: number;
    /**
     * Idempotency key for deduplication.
     * Derived from service-specific unique identifiers when available
     * (e.g., GitHub delivery ID, Stripe event ID, Slack envelope ID).
     * Falls back to `${source}:${id}` for services without natural keys.
     */
    idempotencyKey?: string;
    /** ISO-8601 timestamp from the proxy */
    receivedAt: string;
    /** Unix timestamp (ms) when the event was received by the ingestor */
    receivedAtMs?: number;
    /** Caller alias that owns this event (e.g. "default", "alice") */
    callerAlias: string;
    /** Connection alias / route name (e.g. "discord-bot", "github") */
    source: string;
    /** Instance ID for multi-instance listeners (e.g. "project-board").
     *  Omitted for single-instance connections. */
    instanceId?: string;
    /** Source-specific event type (e.g. "MESSAGE_CREATE", "push") */
    eventType: string;
    /** Raw payload from external service */
    data: unknown;
    /** Local write timestamp (epoch ms) */
    storedAt: number;
}
/**
 * Append an event to the connection's log file.
 *
 * Returns the stored event on success, or `null` if the event was a
 * duplicate (same idempotency key already seen).
 */
export declare function appendEvent(event: {
    id: number;
    idempotencyKey?: string;
    receivedAt: string;
    receivedAtMs?: number;
    callerAlias: string;
    source: string;
    instanceId?: string;
    eventType: string;
    data: unknown;
}): StoredEvent | null;
export interface GetEventsOptions {
    limit?: number;
    offset?: number;
    /** Filter by instance ID (multi-instance listeners only) */
    instanceId?: string;
}
/**
 * Read events for a specific caller + connection, newest first.
 */
export declare function getEvents(callerAlias: string, source: string, opts?: GetEventsOptions): StoredEvent[];
/**
 * Get events across all connections for a specific caller, newest first.
 */
export declare function getAllEvents(callerAlias: string, opts?: GetEventsOptions): StoredEvent[];
/**
 * List all connection aliases that have stored events for a specific caller.
 */
export declare function listEventSources(callerAlias: string): string[];
//# sourceMappingURL=event-log.d.ts.map