/**
 * Clawx core types.
 *
 * Phase 2: Own type definitions replacing @mariozechner/pi-agent-core imports.
 * These mirror the pi-agent-core interfaces so all existing code works unchanged.
 *
 * pi-ai types (Message, Model, etc.) are still imported from the vendor package
 * and re-exported here — Phase 3 will replace those too.
 */
import type { TSchema } from "@sinclair/typebox";
import type { Static } from "@sinclair/typebox";
import type { TextContent, ImageContent, Tool, Message, UserMessage, AssistantMessage, AssistantMessageEvent, AssistantMessageEventStream, ToolResultMessage, ToolCall, ThinkingContent, Model, Api, Provider, Context, SimpleStreamOptions, StreamOptions, StopReason, Usage } from "@mariozechner/pi-ai";
export type { TextContent, ImageContent, Tool, Message, UserMessage, AssistantMessage, AssistantMessageEvent, AssistantMessageEventStream, ToolResultMessage, ToolCall, ThinkingContent, Model, Api, Provider, Context, SimpleStreamOptions, StreamOptions, StopReason, Usage, };
export { streamSimple, createAssistantMessageEventStream } from "@mariozechner/pi-ai";
export interface AgentToolResult<T = any> {
    content: (TextContent | ImageContent)[];
    details: T;
}
export type AgentToolUpdateCallback<T = any> = (partialResult: AgentToolResult<T>) => void;
export interface AgentTool<TParameters extends TSchema = TSchema, TDetails = any> extends Tool<TParameters> {
    label: string;
    execute: (toolCallId: string, params: Static<TParameters>, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback<TDetails>) => Promise<AgentToolResult<TDetails>>;
}
export interface CustomAgentMessages {
}
export type AgentMessage = Message | CustomAgentMessages[keyof CustomAgentMessages];
export interface AgentContext {
    systemPrompt: string;
    messages: AgentMessage[];
    tools?: AgentTool<any>[];
}
export type ThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh";
export type ToolExecutionMode = "sequential" | "parallel";
export type AgentToolCall = Extract<AssistantMessage["content"][number], {
    type: "toolCall";
}>;
export interface AgentLoopConfig extends SimpleStreamOptions {
    model: Model<any>;
    convertToLlm: (messages: AgentMessage[]) => Message[] | Promise<Message[]>;
    transformContext?: (messages: AgentMessage[], signal?: AbortSignal) => Promise<AgentMessage[]>;
    getApiKey?: (provider: string) => Promise<string | undefined> | string | undefined;
    getSteeringMessages?: () => Promise<AgentMessage[]>;
    getFollowUpMessages?: () => Promise<AgentMessage[]>;
    toolExecution?: ToolExecutionMode;
}
export type AgentEvent = {
    type: "agent_start";
} | {
    type: "agent_end";
    messages: AgentMessage[];
} | {
    type: "turn_start";
} | {
    type: "turn_end";
    message: AgentMessage;
    toolResults: ToolResultMessage[];
} | {
    type: "message_start";
    message: AgentMessage;
} | {
    type: "message_update";
    message: AgentMessage;
    assistantMessageEvent: AssistantMessageEvent;
} | {
    type: "message_end";
    message: AgentMessage;
} | {
    type: "tool_execution_start";
    toolCallId: string;
    toolName: string;
    args: any;
} | {
    type: "tool_execution_update";
    toolCallId: string;
    toolName: string;
    args: any;
    partialResult: any;
} | {
    type: "tool_execution_end";
    toolCallId: string;
    toolName: string;
    result: any;
    isError: boolean;
};
export interface AgentState {
    systemPrompt: string;
    model: Model<any>;
    thinkingLevel: ThinkingLevel;
    tools: AgentTool<any>[];
    messages: AgentMessage[];
    isStreaming: boolean;
    streamMessage: AgentMessage | null;
    pendingToolCalls: Set<string>;
    error?: string;
}
//# sourceMappingURL=types.d.ts.map