import * as z from "zod/v3";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
import { DataPart } from "./datapart.js";
import { ErrorPart } from "./errorpart.js";
import { FilePart } from "./filepart.js";
import { TextPart } from "./textpart.js";
import { ToolCallPart } from "./toolcallpart.js";
import { ToolResultPart } from "./toolresultpart.js";
export declare const AgentThoughtStreamingEventRole: {
    readonly User: "user";
    readonly Agent: "agent";
    readonly Tool: "tool";
    readonly System: "system";
};
export type AgentThoughtStreamingEventRole = ClosedEnum<typeof AgentThoughtStreamingEventRole>;
export type AgentThoughtStreamingEventParts = TextPart | ErrorPart | DataPart | FilePart | ToolCallPart | ToolResultPart;
export type MessageDifference = {
    messageId: string;
    role: AgentThoughtStreamingEventRole;
    parts: Array<TextPart | ErrorPart | DataPart | FilePart | ToolCallPart | ToolResultPart>;
    metadata?: {
        [k: string]: any;
    } | undefined;
    agentId: string;
    agentExecutionId: string;
    workspaceId: string;
};
/**
 * The reason the model stopped generating tokens.
 */
export declare const AgentThoughtStreamingEventFinishReason: {
    readonly Stop: "stop";
    readonly Length: "length";
    readonly ToolCalls: "tool_calls";
    readonly ContentFilter: "content_filter";
    readonly FunctionCall: "function_call";
};
/**
 * The reason the model stopped generating tokens.
 */
export type AgentThoughtStreamingEventFinishReason = ClosedEnum<typeof AgentThoughtStreamingEventFinishReason>;
export declare const AgentThoughtStreamingEventDataType: {
    readonly Function: "function";
};
export type AgentThoughtStreamingEventDataType = ClosedEnum<typeof AgentThoughtStreamingEventDataType>;
export type AgentThoughtStreamingEventFunction = {
    /**
     * The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
     */
    name?: string | undefined;
    /**
     * The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
     */
    arguments?: string | undefined;
};
export type AgentThoughtStreamingEventToolCalls = {
    index?: number | undefined;
    id?: string | undefined;
    type?: AgentThoughtStreamingEventDataType | undefined;
    function?: AgentThoughtStreamingEventFunction | undefined;
    /**
     * Encrypted representation of the model internal reasoning state during function calling. Required by Gemini 3 models when continuing a conversation after a tool call.
     */
    thoughtSignature?: string | undefined;
};
export declare const AgentThoughtStreamingEventDataRole: {
    readonly Assistant: "assistant";
};
export type AgentThoughtStreamingEventDataRole = ClosedEnum<typeof AgentThoughtStreamingEventDataRole>;
/**
 * If the audio output modality is requested, this object contains data about the audio response from the model.
 */
export type AgentThoughtStreamingEventAudio = {
    id: string;
    expiresAt: number;
    data: string;
    transcript: string;
};
/**
 * A chat completion message generated by the model.
 */
export type AgentThoughtStreamingEventMessage = {
    content?: string | null | undefined;
    refusal?: string | null | undefined;
    toolCalls?: Array<AgentThoughtStreamingEventToolCalls> | undefined;
    role?: AgentThoughtStreamingEventDataRole | undefined;
    /**
     * Internal thought process of the model
     */
    reasoning?: string | null | undefined;
    /**
     * The signature holds a cryptographic token which verifies that the thinking block was generated by the model, and is verified when thinking is part of a multiturn conversation. This value should not be modified and should always be sent to the API when the reasoning is redacted. Currently only supported by `Anthropic`.
     */
    reasoningSignature?: string | null | undefined;
    /**
     * Occasionally the model's internal reasoning will be flagged by the safety systems of the provider. When this occurs, the provider will encrypt the reasoning. These redacted reasoning is decrypted when passed back to the API, allowing the model to continue its response without losing context.
     */
    redactedReasoning?: string | undefined;
    /**
     * If the audio output modality is requested, this object contains data about the audio response from the model.
     */
    audio?: AgentThoughtStreamingEventAudio | null | undefined;
};
export type TopLogprobs = {
    /**
     * The token.
     */
    token: string;
    /**
     * The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely.
     */
    logprob: number;
    /**
     * A list of integers representing the UTF-8 bytes representation of the token.
     */
    bytes: Array<number> | null;
};
export type AgentThoughtStreamingEventContent = {
    /**
     * The token.
     */
    token: string;
    /**
     * The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely.
     */
    logprob: number;
    /**
     * A list of integers representing the UTF-8 bytes representation of the token.
     */
    bytes: Array<number> | null;
    /**
     * List of the most likely tokens and their log probability, at this token position.
     */
    topLogprobs: Array<TopLogprobs>;
};
export type AgentThoughtStreamingEventTopLogprobs = {
    /**
     * The token.
     */
    token: string;
    /**
     * The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely.
     */
    logprob: number;
    /**
     * A list of integers representing the UTF-8 bytes representation of the token.
     */
    bytes: Array<number> | null;
};
export type Refusal = {
    /**
     * The token.
     */
    token: string;
    /**
     * The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely.
     */
    logprob: number;
    /**
     * A list of integers representing the UTF-8 bytes representation of the token.
     */
    bytes: Array<number> | null;
    /**
     * List of the most likely tokens and their log probability, at this token position.
     */
    topLogprobs: Array<AgentThoughtStreamingEventTopLogprobs>;
};
/**
 * Log probability information for the choice.
 */
