import type { CollectionSchema, FactoryStorageOps } from '@mastra/core/storage'; /** * One row per project whose `version` is replaced after every committed write to that project's * `work_items`. Readers of the full card list compare it against the version their snapshot was * taken at, so an unchanged board costs one indexed row read instead of every card. */ export declare const FACTORY_BOARD_VERSIONS_SCHEMA: CollectionSchema; /** A project, or every project in an org when a write's filter only names the org. */ export interface BoardScope { orgId: string; factoryProjectId?: string; } /** * Wrap `ops` so every write to `work_items` reports the board it changed, once the write has * resolved. Writes outside any tenant (`dangerouslyClearAll`) report nothing. */ export declare function trackBoardWrites(ops: FactoryStorageOps, changed: (scope: BoardScope) => void | Promise): FactoryStorageOps; /** Collects the boards a transaction changed so they can be bumped once it has committed. */ export declare class BoardScopes { #private; add: (scope: BoardScope) => void; values(): BoardScope[]; } export declare function bumpBoardVersions(ops: FactoryStorageOps, scopes: readonly BoardScope[]): Promise; export declare function readBoardVersion(ops: FactoryStorageOps, orgId: string, factoryProjectId: string): Promise; //# sourceMappingURL=board-version.d.ts.map