import * as z from "zod/v3";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import * as components from "../components/index.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
/**
 * Message containing tool execution results
 */
export declare const StreamAgentRoleToolMessage: {
    readonly Tool: "tool";
};
/**
 * Message containing tool execution results
 */
export type StreamAgentRoleToolMessage = ClosedEnum<typeof StreamAgentRoleToolMessage>;
/**
 * Message from the end user
 */
export declare const StreamAgentRoleUserMessage: {
    readonly User: "user";
};
/**
 * Message from the end user
 */
export type StreamAgentRoleUserMessage = ClosedEnum<typeof StreamAgentRoleUserMessage>;
/**
 * Message role (user or tool for continuing executions)
 */
export type StreamAgentRole = StreamAgentRoleUserMessage | StreamAgentRoleToolMessage;
/**
 * Message part that can be provided by users. Use "text" for regular messages, "file" for attachments, or "tool_result" when responding to tool call requests.
 */
export type StreamAgentPublicMessagePart = components.TextPart | components.FilePart | components.ToolResultPart | components.ErrorPart;
/**
 * The A2A message to send to the agent (user input or tool results)
 */
export type StreamAgentA2AMessage = {
    /**
     * Optional A2A message ID in ULID format
     */
    messageId?: string | undefined;
    /**
     * Message role (user or tool for continuing executions)
     */
    role: StreamAgentRoleUserMessage | StreamAgentRoleToolMessage;
    /**
     * A2A message parts (text, file, or tool_result only). Note: Tool role messages must only contain tool_result parts.
     */
    parts: Array<components.TextPart | components.FilePart | components.ToolResultPart | components.ErrorPart>;
};
/**
 * Information about the identity making the request. If the identity does not exist, it will be created automatically.
 */
export type StreamAgentIdentity = {
    /**
     * Unique identifier for the contact
     */
    id: string;
    /**
     * Display name of the contact
     */
    displayName?: string | undefined;
    /**
     * Email address of the contact
     */
    email?: string | undefined;
    /**
     * A hash of key/value pairs containing any other data about the contact
     */
    metadata?: Array<{
        [k: string]: any;
    }> | undefined;
    /**
     * URL to the contact's avatar or logo
     */
    logoUrl?: string | undefined;
    /**
     * A list of tags associated with the contact
     */
    tags?: Array<string> | undefined;
};
/**
 * @deprecated Use identity instead. Information about the contact making the request.
 *
 * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
 */
export type StreamAgentContact = {
    /**
     * Unique identifier for the contact
     */
    id: string;
    /**
     * Display name of the contact
     */
    displayName?: string | undefined;
    /**
     * Email address of the contact
     */
    email?: string | undefined;
    /**
     * A hash of key/value pairs containing any other data about the contact
     */
    metadata?: Array<{
        [k: string]: any;
    }> | undefined;
    /**
     * URL to the contact's avatar or logo
     */
    logoUrl?: string | undefined;
    /**
     * A list of tags associated with the contact
     */
    tags?: Array<string> | undefined;
};
/**
 * Thread information to group related requests
 */
export type StreamAgentThread = {
    /**
     * Unique thread identifier to group related invocations.
     */
    id: string;
    /**
     * Optional tags to differentiate or categorize threads
     */
    tags?: Array<string> | undefined;
};
/**
 * Memory configuration for the agent execution. Used to associate memory stores with specific entities like users or sessions.
 */
export type StreamAgentMemory = {
    /**
     * An entity ID used to link memory stores to a specific user, session, or conversation. This ID is used to isolate and retrieve memories specific to the entity across agent executions.
     */
    entityId: string;
};
/**
 * Override template engine for this invocation. If not provided, uses the agent default.
 */
export declare const StreamAgentEngine: {
    readonly Text: "text";
    readonly Jinja: "jinja";
    readonly Mustache: "mustache";
};
/**
 * Override template engine for this invocation. If not provided, uses the agent default.
 */
export type StreamAgentEngine = ClosedEnum<typeof StreamAgentEngine>;
/**
 * Configuration options for the agent invocation
 */
