/** * ConnectorDeltaRepo - the real delta source for the trigger loop (M1-T1). * * Reads connector_event_index (mama-core main DB; migration 030:523-543): content, author, * channel are INLINE columns - no source_id/raw-store join. Ordering uses operator_ingest_seq, * which is PER-(source_connector, COALESCE(channel,'')) (migration 039), so this repo keeps a * per-partition read-cursor map persisted as JSON under ~/.mama - deliberately DISJOINT from * both the DB's own insert-assignment cursor table (connector_event_index_operator_seq_cursors) * and vNext's vnext_operator_cursors. At-least-once: drainNew() re-delivers until commit(). * * OperatorChannelEvent.id = SQLite rowid (global integer, satisfies the interface); * eventIndexId carries the stable TEXT PK for provenance. */ import type { OperatorChannelEvent } from './operator-interfaces.js'; /** Minimal structural DB interface - satisfied by both the standalone sqlite wrapper and the mama-core adapter. */ export interface DeltaDbLike { prepare(sql: string): { all: (...params: unknown[]) => unknown[]; }; } export declare class ConnectorDeltaRepo { private db; private cursorPath; private cursors; /** rowid -> partition/seq of events handed out by drainNew, awaiting commit. */ private pending; constructor(db: DeltaDbLike, cursorPath: string); /** Drain up to `limitPerPartition` new events from EACH (connector, channel) partition. */ drainNew(limitPerPartition: number): OperatorChannelEvent[]; /** Advance per-partition cursors past the given (processed) events and persist. */ commit(events: OperatorChannelEvent[]): void; } //# sourceMappingURL=connector-delta-repo.d.ts.map