/** * DslPlugin construction options (dependency injection and paths). */ import type { SenpiClient } from "../../senpi/client.js"; import type { SenpiEventBus } from "../events/index.js"; import type { ExitBlockConfig } from "../config/index.js"; import type { StateManager } from "../../state/index.js"; import type { StrategyState } from "../../types/strategy.js"; import type { NotificationService } from "../../types/notification.js"; import type { IdentityEnvelope } from "../../telemetry/identity.js"; export interface DslPluginOptions { config: ExitBlockConfig; bus: SenpiEventBus; stateDir?: string; /** When provided, use this hydrated StateManager instead of creating one (caller must have started it). */ stateManager?: StateManager; /** * Still required for getMarketPrices in the price monitor tick. * No longer used for position mutations or order status — those go through strategyStates. */ senpiClient?: SenpiClient; /** * DSL routes position operations (editPosition, closePosition, getOrderStatus) through these * objects. Keyed by strategy address (= wallet address). Runtime should pass createRuntimeContext.strategyStates. * When omitted, placeholder StrategyState instances are built from directories under stateDir (see DslPlugin.create). */ strategyStates?: Map; /** * When set, DSL lifecycle bus events are forwarded to this service. The runtime always * passes its notification service; per-user delivery control lives in the Notification * Service, not here. */ notifications?: NotificationService; /** * When true, adoptPosition / resizePosition will call editPosition to place the exchange SL * immediately. Default false — the monitor places a missing SL on its next tick via * shouldSyncExchangeSl (slOrderId === null). */ placeSlOnAdopt?: boolean; /** * (T6b) Serializes the monitor's periodic reconcile execute-pass against the trade loop and the * boot reconcile. Runtime passes a `reconcileMutex`-backed serializer (same `"reconcile"` key as * the consumer). When omitted, the monitor reconcile falls back to archive-only behavior. */ reconcileSerialize?: (fn: () => Promise) => Promise; /** * (T6b) Called by the monitor when a periodic reconcile succeeds, so a slow boot reconcile does * not keep the trade gate closed. Runtime passes a callback that sets `gateResolvedAt` and * resolves the reconcile gate (idempotent). When omitted, the monitor reconcile is archive-only. */ reconcileGateResolve?: () => void; /** Lazy runtime identity builder; used to stamp per-trace identity at the dsl.tick seam. */ identity?: () => IdentityEnvelope; } //# sourceMappingURL=options.d.ts.map