import type { DatabaseSync } from "node:sqlite"; import type { Context } from "@/types"; import type { ChannelDbRecord, ChannelMemberDbRecord } from "./databaseTypes.js"; /** * Channels repository backed by SQLite with write-through caching. * Expects: schema migrations already applied for channels and channel_members. */ export declare class ChannelsRepository { private readonly db; private readonly channelsById; private readonly channelIdByName; private readonly channelLocks; private readonly cacheLock; private readonly createLock; private allChannelsLoaded; constructor(db: DatabaseSync); create(record: ChannelDbRecord): Promise; findById(id: string): Promise; findByName(name: string): Promise; findMany(ctx: Context): Promise; findAll(): Promise; update(id: string, data: Partial): Promise; delete(id: string): Promise; addMember(channelId: string, record: Omit & { channelId?: string; }): Promise; removeMember(channelId: string, agentId: string): Promise; findMembers(channelId: string): Promise; private channelCacheSet; private channelLoadById; private channelParse; private channelLockForId; } //# sourceMappingURL=channelsRepository.d.ts.map