()
| 28 | export interface BotStatus { running: boolean; pid?: number } |
| 29 | |
| 30 | export async function botStatus(): Promise<BotStatus> { |
| 31 | const pid = parsePid(await fs.readFile(pidFilePath(), 'utf-8').catch(() => null)); |
| 32 | if (pid && isAlive(pid)) return { running: true, pid }; |
| 33 | return { running: false }; |
| 34 | } |
| 35 | |
| 36 | function resolveCliPath(): string { |
| 37 | return process.env.QODEX_CLI_PATH || 'qodex'; |
no test coverage detected