import type { HookEvent } from "../types/hooks.js"; import type { StrategyState } from "../types/strategy.js"; import type { ScannerRuntimeModule } from "../scanners/runtime-module.js"; export interface SignalContextEntry { type: "signal"; scanner: string; } export interface ScannerContextEntry { type: "context"; scanner: string; } export interface StrategyContextEntry { type: "strategy"; value: string; } export interface AssetTrendContextEntry { type: "asset-trend"; value: string; } /** Single action-context entry parsed from YAML. */ export type ContextEntry = SignalContextEntry | ScannerContextEntry | StrategyContextEntry | AssetTrendContextEntry; /** * Stable result key for one context entry inside the built context record. * * Scanner-derived context is intentionally namespaced as `signal_` or * `context_`. This keeps prompt interpolation aligned with the runtime * action-context model and avoids reintroducing the older flat placeholder * aliases that could collide with unrelated keys. */ export declare function contextEntryKey(entry: ContextEntry): string; /** Reads retained scanner context by source scanner id for the given strategy address. */ export type ScannerContextReader = (address: string, scannerId: string) => Promise; /** Request passed to every context provider. */ export interface ContextProviderRequest { event: HookEvent; address?: string; strategyState?: StrategyState; scannerModule?: ScannerRuntimeModule; /** Optional reader for scanner-produced retained context. */ readScannerContext?: ScannerContextReader; } /** A typed resolver that produces context data. */ export interface ContextProvider { readonly type: string; resolve(request: ContextProviderRequest, entry: ContextEntry): Promise; } /** Builds combined context record from multiple providers. */ export interface ContextBuilder { register(provider: ContextProvider): void; build(entries: ContextEntry[], request: ContextProviderRequest): Promise>; } //# sourceMappingURL=types.d.ts.map