/**
 * `agents events` — read the unified event stream (the one ops/timeline product).
 *
 * One stream over BOTH operational events (`~/.agents/.history/events/YYYY-MM-DD/`:
 * every `agents <module> <cmd>` invocation plus typed events like secrets access,
 * browser/computer, daemon lifecycle, version installs) AND agent-semantic events
 * (per-session activity: plans, PRs, worktrees, sub-agents, artifacts). Run-dispatch
 * outcomes land here as `run.dispatched` (readable via `--include runs`).
 *
 * `agents events audit` and `agents logs` are thin aliases of this command.
 *
 * Filter with sessions-style `--include` / `--exclude` families (ops, activity,
 * commands, runs, security) plus field filters (`--module`, `--event`, …).
 */
import type { Command } from 'commander';
/**
 * Resolve `--limit` into a record cap. `0` means "no cap" — without it there is
 * no way to read the whole stream, and any aggregation (group-by failure, count
 * per module) silently ranks the newest 50 records instead of the real set.
 * A non-numeric or negative value is a usage error, not a quiet fallback.
 */
export declare function resolveEventsLimit(raw: string | undefined): number | undefined;
/**
 * Cap `fetched` (read with `limit + 1`) to `limit`, reporting whether records
 * were dropped. The caller announces the cap so a truncated read is never
 * mistaken for the complete set.
 */
export declare function capRecords<T>(fetched: T[], limit: number | undefined): {
    records: T[];
    truncated: boolean;
};
export interface EventsOptions {
    module?: string;
    command?: string;
    event?: string[];
    agent?: string;
    caller?: string;
    level?: string;
    session?: string;
    bundle?: string;
    since?: string;
    limit?: string;
    json?: boolean;
    follow?: boolean;
    /** @deprecated Prefer --include ops / --exclude activity */
    audit?: boolean;
    include?: string;
    exclude?: string;
}
/** Add the one canonical event-reader option surface to a command or alias. */
export declare function addEventsReadOptions(command: Command, includeAuditFlag?: boolean): Command;
/** Canonical reader used by `agents events`, `agents events audit`, and `agents logs`. */
export declare function runEventsCommand(options: EventsOptions, forceAudit?: boolean): Promise<void>;
/** Shared by `events stats` and the `logs stats` alias. */
export declare function runEventsStats(opts: {
    since?: string;
    json?: boolean;
}): Promise<void>;
export declare function registerEventsCommand(program: Command): void;
/** Shared by `events rotate` and the `logs rotate` alias. */
export declare function runEventsRotate(opts: {
    days?: string;
    maxMb?: string;
}): void;
