/**
 * The unified event reader -- one stream over BOTH operational events
 * (`~/.agents/.history/events/YYYY-MM-DD/` via events.ts: secrets, commands, teams, ...) and
 * agent-semantic events (the per-session activity logs via activity.ts: plans,
 * PRs, worktrees, sub-agents, artifacts). They share one {@link EventType}
 * vocabulary and one {@link EventRecord} shape, so `agents events` and any
 * higher-level feature (a session/project summarizer, RSS) read them together.
 *
 * The two write paths stay separate for efficiency -- operational events append
 * to the locked global log (low frequency), agent events append to lock-free
 * per-session shards (high frequency, one writer each). This module is the
 * single READ surface that merges them; nothing here writes.
 */
import { type EventRecord, type EventType, type EventLevel } from './feed/events.js';
import { type EventFamily } from './event-families.js';
export interface UnifiedQuery {
    startDate?: Date;
    endDate?: Date;
    eventTypes?: EventType[];
    /** Drop these event kinds after read (used by --exclude commands / runs). */
    excludeEventTypes?: EventType[];
    level?: EventLevel;
    /** Drop this level (used by --exclude security). */
    excludeLevel?: EventLevel;
    agent?: string;
    /** Only events stamped with this session id (payload `sessionId`, the provenance floor). */
    sessionId?: string;
    /** Only events carrying this bundle name in their payload (e.g. secrets events).
     * Combined with `sessionId`, answers "which session read this secrets bundle". */
    bundle?: string;
    caller?: string;
    command?: string;
    module?: string;
    limit?: number;
    /** Include agent-semantic activity events. Default true. */
    includeActivity?: boolean;
    /** Override the activity dir (tests). */
    activityRoot?: string;
    /** Sessions-style family filters (resolved via applyFamilies). */
    includeFamilies?: EventFamily[];
    excludeFamilies?: EventFamily[];
}
/**
 * Read a unified, newest-first event stream. Operational events come from
 * events.ts `query()`; agent-semantic events from the activity logs, normalized
 * to the same record shape and filtered identically. `limit` caps the merged
 * result (each source is fetched up to `limit` *after* its primary filters —
 * eventTypes for activity, eventTypes/module/bundle for ops — so the top-N is
 * exact for those filters).
 */
export declare function readUnifiedEvents(raw?: UnifiedQuery): EventRecord[];
