import { a as AdapterHooks, b as AgentRunner, aX as StreamingCallbackRunner } from './types-CRmwFnVk.js';
import '@directive-run/core';

/**
 * @directive-run/ai/ollama
 *
 * Ollama adapter for Directive AI. Provides runners for local
 * Ollama inference. No API key required.
 *
 * Requires Ollama to be running locally. Start it with: `ollama serve`
 *
 * @example
 * ```typescript
 * import { createOllamaRunner } from '@directive-run/ai/ollama';
 *
 * const runner = createOllamaRunner({ model: 'llama3' });
 * ```
 */

/**
 * Ollama model pricing (USD per million tokens).
 *
 * Ollama runs locally — all costs are zero. This table is provided for
 * compatibility with `estimateCost()` so local models integrate seamlessly
 * into cost-tracking pipelines.
 *
 * @example
 * ```typescript
 * import { estimateCost } from '@directive-run/ai';
 * import { OLLAMA_PRICING } from '@directive-run/ai/ollama';
 *
 * const cost =
 *   estimateCost(result.tokenUsage!.inputTokens, OLLAMA_PRICING["llama3"].input) +
 *   estimateCost(result.tokenUsage!.outputTokens, OLLAMA_PRICING["llama3"].output);
 * // → 0
 * ```
 */
declare const OLLAMA_PRICING: Record<string, {
    input: number;
    output: number;
}>;
/** Options for createOllamaRunner */
interface OllamaRunnerOptions {
    model?: string;
    baseURL?: string;
    fetch?: typeof globalThis.fetch;
    /** @default undefined */
    timeoutMs?: number;
    /** Lifecycle hooks for tracing, logging, and metrics */
    hooks?: AdapterHooks;
    /** Sampling temperature. Higher = more random. */
    temperature?: number;
    /** Nucleus sampling: top-P probability mass (0–1). */
    topP?: number;
    /** Stop sequences. The model will stop generating when it encounters one. */
    stop?: string[];
    /** Maximum number of tokens to generate. Ollama uses `num_predict`. */
    numPredict?: number;
}
/**
 * Create an AgentRunner for local Ollama inference.
 *
 * Ollama runs locally – no API key or cloud service needed. Default model
 * is `llama3`, default base URL is `http://localhost:11434`.
 *
 * Returns `tokenUsage` with input/output breakdown for cost tracking
 * (useful for monitoring local resource usage).
 *
 * @example
 * ```typescript
 * const runner = createOllamaRunner({ model: "llama3" });
 * const orchestrator = createAgentOrchestrator({ runner });
 * const result = await orchestrator.run(agent, input);
 * ```
 */
declare function createOllamaRunner(options?: OllamaRunnerOptions): AgentRunner;
/** Options for createOllamaStreamingRunner */
interface OllamaStreamingRunnerOptions {
    model?: string;
    baseURL?: string;
    fetch?: typeof globalThis.fetch;
    /** Lifecycle hooks for tracing, logging, and metrics */
    hooks?: AdapterHooks;
    /** Sampling temperature. Higher = more random. */
    temperature?: number;
    /** Nucleus sampling: top-P probability mass (0–1). */
    topP?: number;
    /** Stop sequences. The model will stop generating when it encounters one. */
    stop?: string[];
    /** Maximum number of tokens to generate. Ollama uses `num_predict`. */
    numPredict?: number;
}
/**
 * Create a StreamingCallbackRunner for local Ollama inference with
 * chunked JSON streaming. Can be used standalone or paired with `createOllamaRunner`.
 *
 * Ollama streams newline-delimited JSON objects with `{ message: { content }, done }`.
 * Token counts are included in the final chunk (`prompt_eval_count`, `eval_count`).
 *
 * Returns `tokenUsage` with input/output breakdown for resource tracking.
 *
 * @example
 * ```typescript
 * const streamingRunner = createOllamaStreamingRunner({ model: 'llama3' });
 * const streamRunner = createStreamingRunner(streamingRunner);
 * const { stream, result } = streamRunner(agent, input);
 * ```
 */
declare function createOllamaStreamingRunner(options?: OllamaStreamingRunnerOptions): StreamingCallbackRunner;

export { OLLAMA_PRICING, type OllamaRunnerOptions, type OllamaStreamingRunnerOptions, createOllamaRunner, createOllamaStreamingRunner };
