// CLI entry point for `openbroker auto` commands import { spawnSync } from 'child_process'; import { fileURLToPath } from 'url'; import path from 'path'; import { parseArgs } from '../core/utils.js'; import { resolveScriptPath, resolveExamplePath, listAutomations, listExamples, loadExampleConfigs, ensureAutomationsDir } from './loader.js'; import { startAutomation, getRunningAutomations, getRegisteredAutomations } from './runtime.js'; import { unregisterAutomation, cleanRegistry } from './registry.js'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); function printUsage() { console.log(` OpenBroker Automations — event-driven trading scripts Usage: openbroker auto run