/**
 * Clawx Agent — the core orchestrator.
 *
 * EXTRACTION NOTE:
 * OpenClaw's agent orchestration lives in pi-embedded-runner/run.ts (3000+ lines)
 * which handles auth rotation, sandbox environments, context engines, plugin hooks,
 * provider-specific quirks, compaction, failover, and channel integration.
 *
 * We DISCARD all of that and use the clean pi-agent-core agentLoop() directly.
 * The agentLoop (agent-loop.js, 308 lines) handles:
 *   user message → model call → tool calls → tool execution → next model call → end
 *
 * Our orchestrator is a thin wrapper that:
 * 1. Resolves the model from config
 * 2. Assembles tools (pi-coding-agent builtins + our custom tools)
 * 3. Builds the agent context (system prompt, messages, tools)
 * 4. Calls agentLoop() and streams events to the terminal
 * 5. Persists session state
 *
 * This replaces ~4000 lines of OpenClaw platform code with ~200 lines.
 */
import type { AgentMessage, AgentEvent } from "./types.js";
import type { ClawxConfig } from "../types/index.js";
export interface AgentRunOptions {
    /** User's message/prompt */
    prompt: string;
    /** Existing conversation messages (for multi-turn) */
    messages?: AgentMessage[];
    /** Callback for streaming events */
    onEvent?: (event: AgentEvent) => void;
    /** Abort signal */
    signal?: AbortSignal;
    /** Queued user messages to inject mid-run */
    steeringQueue?: AgentMessage[];
    /** Run without tools (plain chat mode) */
    noTools?: boolean;
    /** Parse text-based tool calls from models that don't return structured tool_calls */
    parseTextToolCalls?: boolean;
}
export interface AgentRunResult {
    messages: AgentMessage[];
    aborted: boolean;
}
export declare class ToolsNotSupportedError extends Error {
    constructor(model: string);
}
/**
 * Run the Clawx agent loop.
 *
 * This is the main entry point. It:
 * 1. Resolves the model
 * 2. Builds tools
 * 3. Creates the agent context
 * 4. Runs agentLoop() from pi-agent-core
 * 5. Streams events via callback
 * 6. Returns the full message history
 */
export declare function runAgent(config: ClawxConfig, options: AgentRunOptions): Promise<AgentRunResult>;
export { type AgentEvent, type AgentMessage };
//# sourceMappingURL=agent.d.ts.map