/**
 * Clawx agent loop — own implementation replacing pi-agent-core's agentLoop.
 *
 * Phase 4: The core execution engine.
 * Flow: user message → model call → tool calls → tool execution → next model call → end
 */
import type { AgentContext, AgentEvent, AgentLoopConfig, AgentMessage } from "./types.js";
import { streamSimple } from "./types.js";
declare class AgentEventStream implements AsyncIterable<AgentEvent> {
    private queue;
    private waiting;
    private done;
    private finalResult;
    private resultResolver;
    private resultPromise;
    constructor();
    push(event: AgentEvent): void;
    end(messages: AgentMessage[]): void;
    [Symbol.asyncIterator](): AsyncIterator<AgentEvent>;
    result(): Promise<AgentMessage[]>;
}
type StreamFn = typeof streamSimple;
export declare function agentLoop(prompts: AgentMessage[], context: AgentContext, config: AgentLoopConfig, signal?: AbortSignal, streamFn?: StreamFn): AgentEventStream;
export {};
//# sourceMappingURL=agent-loop.d.ts.map