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";
/**
 * Extended A2A message role
 */
export declare const AgentInactiveStreamingEventRole: {
    readonly User: "user";
    readonly Agent: "agent";
    readonly Tool: "tool";
    readonly System: "system";
};
/**
 * Extended A2A message role
 */
export type AgentInactiveStreamingEventRole = ClosedEnum<typeof AgentInactiveStreamingEventRole>;
export type AgentInactiveStreamingEventParts = TextPart | ErrorPart | DataPart | FilePart | ToolCallPart | ToolResultPart;
/**
 * Full last message in A2A format (for backwards compatibility)
 */
export type LastMessageFull = {
    messageId?: string | undefined;
    /**
     * Extended A2A message role
     */
    role: AgentInactiveStreamingEventRole;
    parts: Array<TextPart | ErrorPart | DataPart | FilePart | ToolCallPart | ToolResultPart>;
    metadata?: {
        [k: string]: any;
    } | undefined;
};
/**
 * The reason why the agent execution became inactive
 */
export declare const AgentInactiveStreamingEventFinishReason: {
    readonly Stop: "stop";
    readonly Length: "length";
    readonly ToolCalls: "tool_calls";
    readonly ContentFilter: "content_filter";
    readonly FunctionCall: "function_call";
    readonly MaxIterations: "max_iterations";
    readonly MaxTime: "max_time";
};
/**
 * The reason why the agent execution became inactive
 */
export type AgentInactiveStreamingEventFinishReason = ClosedEnum<typeof AgentInactiveStreamingEventFinishReason>;
export declare const AgentInactiveStreamingEventDataType: {
    readonly Function: "function";
};
export type AgentInactiveStreamingEventDataType = ClosedEnum<typeof AgentInactiveStreamingEventDataType>;
export type AgentInactiveStreamingEventFunction = {
    name?: string | undefined;
    arguments?: string | undefined;
};
export type AgentInactiveStreamingEventPendingToolCalls = {
    id: string;
    type: AgentInactiveStreamingEventDataType;
    function: AgentInactiveStreamingEventFunction;
};
export type AgentInactiveStreamingEventPromptTokensDetails = {
    cachedTokens?: number | null | undefined;
    cacheCreationTokens?: number | null | undefined;
    /**
     * The number of audio input tokens consumed by the request.
     */
    audioTokens?: number | null | undefined;
};
export type AgentInactiveStreamingEventCompletionTokensDetails = {
    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;
};
/**
 * Token usage from the last agent message
 */
