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 InvokeAgentRoleToolMessage: {
    readonly Tool: "tool";
};
/**
 * Message containing tool execution results
 */
export type InvokeAgentRoleToolMessage = ClosedEnum<typeof InvokeAgentRoleToolMessage>;
/**
 * Message from the end user
 */
export declare const InvokeAgentRoleUserMessage: {
    readonly User: "user";
};
/**
 * Message from the end user
 */
export type InvokeAgentRoleUserMessage = ClosedEnum<typeof InvokeAgentRoleUserMessage>;
/**
 * Message role (user or tool for continuing executions)
 */
export type InvokeAgentRole = InvokeAgentRoleUserMessage | InvokeAgentRoleToolMessage;
/**
 * 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 InvokeAgentPublicMessagePart = components.TextPart | components.FilePart | components.ToolResultPart | components.ErrorPart;
/**
 * The A2A message to send to the agent (user input or tool results)
 */
export type InvokeAgentA2AMessage = {
    /**
     * Optional A2A message ID in ULID format
     */
    messageId?: string | undefined;
    /**
     * Message role (user or tool for continuing executions)
     */
    role: InvokeAgentRoleUserMessage | InvokeAgentRoleToolMessage;
    /**
     * 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 InvokeAgentIdentity = {
    /**
     * 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 InvokeAgentContact = {
    /**
     * 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 InvokeAgentThread = {
    /**
     * 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 InvokeAgentMemory = {
    /**
     * 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;
};
/**
 * Configuration options for the agent invocation
 */
export type InvokeAgentConfiguration = {
    /**
     * 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 InvokeAgentRequestBody = {
    /**
     * 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: InvokeAgentA2AMessage;
    /**
     * 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?: InvokeAgentIdentity | 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?: InvokeAgentContact | undefined;
    /**
     * Thread information to group related requests
     */
    thread?: InvokeAgentThread | undefined;
    /**
     * Memory configuration for the agent execution. Used to associate memory stores with specific entities like users or sessions.
     */
    memory?: InvokeAgentMemory | undefined;
    /**
     * Optional metadata for the agent invocation as key-value pairs that will be included in traces
     */
    metadata?: {
        [k: string]: any;
    } | undefined;
    /**
     * Configuration options for the agent invocation
     */
    configuration?: InvokeAgentConfiguration | undefined;
};
export type InvokeAgentRequest = {
    /**
     * The key or ID of the agent to invoke
     */
    key: string;
    requestBody?: InvokeAgentRequestBody | undefined;
};
/**
 * A2A entity type identifier
 */
export declare const Kind: {
    readonly Task: "task";
};
/**
 * A2A entity type identifier
 */
export type Kind = ClosedEnum<typeof Kind>;
/**
 * Current state of the agent task execution. Values: submitted (queued), working (executing), input-required (awaiting user input), completed (finished successfully), failed (error occurred). Note: auth-required, canceled, and rejected statuses are defined for A2A protocol compatibility but are not currently supported in task execution.
 */
export declare const TaskState: {
    readonly Submitted: "submitted";
    readonly Working: "working";
    readonly InputRequired: "input-required";
    readonly AuthRequired: "auth-required";
    readonly Completed: "completed";
    readonly Failed: "failed";
    readonly Canceled: "canceled";
    readonly Rejected: "rejected";
};
/**
 * Current state of the agent task execution. Values: submitted (queued), working (executing), input-required (awaiting user input), completed (finished successfully), failed (error occurred). Note: auth-required, canceled, and rejected statuses are defined for A2A protocol compatibility but are not currently supported in task execution.
 */
export type TaskState = ClosedEnum<typeof TaskState>;
export declare const InvokeAgentKind: {
    readonly Message: "message";
};
export type InvokeAgentKind = ClosedEnum<typeof InvokeAgentKind>;
/**
 * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
 */
export declare const ExtendedMessageRole: {
    readonly User: "user";
    readonly Agent: "agent";
    readonly Tool: "tool";
    readonly System: "system";
};
/**
 * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
 */
export type ExtendedMessageRole = ClosedEnum<typeof ExtendedMessageRole>;
export type Parts = components.TextPart | components.ErrorPart | components.DataPart | components.FilePart | components.ToolCallPart | components.ToolResultPart;
/**
 * Optional A2A message providing additional context about the current status
 */
export type TaskStatusMessage = {
    kind: InvokeAgentKind;
    messageId: string;
    /**
     * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
     */
    role: ExtendedMessageRole;
    parts: Array<components.TextPart | components.ErrorPart | components.DataPart | components.FilePart | components.ToolCallPart | components.ToolResultPart>;
};
/**
 * Current task status information
 */
export type TaskStatus = {
    /**
     * Current state of the agent task execution. Values: submitted (queued), working (executing), input-required (awaiting user input), completed (finished successfully), failed (error occurred). Note: auth-required, canceled, and rejected statuses are defined for A2A protocol compatibility but are not currently supported in task execution.
     */
    state: TaskState;
    /**
     * ISO 8601 timestamp of when the status was updated
     */
    timestamp?: string | undefined;
    /**
     * Optional A2A message providing additional context about the current status
     */
    message?: TaskStatusMessage | undefined;
};
/**
 * Response format following the Agent-to-Agent (A2A) protocol. Returned when starting or continuing an agent task execution.
 */
export type InvokeAgentA2ATaskResponse = {
    /**
     * The unique ID of the created agent execution task
     */
    id: string;
    /**
     * The correlation ID for this execution (used for tracking)
     */
    contextId: string;
    /**
     * A2A entity type identifier
     */
    kind: Kind;
    /**
     * Current task status information
     */
    status: TaskStatus;
    /**
     * Array of messages in the task conversation. Only present when blocking mode is enabled.
     */
    messages?: Array<components.ExtendedMessage> | undefined;
    /**
     * Task metadata containing workspace_id and trace_id for feedback and tracking
     */
    metadata?: {
        [k: string]: any;
    } | undefined;
};
/** @internal */
export declare const InvokeAgentRoleToolMessage$outboundSchema: z.ZodNativeEnum<typeof InvokeAgentRoleToolMessage>;
/** @internal */
export declare const InvokeAgentRoleUserMessage$outboundSchema: z.ZodNativeEnum<typeof InvokeAgentRoleUserMessage>;
/** @internal */
export type InvokeAgentRole$Outbound = string | string;
/** @internal */
export declare const InvokeAgentRole$outboundSchema: z.ZodType<InvokeAgentRole$Outbound, z.ZodTypeDef, InvokeAgentRole>;
export declare function invokeAgentRoleToJSON(invokeAgentRole: InvokeAgentRole): string;
/** @internal */
export type InvokeAgentPublicMessagePart$Outbound = components.TextPart$Outbound | components.FilePart$Outbound | components.ToolResultPart$Outbound | components.ErrorPart$Outbound;
/** @internal */
export declare const InvokeAgentPublicMessagePart$outboundSchema: z.ZodType<InvokeAgentPublicMessagePart$Outbound, z.ZodTypeDef, InvokeAgentPublicMessagePart>;
export declare function invokeAgentPublicMessagePartToJSON(invokeAgentPublicMessagePart: InvokeAgentPublicMessagePart): string;
/** @internal */
export type InvokeAgentA2AMessage$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 InvokeAgentA2AMessage$outboundSchema: z.ZodType<InvokeAgentA2AMessage$Outbound, z.ZodTypeDef, InvokeAgentA2AMessage>;
export declare function invokeAgentA2AMessageToJSON(invokeAgentA2AMessage: InvokeAgentA2AMessage): string;
/** @internal */
export type InvokeAgentIdentity$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 InvokeAgentIdentity$outboundSchema: z.ZodType<InvokeAgentIdentity$Outbound, z.ZodTypeDef, InvokeAgentIdentity>;
export declare function invokeAgentIdentityToJSON(invokeAgentIdentity: InvokeAgentIdentity): string;
/** @internal */
export type InvokeAgentContact$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 InvokeAgentContact$outboundSchema: z.ZodType<InvokeAgentContact$Outbound, z.ZodTypeDef, InvokeAgentContact>;
export declare function invokeAgentContactToJSON(invokeAgentContact: InvokeAgentContact): string;
/** @internal */
export type InvokeAgentThread$Outbound = {
    id: string;
    tags?: Array<string> | undefined;
};
/** @internal */
export declare const InvokeAgentThread$outboundSchema: z.ZodType<InvokeAgentThread$Outbound, z.ZodTypeDef, InvokeAgentThread>;
export declare function invokeAgentThreadToJSON(invokeAgentThread: InvokeAgentThread): string;
/** @internal */
export type InvokeAgentMemory$Outbound = {
    entity_id: string;
};
/** @internal */
export declare const InvokeAgentMemory$outboundSchema: z.ZodType<InvokeAgentMemory$Outbound, z.ZodTypeDef, InvokeAgentMemory>;
export declare function invokeAgentMemoryToJSON(invokeAgentMemory: InvokeAgentMemory): string;
/** @internal */
export type InvokeAgentConfiguration$Outbound = {
    blocking: boolean;
};
/** @internal */
export declare const InvokeAgentConfiguration$outboundSchema: z.ZodType<InvokeAgentConfiguration$Outbound, z.ZodTypeDef, InvokeAgentConfiguration>;
export declare function invokeAgentConfigurationToJSON(invokeAgentConfiguration: InvokeAgentConfiguration): string;
/** @internal */
export type InvokeAgentRequestBody$Outbound = {
    task_id?: string | undefined;
    message: InvokeAgentA2AMessage$Outbound;
    variables?: {
        [k: string]: any;
    } | undefined;
    identity?: InvokeAgentIdentity$Outbound | undefined;
    contact?: InvokeAgentContact$Outbound | undefined;
    thread?: InvokeAgentThread$Outbound | undefined;
    memory?: InvokeAgentMemory$Outbound | undefined;
    metadata?: {
        [k: string]: any;
    } | undefined;
    configuration?: InvokeAgentConfiguration$Outbound | undefined;
};
/** @internal */
export declare const InvokeAgentRequestBody$outboundSchema: z.ZodType<InvokeAgentRequestBody$Outbound, z.ZodTypeDef, InvokeAgentRequestBody>;
export declare function invokeAgentRequestBodyToJSON(invokeAgentRequestBody: InvokeAgentRequestBody): string;
/** @internal */
export type InvokeAgentRequest$Outbound = {
    key: string;
    RequestBody?: InvokeAgentRequestBody$Outbound | undefined;
};
/** @internal */
export declare const InvokeAgentRequest$outboundSchema: z.ZodType<InvokeAgentRequest$Outbound, z.ZodTypeDef, InvokeAgentRequest>;
export declare function invokeAgentRequestToJSON(invokeAgentRequest: InvokeAgentRequest): string;
/** @internal */
export declare const Kind$inboundSchema: z.ZodNativeEnum<typeof Kind>;
/** @internal */
export declare const TaskState$inboundSchema: z.ZodNativeEnum<typeof TaskState>;
/** @internal */
export declare const InvokeAgentKind$inboundSchema: z.ZodNativeEnum<typeof InvokeAgentKind>;
/** @internal */
export declare const ExtendedMessageRole$inboundSchema: z.ZodNativeEnum<typeof ExtendedMessageRole>;
/** @internal */
export declare const Parts$inboundSchema: z.ZodType<Parts, z.ZodTypeDef, unknown>;
export declare function partsFromJSON(jsonString: string): SafeParseResult<Parts, SDKValidationError>;
/** @internal */
export declare const TaskStatusMessage$inboundSchema: z.ZodType<TaskStatusMessage, z.ZodTypeDef, unknown>;
export declare function taskStatusMessageFromJSON(jsonString: string): SafeParseResult<TaskStatusMessage, SDKValidationError>;
/** @internal */
export declare const TaskStatus$inboundSchema: z.ZodType<TaskStatus, z.ZodTypeDef, unknown>;
export declare function taskStatusFromJSON(jsonString: string): SafeParseResult<TaskStatus, SDKValidationError>;
/** @internal */
export declare const InvokeAgentA2ATaskResponse$inboundSchema: z.ZodType<InvokeAgentA2ATaskResponse, z.ZodTypeDef, unknown>;
export declare function invokeAgentA2ATaskResponseFromJSON(jsonString: string): SafeParseResult<InvokeAgentA2ATaskResponse, SDKValidationError>;
//# sourceMappingURL=invokeagent.d.ts.map