import { type SpawnSyncReturns, type SpawnSyncOptions } from "child_process"; import type { AllowedCommand } from "../../lib/types/index.js"; /** * Shared Ollama utilities for CLI commands */ export declare class OllamaUtils { /** * Secure wrapper around spawnSync to prevent command injection. */ static safeSpawn(command: AllowedCommand, args: string[], options?: SpawnSyncOptions): SpawnSyncReturns; /** * Check if Ollama command line is available */ private static isOllamaCommandReady; /** * Validate HTTP API response from Ollama */ private static validateApiResponse; /** * Check if Ollama HTTP API is ready */ private static isOllamaApiReady; /** * Wait for Ollama service to become ready with exponential backoff */ static waitForOllamaReady(maxAttempts?: number, initialDelay?: number): Promise; /** * Check if Ollama service is already running */ static isOllamaRunning(): boolean; /** * Unified Ollama start logic that works across platforms */ static startOllamaService(): Promise; }