import { SenpiClient } from "src/senpi/client.js"; import { StrategyState } from "./strategy.js"; import type { ContextBuilder } from "../context/types.js"; import { HookSystem, LlmDecision, NotificationService, RiskGuard } from "src/actions/types.js"; import type { ScannerRuntimeModule } from "../scanners/runtime-module.js"; import type { MaxLeverageCache } from "../leverage/max-leverage-cache.js"; import type { PositionIdRegistry } from "../runtime/position-id-registry.js"; import type { BackendPauseRegistry } from "../runtime/backend-pause-registry.js"; import type { PendingOpensLedger } from "../runtime/pending-opens-ledger.js"; export interface RuntimeContext { senpi: SenpiClient; hookSystem: HookSystem; llmDecision: LlmDecision; contextBuilder: ContextBuilder; riskGuard: RiskGuard; notifications: NotificationService; strategyState: StrategyState; scannerModule?: ScannerRuntimeModule; maxLeverageCache: MaxLeverageCache; /** * Cross-flow position.id state machine (mint on open, reuse on incr/decr/flip, clear on close). * Optional: actions degrade gracefully when absent (e.g. standalone scripts, older call sites). */ positionIdRegistry?: PositionIdRegistry; /** * Tracks strategies the backend rejected as paused/closed so signal handlers * stop submitting orders instead of re-firing every signal (TTL-based probe). * Optional: actions degrade gracefully when absent. */ backendPauseRegistry?: BackendPauseRegistry; /** * Opens already submitted but not yet visible in a clearinghouse snapshot, so the slot * gate, the dedupe check and the free-margin budget count them instead of racing the * exchange's 1–5s snapshot lag. * Optional: an action without one falls back to a private ledger, which is correct for a * single-action context and only loses cross-action sharing (standalone scripts, tests). */ pendingOpensLedger?: PendingOpensLedger; /** * Human strategy label (`group` when set, else `name`) every action-emitted * notification leads with as a `[label] ` prefix. Optional: absent in older * call sites / standalone scripts, which fall back to no prefix. */ notificationLabel?: string; } //# sourceMappingURL=runtime.d.ts.map