export type Logprobs = {
    /**
     * A list of message content tokens with log probability information.
     */
    content: Array<AgentThoughtStreamingEventContent> | null;
    /**
     * A list of message refusal tokens with log probability information.
     */
    refusal: Array<Refusal> | null;
};
export type Choice = {
    /**
     * The reason the model stopped generating tokens.
     */
    finishReason: AgentThoughtStreamingEventFinishReason | null;
    /**
     * The index of the choice in the list of choices.
     */
    index: number;
    /**
     * A chat completion message generated by the model.
     */
    message: AgentThoughtStreamingEventMessage;
    /**
     * Log probability information for the choice.
     */
    logprobs?: Logprobs | null | undefined;
};
export type AgentThoughtStreamingEventPromptTokensDetails = {
    cachedTokens?: number | null | undefined;
    cacheCreationTokens?: number | null | undefined;
    /**
     * The number of audio input tokens consumed by the request.
     */
    audioTokens?: number | null | undefined;
};
export type AgentThoughtStreamingEventCompletionTokensDetails = {
    reasoningTokens?: number | null | undefined;
    acceptedPredictionTokens?: number | null | undefined;
    rejectedPredictionTokens?: number | null | undefined;
    /**
     * The number of audio output tokens produced by the response.
     */
    audioTokens?: number | null | undefined;
};
/**
 * Usage statistics for the completion request.
 */
export type AgentThoughtStreamingEventUsage = {
    /**
     * Number of tokens in the generated completion.
     */
    completionTokens?: number | undefined;
    /**
     * Number of tokens in the prompt.
     */
    promptTokens?: number | undefined;
    /**
     * Total number of tokens used in the request (prompt + completion).
     */
    totalTokens?: number | undefined;
    promptTokensDetails?: AgentThoughtStreamingEventPromptTokensDetails | null | undefined;
    completionTokensDetails?: AgentThoughtStreamingEventCompletionTokensDetails | null | undefined;
};
export type AgentThoughtStreamingEventData = {
    agentId: string;
    messageDifference: {
        [k: string]: MessageDifference;
    };
    choice?: Choice | undefined;
    choiceIndex?: number | undefined;
    iteration: number;
    accumulatedExecutionTime: number;
    responseId?: string | undefined;
    /**
     * Usage statistics for the completion request.
     */
    usage?: AgentThoughtStreamingEventUsage | undefined;
};
/**
 * Emitted during agent reasoning. Contains the incremental message changes, model choices, iteration count, and token usage for this processing step.
 */
