import { ServiceContainerBuilder } from '@stock-bot/di'; import { defined } from '@stock-bot/invariants'; import { registerOrchestratorServices } from '../src/container'; import type { OrchestratorServices } from '../src/types'; /** Offline examples explicitly opt into seeded synthetic data. No provider credentials are used. */ export async function createExampleRuntime() { const di = await new ServiceContainerBuilder() .withOptions({ enableCache: false, enableQueue: false, enableMongoDB: false, enablePostgres: false, enableQuestDB: false, enableBrowser: false, enableProxy: false, }) .build(); await registerOrchestratorServices(di, { initializeMode: false, allowSyntheticData: true, syntheticSeed: 42, }); const container = di.resolve('serviceContainer') as OrchestratorServices; return { container, storageService: defined(container.custom?.StorageService), marketDataService: defined(container.custom?.MarketDataService), executionService: defined(container.custom?.ExecutionService), modeManager: defined(container.custom?.ModeManager), strategyManager: defined(container.custom?.StrategyManager), }; }