export type StreamAgentConfiguration = {
    /**
     * Whether to block until the agent task completes. When true, the response will include the full task with messages. When false (default), returns immediately with task ID and status.
     */
    blocking?: boolean | undefined;
};
export type StreamAgentRequestBody = {
    /**
     * Optional task ID to continue an existing agent execution. When provided, the agent will continue the conversation from the existing task state. The task must be in an inactive state to continue.
     */
    taskId?: string | undefined;
    /**
     * The A2A message to send to the agent (user input or tool results)
     */
    message: StreamAgentA2AMessage;
    /**
     * Optional variables for template replacement in system prompt, instructions, and messages
     */
    variables?: {
        [k: string]: any;
    } | undefined;
    /**
     * Information about the identity making the request. If the identity does not exist, it will be created automatically.
     */
    identity?: StreamAgentIdentity | undefined;
    /**
     * @deprecated Use identity instead. Information about the contact making the request.
     *
     * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
     */
    contact?: StreamAgentContact | undefined;
    /**
     * Thread information to group related requests
     */
    thread?: StreamAgentThread | undefined;
    /**
     * Memory configuration for the agent execution. Used to associate memory stores with specific entities like users or sessions.
     */
    memory?: StreamAgentMemory | undefined;
    /**
     * Optional metadata for the agent invocation as key-value pairs that will be included in traces
     */
    metadata?: {
        [k: string]: any;
    } | undefined;
    /**
     * Override template engine for this invocation. If not provided, uses the agent default.
     */
    engine?: StreamAgentEngine | undefined;
    /**
     * Configuration options for the agent invocation
     */
    configuration?: StreamAgentConfiguration | undefined;
    /**
     * Stream timeout in seconds (1-3600). Default: 1800 (30 minutes)
     */
    streamTimeoutSeconds?: number | undefined;
};
export type StreamAgentRequest = {
    /**
     * The key or ID of the agent to invoke
     */
    key: string;
    requestBody: StreamAgentRequestBody;
};
export type StreamAgentData = components.AgentExecutionStartedStreamingEvent | components.AgentStartedStreamingEvent | components.AgentThoughtStreamingEvent | components.AgentInactiveStreamingEvent | components.AgentErroredStreamingEvent | components.ActionReviewRequestedStreamingEvent | components.ActionReviewedStreamingEvent | components.ExecutionReviewRequiredStreamingEvent | components.ExecutionReviewedStreamingEvent | components.ExecutionNamedStreamingEvent | components.AgentHandedOffStreamingEvent | components.AgentMessageCreatedStreamingEvent | components.ToolExecutionStartedStreamingEvent | components.ToolExecutionFinishedStreamingEvent | components.ToolExecutionFailedStreamingEvent | components.TimeoutStreamingEvent | components.ErrorStreamingEvent;
/**
 * Server-Sent Event stream successfully established. Returns real-time events including agent messages, tool calls, status updates, and completion signals. The stream ends with a [DONE] sentinel value.
 */
