/** Identifier of a scanner definition/instance within a strategy runtime. */ export type ScannerId = string; /** Strategy identifier: wallet address. */ export type StrategyId = string; /** Execution outcome classification returned by the scanner engine. */ export declare enum ScanStatus { OK = "ok", HEARTBEAT = "heartbeat", SKIPPED = "skipped", HALTED = "halted", DISABLED = "disabled", ERROR = "error" } /** * Normalized scanner signal. * Produced by scanners, then validated/enriched by the engine before persistence. */ export interface Signal { /** Strategy (wallet address) that emitted this signal. */ address: string; /** Scanner identifier that emitted this signal. */ scannerId: ScannerId; /** Domain-specific signal type (for example MOMENTUM_BREAKOUT). */ signalType: string; /** Asset symbol/name the signal refers to. */ asset: string; /** Trade direction, or null for non-directional signals. */ direction: "LONG" | "SHORT" | null; /** Confidence score normalized to [0, 1]. */ score: number; /** Unix timestamp in milliseconds. */ timestamp: number; /** Explainable boolean factors used in scoring/gating. */ factors: Record; /** Extra scanner-specific metadata for downstream consumers. */ meta: Record; /** * Per-signal margin as a percent (0–100) of withdrawable. When set, the open * action sizes the position to `marginPct% × withdrawable`, overriding config * sizing. Same basis + units as config `margin_pct`. */ marginPct?: number; /** Per-signal leverage override. When set, overrides config default leverage. */ leverage?: number; /** * Producer-minted idempotency key carried from intake (the scaffold journal eid). * Present on signals built from a supervised external-scanner ingest; absent on * internally-produced signals. Observability only — used to grep one signal across * the intake→ingest hops; it does not survive the decision engine and never sizes, * gates, or routes a trade. */ signal_id?: string; /** * Producer-minted id of the scan that produced this signal, carried from intake. A batch ingest * can mix ticks — a scaffold retry rides along with fresh signals — so it lives per signal, not * per run. Observability only, like {@link Signal.signal_id}: never sizes, gates, or routes. */ tick_id?: string; } /** Canonical persisted execution result produced by the engine. */ export interface ScanResult { /** Strategy (wallet address) this run belongs to. */ address: string; /** Scanner executed in this run. */ scannerId: ScannerId; /** Final run status after hooks and scanner execution. */ status: ScanStatus; /** Result timestamp in unix milliseconds. */ timestamp: number; /** Normalized output signals. */ signals: Signal[]; /** Count of signals passing actionability rules. */ actionableCount: number; /** Number of evaluated candidates. */ scannedCount: number; /** Optional explanation for non-OK status. */ reason?: string; /** Aggregated run metrics/details. */ summary: Record; /** Telemetry-owned per-run id; join key linking scanner.run → signal.process. */ runId?: string; /** * Id of the scan that produced this run's signals. Minted by the engine for an interval * scan, adopted from the producer for an external ingest — one producer scan fans out to * several ingests, so re-minting per ingest would lose the fan-out. Absent when an external * producer sends none. */ tickId?: string; /** Intake-minted id of the acceptance row that admitted an externally ingested signal. */ correlationId?: string; } //# sourceMappingURL=scanner.d.ts.map