export type AgentInactiveStreamingEventUsage = {
    /**
     * 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?: AgentInactiveStreamingEventPromptTokensDetails | null | undefined;
    completionTokensDetails?: AgentInactiveStreamingEventCompletionTokensDetails | null | undefined;
    timeToFirstToken?: number | undefined;
};
/**
 * Billing information for the agent execution
 */
export type Billing = {
    totalCost: number;
    inputCost: number;
    outputCost: number;
    billable: boolean;
    integrationId: string | null;
};
export type AgentInactiveStreamingEventData = {
    lastMessage: string;
    /**
     * Full last message in A2A format (for backwards compatibility)
     */
    lastMessageFull?: LastMessageFull | undefined;
    /**
     * The reason why the agent execution became inactive
     */
    finishReason: AgentInactiveStreamingEventFinishReason;
    /**
     * Tool calls that are pending user response (for function_call finish reason)
     */
    pendingToolCalls?: Array<AgentInactiveStreamingEventPendingToolCalls> | undefined;
    /**
     * Token usage from the last agent message
     */
    usage?: AgentInactiveStreamingEventUsage | undefined;
    /**
     * Billing information for the agent execution
     */
    billing?: Billing | undefined;
    workflowRunId: string;
    /**
     * ID of the response tracking this execution
     */
    responseId?: string | undefined;
};
/**
 * Emitted when the agent completes processing or pauses for input. Contains the final message, finish reason (stop, tool_calls, max_iterations, etc.), and any pending tool calls awaiting user response.
 */
export type AgentInactiveStreamingEvent = {
    type: "event.agents.inactive";
    /**
     * ISO timestamp of the event
     */
    timestamp: string;
    data: AgentInactiveStreamingEventData;
};
/** @internal */
export declare const AgentInactiveStreamingEventRole$inboundSchema: z.ZodNativeEnum<typeof AgentInactiveStreamingEventRole>;
/** @internal */
export declare const AgentInactiveStreamingEventParts$inboundSchema: z.ZodType<AgentInactiveStreamingEventParts, z.ZodTypeDef, unknown>;
export declare function agentInactiveStreamingEventPartsFromJSON(jsonString: string): SafeParseResult<AgentInactiveStreamingEventParts, SDKValidationError>;
/** @internal */
export declare const LastMessageFull$inboundSchema: z.ZodType<LastMessageFull, z.ZodTypeDef, unknown>;
export declare function lastMessageFullFromJSON(jsonString: string): SafeParseResult<LastMessageFull, SDKValidationError>;
/** @internal */
export declare const AgentInactiveStreamingEventFinishReason$inboundSchema: z.ZodNativeEnum<typeof AgentInactiveStreamingEventFinishReason>;
/** @internal */
export declare const AgentInactiveStreamingEventDataType$inboundSchema: z.ZodNativeEnum<typeof AgentInactiveStreamingEventDataType>;
/** @internal */
export declare const AgentInactiveStreamingEventFunction$inboundSchema: z.ZodType<AgentInactiveStreamingEventFunction, z.ZodTypeDef, unknown>;
export declare function agentInactiveStreamingEventFunctionFromJSON(jsonString: string): SafeParseResult<AgentInactiveStreamingEventFunction, SDKValidationError>;
/** @internal */
export declare const AgentInactiveStreamingEventPendingToolCalls$inboundSchema: z.ZodType<AgentInactiveStreamingEventPendingToolCalls, z.ZodTypeDef, unknown>;
export declare function agentInactiveStreamingEventPendingToolCallsFromJSON(jsonString: string): SafeParseResult<AgentInactiveStreamingEventPendingToolCalls, SDKValidationError>;
/** @internal */
export declare const AgentInactiveStreamingEventPromptTokensDetails$inboundSchema: z.ZodType<AgentInactiveStreamingEventPromptTokensDetails, z.ZodTypeDef, unknown>;
export declare function agentInactiveStreamingEventPromptTokensDetailsFromJSON(jsonString: string): SafeParseResult<AgentInactiveStreamingEventPromptTokensDetails, SDKValidationError>;
/** @internal */
export declare const AgentInactiveStreamingEventCompletionTokensDetails$inboundSchema: z.ZodType<AgentInactiveStreamingEventCompletionTokensDetails, z.ZodTypeDef, unknown>;
export declare function agentInactiveStreamingEventCompletionTokensDetailsFromJSON(jsonString: string): SafeParseResult<AgentInactiveStreamingEventCompletionTokensDetails, SDKValidationError>;
/** @internal */
export declare const AgentInactiveStreamingEventUsage$inboundSchema: z.ZodType<AgentInactiveStreamingEventUsage, z.ZodTypeDef, unknown>;
export declare function agentInactiveStreamingEventUsageFromJSON(jsonString: string): SafeParseResult<AgentInactiveStreamingEventUsage, SDKValidationError>;
/** @internal */
export declare const Billing$inboundSchema: z.ZodType<Billing, z.ZodTypeDef, unknown>;
export declare function billingFromJSON(jsonString: string): SafeParseResult<Billing, SDKValidationError>;
/** @internal */
export declare const AgentInactiveStreamingEventData$inboundSchema: z.ZodType<AgentInactiveStreamingEventData, z.ZodTypeDef, unknown>;
export declare function agentInactiveStreamingEventDataFromJSON(jsonString: string): SafeParseResult<AgentInactiveStreamingEventData, SDKValidationError>;
/** @internal */
export declare const AgentInactiveStreamingEvent$inboundSchema: z.ZodType<AgentInactiveStreamingEvent, z.ZodTypeDef, unknown>;
export declare function agentInactiveStreamingEventFromJSON(jsonString: string): SafeParseResult<AgentInactiveStreamingEvent, SDKValidationError>;
//# sourceMappingURL=agentinactivestreamingevent.d.ts.map