import { SqliteConnection } from "./connection.js"; import { TriggerState, TriggerStore } from "@graphorin/core/contracts"; //#region src/trigger-store.d.ts /** * Default `TriggerStore` implementation. Backs the `@graphorin/triggers` * scheduler with persistent rows so cron / interval / idle / event * triggers survive process restarts (DEC-150). * * Concurrency contract: two scheduler PROCESSES over one * database file are not a supported deployment (see the storage guide's * concurrency matrix). `recordFire` still carries a monotonic * wall-clock fence as best-effort defense in depth for that * unsupported case - a duplicate fixation with the same-or-earlier * `firedAt` is a no-op instead of rewinding trigger state. * * @stable */ declare class SqliteTriggerStore implements TriggerStore { #private; constructor(conn: SqliteConnection); upsert(state: TriggerState): Promise; get(id: string): Promise; list(): Promise>; remove(id: string): Promise; /** * Persist a fire. The update carries a monotonic fence - * a call whose `firedAt` is not strictly later than the stored * `last_fired_at` changes nothing, so a second (unsupported) * scheduler process re-fixing an old fire cannot rewind * `next_fire_at`/`missed_fires`. The fence is wall-clock ms: * two processes with the IDENTICAL `firedAt` both pass - accepted * as best-effort for a deployment the docs already exclude. The * in-process scheduler always calls this once per fire with a fresh * timestamp, so supported behaviour is unchanged. */ recordFire(id: string, firedAt: string, nextFireAt?: string): Promise; } //#endregion export { SqliteTriggerStore }; //# sourceMappingURL=trigger-store.d.ts.map