/**
 * SQLiteAgentMessageBus — durable cross-process adapter for {@link IAgentMessageBus}.
 *
 * Wraps {@link IAgentMessageRepository} for persistence and runs a single
 * shared poll loop that periodically reads undelivered messages from the
 * shared SQLite database. Each subscription receives messages whose scope
 * matches its filter; messages are marked delivered_at after the first
 * read so the partial undelivered index stays small (research decision 2).
 *
 * Cross-process delivery is "free" by virtue of every Shep process opening
 * the same `~/.shep/<repo-hash>/shep.db` file in WAL mode — see CLAUDE.md
 * + research.yaml.
 */
import type { AgentMessageBusFilter, AgentMessageHandler, AgentMessageUnsubscribe, IAgentMessageBus } from '../../../../application/ports/output/agents/agent-message-bus.interface.js';
import type { IAgentMessageRepository } from '../../../../application/ports/output/repositories/agent-message-repository.interface.js';
import type { AgentMessage } from '../../../../domain/generated/output.js';
export declare class SQLiteAgentMessageBus implements IAgentMessageBus {
    private readonly repository;
    private readonly subscriptions;
    private pollIntervalMs;
    private timer;
    private polling;
    constructor(repository: IAgentMessageRepository);
    /** Test-only override; production code relies on {@link DEFAULT_POLL_INTERVAL_MS}. */
    setPollIntervalMs(ms: number): void;
    publish(message: AgentMessage): Promise<void>;
    subscribe(filter: AgentMessageBusFilter, handler: AgentMessageHandler): AgentMessageUnsubscribe;
    listFor(filter: AgentMessageBusFilter, limit?: number): Promise<AgentMessage[]>;
    /**
     * Stop the poll loop. Idempotent. Tests should call this in afterEach to
     * avoid leaking the interval; production code can rely on process exit.
     */
    shutdown(): void;
    private ensurePolling;
    private stopPolling;
    private pollOnce;
}
//# sourceMappingURL=sqlite-agent-message-bus.d.ts.map