export type StreamAgentResponseBody = {
    data: components.AgentExecutionStartedStreamingEvent | components.AgentStartedStreamingEvent | components.AgentThoughtStreamingEvent | components.AgentInactiveStreamingEvent | components.AgentErroredStreamingEvent | components.ActionReviewRequestedStreamingEvent | components.ActionReviewedStreamingEvent | components.ExecutionReviewRequiredStreamingEvent | components.ExecutionReviewedStreamingEvent | components.ExecutionNamedStreamingEvent | components.AgentHandedOffStreamingEvent | components.AgentMessageCreatedStreamingEvent | components.ToolExecutionStartedStreamingEvent | components.ToolExecutionFinishedStreamingEvent | components.ToolExecutionFailedStreamingEvent | components.TimeoutStreamingEvent | components.ErrorStreamingEvent;
};
/** @internal */
export declare const StreamAgentRoleToolMessage$outboundSchema: z.ZodNativeEnum<typeof StreamAgentRoleToolMessage>;
/** @internal */
export declare const StreamAgentRoleUserMessage$outboundSchema: z.ZodNativeEnum<typeof StreamAgentRoleUserMessage>;
/** @internal */
export type StreamAgentRole$Outbound = string | string;
/** @internal */
export declare const StreamAgentRole$outboundSchema: z.ZodType<StreamAgentRole$Outbound, z.ZodTypeDef, StreamAgentRole>;
export declare function streamAgentRoleToJSON(streamAgentRole: StreamAgentRole): string;
/** @internal */
export type StreamAgentPublicMessagePart$Outbound = components.TextPart$Outbound | components.FilePart$Outbound | components.ToolResultPart$Outbound | components.ErrorPart$Outbound;
/** @internal */
export declare const StreamAgentPublicMessagePart$outboundSchema: z.ZodType<StreamAgentPublicMessagePart$Outbound, z.ZodTypeDef, StreamAgentPublicMessagePart>;
export declare function streamAgentPublicMessagePartToJSON(streamAgentPublicMessagePart: StreamAgentPublicMessagePart): string;
/** @internal */
export type StreamAgentA2AMessage$Outbound = {
    messageId?: string | undefined;
    role: string | string;
    parts: Array<components.TextPart$Outbound | components.FilePart$Outbound | components.ToolResultPart$Outbound | components.ErrorPart$Outbound>;
};
/** @internal */
export declare const StreamAgentA2AMessage$outboundSchema: z.ZodType<StreamAgentA2AMessage$Outbound, z.ZodTypeDef, StreamAgentA2AMessage>;
export declare function streamAgentA2AMessageToJSON(streamAgentA2AMessage: StreamAgentA2AMessage): string;
/** @internal */
export type StreamAgentIdentity$Outbound = {
    id: string;
    display_name?: string | undefined;
    email?: string | undefined;
    metadata?: Array<{
        [k: string]: any;
    }> | undefined;
    logo_url?: string | undefined;
    tags?: Array<string> | undefined;
};
/** @internal */
export declare const StreamAgentIdentity$outboundSchema: z.ZodType<StreamAgentIdentity$Outbound, z.ZodTypeDef, StreamAgentIdentity>;
export declare function streamAgentIdentityToJSON(streamAgentIdentity: StreamAgentIdentity): string;
/** @internal */
export type StreamAgentContact$Outbound = {
    id: string;
    display_name?: string | undefined;
    email?: string | undefined;
    metadata?: Array<{
        [k: string]: any;
    }> | undefined;
    logo_url?: string | undefined;
    tags?: Array<string> | undefined;
};
/** @internal */
export declare const StreamAgentContact$outboundSchema: z.ZodType<StreamAgentContact$Outbound, z.ZodTypeDef, StreamAgentContact>;
export declare function streamAgentContactToJSON(streamAgentContact: StreamAgentContact): string;
/** @internal */
export type StreamAgentThread$Outbound = {
    id: string;
    tags?: Array<string> | undefined;
};
/** @internal */
export declare const StreamAgentThread$outboundSchema: z.ZodType<StreamAgentThread$Outbound, z.ZodTypeDef, StreamAgentThread>;
export declare function streamAgentThreadToJSON(streamAgentThread: StreamAgentThread): string;
/** @internal */
export type StreamAgentMemory$Outbound = {
    entity_id: string;
};
/** @internal */
export declare const StreamAgentMemory$outboundSchema: z.ZodType<StreamAgentMemory$Outbound, z.ZodTypeDef, StreamAgentMemory>;
export declare function streamAgentMemoryToJSON(streamAgentMemory: StreamAgentMemory): string;
/** @internal */
export declare const StreamAgentEngine$outboundSchema: z.ZodNativeEnum<typeof StreamAgentEngine>;
/** @internal */
export type StreamAgentConfiguration$Outbound = {
    blocking: boolean;
};
/** @internal */
export declare const StreamAgentConfiguration$outboundSchema: z.ZodType<StreamAgentConfiguration$Outbound, z.ZodTypeDef, StreamAgentConfiguration>;
export declare function streamAgentConfigurationToJSON(streamAgentConfiguration: StreamAgentConfiguration): string;
/** @internal */
export type StreamAgentRequestBody$Outbound = {
    task_id?: string | undefined;
    message: StreamAgentA2AMessage$Outbound;
    variables?: {
        [k: string]: any;
    } | undefined;
    identity?: StreamAgentIdentity$Outbound | undefined;
    contact?: StreamAgentContact$Outbound | undefined;
    thread?: StreamAgentThread$Outbound | undefined;
    memory?: StreamAgentMemory$Outbound | undefined;
    metadata?: {
        [k: string]: any;
    } | undefined;
    engine?: string | undefined;
    configuration?: StreamAgentConfiguration$Outbound | undefined;
    stream_timeout_seconds?: number | undefined;
};
/** @internal */
export declare const StreamAgentRequestBody$outboundSchema: z.ZodType<StreamAgentRequestBody$Outbound, z.ZodTypeDef, StreamAgentRequestBody>;
export declare function streamAgentRequestBodyToJSON(streamAgentRequestBody: StreamAgentRequestBody): string;
/** @internal */
export type StreamAgentRequest$Outbound = {
    key: string;
    RequestBody: StreamAgentRequestBody$Outbound;
};
/** @internal */
export declare const StreamAgentRequest$outboundSchema: z.ZodType<StreamAgentRequest$Outbound, z.ZodTypeDef, StreamAgentRequest>;
export declare function streamAgentRequestToJSON(streamAgentRequest: StreamAgentRequest): string;
/** @internal */
export declare const StreamAgentData$inboundSchema: z.ZodType<StreamAgentData, z.ZodTypeDef, unknown>;
export declare function streamAgentDataFromJSON(jsonString: string): SafeParseResult<StreamAgentData, SDKValidationError>;
/** @internal */
export declare const StreamAgentResponseBody$inboundSchema: z.ZodType<StreamAgentResponseBody, z.ZodTypeDef, unknown>;
export declare function streamAgentResponseBodyFromJSON(jsonString: string): SafeParseResult<StreamAgentResponseBody, SDKValidationError>;
//# sourceMappingURL=streamagent.d.ts.map