export type AgentThoughtStreamingEvent = {
    type: "event.agents.thought";
    /**
     * ISO timestamp of the event
     */
    timestamp: string;
    data: AgentThoughtStreamingEventData;
};
/** @internal */
export declare const AgentThoughtStreamingEventRole$inboundSchema: z.ZodNativeEnum<typeof AgentThoughtStreamingEventRole>;
/** @internal */
export declare const AgentThoughtStreamingEventParts$inboundSchema: z.ZodType<AgentThoughtStreamingEventParts, z.ZodTypeDef, unknown>;
export declare function agentThoughtStreamingEventPartsFromJSON(jsonString: string): SafeParseResult<AgentThoughtStreamingEventParts, SDKValidationError>;
/** @internal */
export declare const MessageDifference$inboundSchema: z.ZodType<MessageDifference, z.ZodTypeDef, unknown>;
export declare function messageDifferenceFromJSON(jsonString: string): SafeParseResult<MessageDifference, SDKValidationError>;
/** @internal */
export declare const AgentThoughtStreamingEventFinishReason$inboundSchema: z.ZodNativeEnum<typeof AgentThoughtStreamingEventFinishReason>;
/** @internal */
export declare const AgentThoughtStreamingEventDataType$inboundSchema: z.ZodNativeEnum<typeof AgentThoughtStreamingEventDataType>;
/** @internal */
export declare const AgentThoughtStreamingEventFunction$inboundSchema: z.ZodType<AgentThoughtStreamingEventFunction, z.ZodTypeDef, unknown>;
export declare function agentThoughtStreamingEventFunctionFromJSON(jsonString: string): SafeParseResult<AgentThoughtStreamingEventFunction, SDKValidationError>;
/** @internal */
export declare const AgentThoughtStreamingEventToolCalls$inboundSchema: z.ZodType<AgentThoughtStreamingEventToolCalls, z.ZodTypeDef, unknown>;
export declare function agentThoughtStreamingEventToolCallsFromJSON(jsonString: string): SafeParseResult<AgentThoughtStreamingEventToolCalls, SDKValidationError>;
/** @internal */
export declare const AgentThoughtStreamingEventDataRole$inboundSchema: z.ZodNativeEnum<typeof AgentThoughtStreamingEventDataRole>;
/** @internal */
export declare const AgentThoughtStreamingEventAudio$inboundSchema: z.ZodType<AgentThoughtStreamingEventAudio, z.ZodTypeDef, unknown>;
export declare function agentThoughtStreamingEventAudioFromJSON(jsonString: string): SafeParseResult<AgentThoughtStreamingEventAudio, SDKValidationError>;
/** @internal */
export declare const AgentThoughtStreamingEventMessage$inboundSchema: z.ZodType<AgentThoughtStreamingEventMessage, z.ZodTypeDef, unknown>;
export declare function agentThoughtStreamingEventMessageFromJSON(jsonString: string): SafeParseResult<AgentThoughtStreamingEventMessage, SDKValidationError>;
/** @internal */
export declare const TopLogprobs$inboundSchema: z.ZodType<TopLogprobs, z.ZodTypeDef, unknown>;
export declare function topLogprobsFromJSON(jsonString: string): SafeParseResult<TopLogprobs, SDKValidationError>;
/** @internal */
export declare const AgentThoughtStreamingEventContent$inboundSchema: z.ZodType<AgentThoughtStreamingEventContent, z.ZodTypeDef, unknown>;
export declare function agentThoughtStreamingEventContentFromJSON(jsonString: string): SafeParseResult<AgentThoughtStreamingEventContent, SDKValidationError>;
/** @internal */
export declare const AgentThoughtStreamingEventTopLogprobs$inboundSchema: z.ZodType<AgentThoughtStreamingEventTopLogprobs, z.ZodTypeDef, unknown>;
export declare function agentThoughtStreamingEventTopLogprobsFromJSON(jsonString: string): SafeParseResult<AgentThoughtStreamingEventTopLogprobs, SDKValidationError>;
/** @internal */
export declare const Refusal$inboundSchema: z.ZodType<Refusal, z.ZodTypeDef, unknown>;
export declare function refusalFromJSON(jsonString: string): SafeParseResult<Refusal, SDKValidationError>;
/** @internal */
export declare const Logprobs$inboundSchema: z.ZodType<Logprobs, z.ZodTypeDef, unknown>;
export declare function logprobsFromJSON(jsonString: string): SafeParseResult<Logprobs, SDKValidationError>;
/** @internal */
export declare const Choice$inboundSchema: z.ZodType<Choice, z.ZodTypeDef, unknown>;
export declare function choiceFromJSON(jsonString: string): SafeParseResult<Choice, SDKValidationError>;
/** @internal */
export declare const AgentThoughtStreamingEventPromptTokensDetails$inboundSchema: z.ZodType<AgentThoughtStreamingEventPromptTokensDetails, z.ZodTypeDef, unknown>;
export declare function agentThoughtStreamingEventPromptTokensDetailsFromJSON(jsonString: string): SafeParseResult<AgentThoughtStreamingEventPromptTokensDetails, SDKValidationError>;
/** @internal */
export declare const AgentThoughtStreamingEventCompletionTokensDetails$inboundSchema: z.ZodType<AgentThoughtStreamingEventCompletionTokensDetails, z.ZodTypeDef, unknown>;
export declare function agentThoughtStreamingEventCompletionTokensDetailsFromJSON(jsonString: string): SafeParseResult<AgentThoughtStreamingEventCompletionTokensDetails, SDKValidationError>;
/** @internal */
export declare const AgentThoughtStreamingEventUsage$inboundSchema: z.ZodType<AgentThoughtStreamingEventUsage, z.ZodTypeDef, unknown>;
export declare function agentThoughtStreamingEventUsageFromJSON(jsonString: string): SafeParseResult<AgentThoughtStreamingEventUsage, SDKValidationError>;
/** @internal */
export declare const AgentThoughtStreamingEventData$inboundSchema: z.ZodType<AgentThoughtStreamingEventData, z.ZodTypeDef, unknown>;
export declare function agentThoughtStreamingEventDataFromJSON(jsonString: string): SafeParseResult<AgentThoughtStreamingEventData, SDKValidationError>;
/** @internal */
export declare const AgentThoughtStreamingEvent$inboundSchema: z.ZodType<AgentThoughtStreamingEvent, z.ZodTypeDef, unknown>;
export declare function agentThoughtStreamingEventFromJSON(jsonString: string): SafeParseResult<AgentThoughtStreamingEvent, SDKValidationError>;
//# sourceMappingURL=agentthoughtstreamingevent.d.ts.map