/** * @module strategies/strategy-store * @description File-based strategy store with JSON persistence. * * Strategies are stored as JSON files in ~/.config/mcp-sap/strategies//.json * Each strategy has a version number, active flag, and arbitrary JSON config. * * The store uses synchronous file I/O (strategies are small JSON files). * The directory structure is: * ~/.config/mcp-sap/strategies/ * defi/ * jupiter-arb.json * trading/ * volatility-breakout.json * meme/ * newlisting-snipe.json * payments/ * x402-budget.json * premium/ * pyth-watch.json */ /** * @name StrategyRecord * @description A stored strategy with metadata. */ export interface StrategyRecord { /** Strategy category (defi, trading, meme, payments, premium). */ category: string; /** Strategy name (e.g. "volatility-breakout"). */ name: string; /** JSON strategy configuration. */ config: string; /** Strategy version — incremented on each update. */ version: number; /** Whether the strategy is active. */ active: boolean; /** ISO 8601 creation timestamp. */ createdAt: string; /** ISO 8601 last update timestamp. */ updatedAt: string; /** File path of the strategy. */ path: string; } /** * @name getStrategiesRoot * @description Returns the strategies root directory. */ export declare function getStrategiesRoot(): string; /** * @name saveStrategy * @description Saves or updates a strategy JSON file. */ export declare function saveStrategy(input: { category: string; name: string; config: string; active?: boolean; }): { success: boolean; path: string; version: number; created: boolean; }; /** * @name loadStrategy * @description Loads a strategy by category and name. */ export declare function loadStrategy(category: string, name: string): StrategyRecord | null; /** * @name listStrategies * @description Lists all strategies, optionally filtered by category and active status. */ export declare function listStrategies(category?: string, activeOnly?: boolean): StrategyRecord[]; /** * @name activateStrategy * @description Activates or deactivates a strategy. */ export declare function activateStrategy(category: string, name: string, active: boolean): { success: boolean; active: boolean; }; //# sourceMappingURL=strategy-store.d.ts.map