/** * Subscribes to DSL_EVENTS on the bus and forwards formatted strings to NotificationService. */ import type { SenpiEventBus } from "../events/index.js"; import type { NotificationPayload, NotificationService } from "../../types/notification.js"; import { type NotifiedStopMeta } from "./stop-raise-debounce.js"; export interface DslNotificationSubscriber { dispose(): void; } export declare function safeNotify(notifier: NotificationService, input: string | NotificationPayload): void; /** * Persisted per-position notification baseline, backed by the DSL state manager. * Optional: when absent (e.g. standalone/dev wiring or a bare test), the * subscriber falls back to the in-memory ratchet alone and behaves exactly as * before. When present it makes a retreat impossible to re-announce across a * rebuild (fresh correlationId) or a process restart. */ export interface DslNotifiedFloorStore { /** Most-favorable floor already announced for this position, or undefined if none. */ getLastNotifiedStopFloor(ev: { address: string; asset: string; }): Promise; /** * Record `floor` as announced, advancing the persisted baseline favorably only * (higher LONG / lower SHORT). A no-op when it would retreat the baseline. * * `meta` (notifications 2.6) carries the debounce bookkeeping stamped with the * same announcement: the cooldown anchor and the breakeven latch. Optional so * pre-2.6 store implementations (and test fakes) remain valid. */ stampNotifiedStopFloor(ev: { address: string; asset: string; }, floor: number, direction: "LONG" | "SHORT", meta?: { atMs?: number; breakevenAnnounced?: boolean; }): Promise; /** * Full announced-state snapshot for the debounce gate (floor + cooldown anchor * + breakeven latch). Optional: a store without it degrades to the floor-only * read and the debounce seeds its timing in-memory. */ getNotifiedStopMeta?(ev: { address: string; asset: string; }): Promise; } export declare function createDslNotificationSubscriber(bus: SenpiEventBus, notifier: NotificationService, store?: DslNotifiedFloorStore): DslNotificationSubscriber; //# sourceMappingURL=index.d.ts.map