/**
 * Static configuration for a run.
 *
 * An {@link AgentConfig} is the immutable setup a caller supplies before any
 * signals flow: which model to use, an optional system preamble, the tools the
 * model may call, output and reasoning ceilings, and the policy that governs
 * when history is condensed.
 */
import type { ThinkingLevel } from "../../llmgateway/contract";
import type { ToolBox } from "./tools";
/**
 * The threshold policy for context condensation.
 *
 * When accumulated usage crosses `triggerRatio` of the model's window, the
 * oldest history is condensed while the most recent `keepRecent` turns are
 * preserved verbatim.
 */
export interface CompactionPolicy {
    /** Fraction of the context window (0..1) at which condensation triggers. */
    readonly triggerRatio: number;
    /** Number of trailing turns kept untouched during condensation. */
    readonly keepRecent: number;
}
/** The immutable setup for a run. */
export interface AgentConfig {
    /** The model id to bind the run to. */
    readonly model: string;
    /** Optional system preamble prepended to every model invocation. */
    readonly system?: string;
    /** The tools the model may call, and the runner that fulfils them. */
    readonly tools?: ToolBox;
    /** Hard ceiling on output tokens per model invocation. */
    readonly maxOutputTokens?: number;
    /** Requested reasoning depth for reasoning-capable models. */
    readonly thinking?: ThinkingLevel;
    /** When and how aggressively to condense history; absent disables it. */
    readonly compaction?: CompactionPolicy;
    /**
     * Maximum number of model turns a single run may take before it is
     * force-faulted. Guards against a model that loops forever (e.g. repeatedly
     * requesting the same tool). Defaults to 64.
     */
    readonly maxTurns?: number;
}
