"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.RunAgentModelConfigurationExecuteOn$outboundSchema = exports.RunAgentModelConfigurationId$outboundSchema = exports.RunAgentId1$outboundSchema = exports.RunAgentModelConfigurationModalities$outboundSchema = exports.RunAgentModelConfigurationToolChoice$outboundSchema = exports.RunAgentToolChoice1$outboundSchema = exports.RunAgentToolChoice2$outboundSchema = exports.RunAgentToolChoiceFunction$outboundSchema = exports.RunAgentToolChoiceType$outboundSchema = exports.RunAgentModelConfigurationThinking$outboundSchema = exports.RunAgentModelConfigurationStop$outboundSchema = exports.RunAgentModelConfigurationReasoningEffort$outboundSchema = exports.RunAgentModelConfigurationResponseFormat$outboundSchema = exports.RunAgentResponseFormatText$outboundSchema = exports.RunAgentResponseFormatJSONObject$outboundSchema = exports.RunAgentResponseFormatJSONSchema$outboundSchema = exports.RunAgentResponseFormatAgentsJsonSchema$outboundSchema = exports.RunAgentExtendedMessageRole = exports.RunAgentAgentsKind = exports.RunAgentTaskState = exports.RunAgentKind = exports.RunAgentEngine = exports.RunAgentAgentsExecuteOn = exports.RunAgentExecuteOn = exports.RunAgentToolApprovalRequired = exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12HttpType = exports.Method = exports.Language = exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools13CodeToolType = exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools14FunctionType = exports.ConnectionType = exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType = exports.RunAgentRoleUserMessage = exports.RunAgentRoleToolMessage = exports.RunAgentLoadBalancerAgentsType = exports.RunAgentFallbackModelConfigurationType = exports.RunAgentFallbackModelConfigurationExecuteOn = exports.RunAgentIdAgents1 = exports.RunAgentFallbackModelConfigurationModalities = exports.RunAgentToolChoiceAgents1 = exports.RunAgentToolChoiceAgentsType = exports.RunAgentFallbackModelConfigurationReasoningEffort = exports.RunAgentLoadBalancerType = exports.RunAgentModelConfigurationType = exports.RunAgentModelConfigurationExecuteOn = exports.RunAgentId1 = exports.RunAgentModelConfigurationModalities = exports.RunAgentToolChoice1 = exports.RunAgentToolChoiceType = exports.RunAgentModelConfigurationReasoningEffort = void 0;
exports.RunAgentContact$outboundSchema = exports.RunAgentIdentity$outboundSchema = exports.RunAgentA2AMessage$outboundSchema = exports.RunAgentPublicMessagePart$outboundSchema = exports.RunAgentRole$outboundSchema = exports.RunAgentRoleUserMessage$outboundSchema = exports.RunAgentRoleToolMessage$outboundSchema = exports.RunAgentFallbackModelConfiguration$outboundSchema = exports.RunAgentFallbackModelConfiguration2$outboundSchema = exports.RunAgentFallbackModelConfigurationRetry$outboundSchema = exports.RunAgentFallbackModelConfigurationParameters$outboundSchema = exports.RunAgentFallbackModelConfigurationTimeout$outboundSchema = exports.RunAgentFallbackModelConfigurationLoadBalancer$outboundSchema = exports.RunAgentLoadBalancerAgents1$outboundSchema = exports.RunAgentLoadBalancerAgentsModels$outboundSchema = exports.RunAgentLoadBalancerAgentsType$outboundSchema = exports.RunAgentFallbackModelConfigurationCache$outboundSchema = exports.RunAgentFallbackModelConfigurationType$outboundSchema = exports.RunAgentFallbackModelConfigurationFallbacks$outboundSchema = exports.RunAgentFallbackModelConfigurationGuardrails$outboundSchema = exports.RunAgentFallbackModelConfigurationExecuteOn$outboundSchema = exports.RunAgentFallbackModelConfigurationId$outboundSchema = exports.RunAgentIdAgents1$outboundSchema = exports.RunAgentFallbackModelConfigurationModalities$outboundSchema = exports.RunAgentFallbackModelConfigurationToolChoice$outboundSchema = exports.RunAgentToolChoiceAgents1$outboundSchema = exports.RunAgentToolChoiceAgents2$outboundSchema = exports.RunAgentToolChoiceAgentsFunction$outboundSchema = exports.RunAgentToolChoiceAgentsType$outboundSchema = exports.RunAgentFallbackModelConfigurationThinking$outboundSchema = exports.RunAgentFallbackModelConfigurationStop$outboundSchema = exports.RunAgentFallbackModelConfigurationReasoningEffort$outboundSchema = exports.RunAgentFallbackModelConfigurationResponseFormat$outboundSchema = exports.RunAgentResponseFormatAgentsText$outboundSchema = exports.RunAgentResponseFormatAgentsJSONObject$outboundSchema = exports.RunAgentResponseFormatAgentsRequestJSONSchema$outboundSchema = exports.RunAgentResponseFormatAgentsRequestRequestBodyJsonSchema$outboundSchema = exports.RunAgentModelConfiguration$outboundSchema = exports.RunAgentModelConfiguration2$outboundSchema = exports.RunAgentModelConfigurationRetry$outboundSchema = exports.RunAgentModelConfigurationParameters$outboundSchema = exports.RunAgentModelConfigurationTimeout$outboundSchema = exports.RunAgentModelConfigurationLoadBalancer$outboundSchema = exports.RunAgentLoadBalancer1$outboundSchema = exports.RunAgentLoadBalancerModels$outboundSchema = exports.RunAgentLoadBalancerType$outboundSchema = exports.RunAgentModelConfigurationCache$outboundSchema = exports.RunAgentModelConfigurationType$outboundSchema = exports.RunAgentModelConfigurationFallbacks$outboundSchema = exports.RunAgentModelConfigurationGuardrails$outboundSchema = void 0;
exports.RunAgentSettings$outboundSchema = exports.RunAgentGuardrails$outboundSchema = exports.RunAgentAgentsExecuteOn$outboundSchema = exports.RunAgentEvaluators$outboundSchema = exports.RunAgentExecuteOn$outboundSchema = exports.RunAgentToolApprovalRequired$outboundSchema = exports.AgentToolInputRun$outboundSchema = exports.AgentToolInputRunGoogleSearchTool$outboundSchema = exports.AgentToolInputRunWebScraperTool$outboundSchema = exports.AgentToolInputRunCallSubAgentTool$outboundSchema = exports.AgentToolInputRunRetrieveAgentsTool$outboundSchema = exports.AgentToolInputRunQueryMemoryStoreTool$outboundSchema = exports.AgentToolInputRunWriteMemoryStoreTool$outboundSchema = exports.AgentToolInputRunRetrieveMemoryStoresTool$outboundSchema = exports.AgentToolInputRunDeleteMemoryDocumentTool$outboundSchema = exports.AgentToolInputRunRetrieveKnowledgeBasesTool$outboundSchema = exports.AgentToolInputRunQueryKnowledgeBaseTool$outboundSchema = exports.AgentToolInputRunCurrentDateTool$outboundSchema = exports.HTTPToolRun$outboundSchema = exports.Http$outboundSchema = exports.Arguments$outboundSchema = exports.DefaultValue$outboundSchema = exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12HttpType$outboundSchema = exports.Blueprint$outboundSchema = exports.AgentToolInputRunHeaders$outboundSchema = exports.Headers2$outboundSchema = exports.Method$outboundSchema = exports.CodeToolRun$outboundSchema = exports.CodeTool$outboundSchema = exports.Language$outboundSchema = exports.AgentToolInputRunParameters$outboundSchema = exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools13CodeToolType$outboundSchema = exports.FunctionToolRun$outboundSchema = exports.AgentToolInputRunFunction$outboundSchema = exports.RunAgentAgentToolInputRunParameters$outboundSchema = exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools14FunctionType$outboundSchema = exports.JSONSchemaToolRun$outboundSchema = exports.AgentToolInputRunJsonSchema$outboundSchema = exports.Schema$outboundSchema = exports.MCPToolRun$outboundSchema = exports.Mcp$outboundSchema = exports.ConnectionType$outboundSchema = exports.Tools$outboundSchema = exports.AgentToolInputRunSchema$outboundSchema = exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType$outboundSchema = exports.RunAgentAgentToolInputRunHeaders$outboundSchema = exports.RunAgentTeamOfAgents$outboundSchema = exports.RunAgentKnowledgeBases$outboundSchema = exports.RunAgentMemory$outboundSchema = exports.RunAgentThread$outboundSchema = void 0;
exports.RunAgentA2ATaskResponse$inboundSchema = exports.RunAgentTaskStatus$inboundSchema = exports.RunAgentTaskStatusMessage$inboundSchema = exports.RunAgentParts$inboundSchema = exports.RunAgentExtendedMessageRole$inboundSchema = exports.RunAgentAgentsKind$inboundSchema = exports.RunAgentTaskState$inboundSchema = exports.RunAgentKind$inboundSchema = exports.RunAgentRequestBody$outboundSchema = exports.RunAgentEngine$outboundSchema = void 0;
exports.runAgentResponseFormatAgentsJsonSchemaToJSON = runAgentResponseFormatAgentsJsonSchemaToJSON;
exports.runAgentResponseFormatJSONSchemaToJSON = runAgentResponseFormatJSONSchemaToJSON;
exports.runAgentResponseFormatJSONObjectToJSON = runAgentResponseFormatJSONObjectToJSON;
exports.runAgentResponseFormatTextToJSON = runAgentResponseFormatTextToJSON;
exports.runAgentModelConfigurationResponseFormatToJSON = runAgentModelConfigurationResponseFormatToJSON;
exports.runAgentModelConfigurationStopToJSON = runAgentModelConfigurationStopToJSON;
exports.runAgentModelConfigurationThinkingToJSON = runAgentModelConfigurationThinkingToJSON;
exports.runAgentToolChoiceFunctionToJSON = runAgentToolChoiceFunctionToJSON;
exports.runAgentToolChoice2ToJSON = runAgentToolChoice2ToJSON;
exports.runAgentModelConfigurationToolChoiceToJSON = runAgentModelConfigurationToolChoiceToJSON;
exports.runAgentModelConfigurationIdToJSON = runAgentModelConfigurationIdToJSON;
exports.runAgentModelConfigurationGuardrailsToJSON = runAgentModelConfigurationGuardrailsToJSON;
exports.runAgentModelConfigurationFallbacksToJSON = runAgentModelConfigurationFallbacksToJSON;
exports.runAgentModelConfigurationCacheToJSON = runAgentModelConfigurationCacheToJSON;
exports.runAgentLoadBalancerModelsToJSON = runAgentLoadBalancerModelsToJSON;
exports.runAgentLoadBalancer1ToJSON = runAgentLoadBalancer1ToJSON;
exports.runAgentModelConfigurationLoadBalancerToJSON = runAgentModelConfigurationLoadBalancerToJSON;
exports.runAgentModelConfigurationTimeoutToJSON = runAgentModelConfigurationTimeoutToJSON;
exports.runAgentModelConfigurationParametersToJSON = runAgentModelConfigurationParametersToJSON;
exports.runAgentModelConfigurationRetryToJSON = runAgentModelConfigurationRetryToJSON;
exports.runAgentModelConfiguration2ToJSON = runAgentModelConfiguration2ToJSON;
exports.runAgentModelConfigurationToJSON = runAgentModelConfigurationToJSON;
exports.runAgentResponseFormatAgentsRequestRequestBodyJsonSchemaToJSON = runAgentResponseFormatAgentsRequestRequestBodyJsonSchemaToJSON;
exports.runAgentResponseFormatAgentsRequestJSONSchemaToJSON = runAgentResponseFormatAgentsRequestJSONSchemaToJSON;
exports.runAgentResponseFormatAgentsJSONObjectToJSON = runAgentResponseFormatAgentsJSONObjectToJSON;
exports.runAgentResponseFormatAgentsTextToJSON = runAgentResponseFormatAgentsTextToJSON;
exports.runAgentFallbackModelConfigurationResponseFormatToJSON = runAgentFallbackModelConfigurationResponseFormatToJSON;
exports.runAgentFallbackModelConfigurationStopToJSON = runAgentFallbackModelConfigurationStopToJSON;
exports.runAgentFallbackModelConfigurationThinkingToJSON = runAgentFallbackModelConfigurationThinkingToJSON;
exports.runAgentToolChoiceAgentsFunctionToJSON = runAgentToolChoiceAgentsFunctionToJSON;
exports.runAgentToolChoiceAgents2ToJSON = runAgentToolChoiceAgents2ToJSON;
exports.runAgentFallbackModelConfigurationToolChoiceToJSON = runAgentFallbackModelConfigurationToolChoiceToJSON;
exports.runAgentFallbackModelConfigurationIdToJSON = runAgentFallbackModelConfigurationIdToJSON;
exports.runAgentFallbackModelConfigurationGuardrailsToJSON = runAgentFallbackModelConfigurationGuardrailsToJSON;
exports.runAgentFallbackModelConfigurationFallbacksToJSON = runAgentFallbackModelConfigurationFallbacksToJSON;
exports.runAgentFallbackModelConfigurationCacheToJSON = runAgentFallbackModelConfigurationCacheToJSON;
exports.runAgentLoadBalancerAgentsModelsToJSON = runAgentLoadBalancerAgentsModelsToJSON;
exports.runAgentLoadBalancerAgents1ToJSON = runAgentLoadBalancerAgents1ToJSON;
exports.runAgentFallbackModelConfigurationLoadBalancerToJSON = runAgentFallbackModelConfigurationLoadBalancerToJSON;
exports.runAgentFallbackModelConfigurationTimeoutToJSON = runAgentFallbackModelConfigurationTimeoutToJSON;
exports.runAgentFallbackModelConfigurationParametersToJSON = runAgentFallbackModelConfigurationParametersToJSON;
exports.runAgentFallbackModelConfigurationRetryToJSON = runAgentFallbackModelConfigurationRetryToJSON;
exports.runAgentFallbackModelConfiguration2ToJSON = runAgentFallbackModelConfiguration2ToJSON;
exports.runAgentFallbackModelConfigurationToJSON = runAgentFallbackModelConfigurationToJSON;
exports.runAgentRoleToJSON = runAgentRoleToJSON;
exports.runAgentPublicMessagePartToJSON = runAgentPublicMessagePartToJSON;
exports.runAgentA2AMessageToJSON = runAgentA2AMessageToJSON;
exports.runAgentIdentityToJSON = runAgentIdentityToJSON;
exports.runAgentContactToJSON = runAgentContactToJSON;
exports.runAgentThreadToJSON = runAgentThreadToJSON;
exports.runAgentMemoryToJSON = runAgentMemoryToJSON;
exports.runAgentKnowledgeBasesToJSON = runAgentKnowledgeBasesToJSON;
exports.runAgentTeamOfAgentsToJSON = runAgentTeamOfAgentsToJSON;
exports.runAgentAgentToolInputRunHeadersToJSON = runAgentAgentToolInputRunHeadersToJSON;
exports.agentToolInputRunSchemaToJSON = agentToolInputRunSchemaToJSON;
exports.toolsToJSON = toolsToJSON;
exports.mcpToJSON = mcpToJSON;
exports.mcpToolRunToJSON = mcpToolRunToJSON;
exports.schemaToJSON = schemaToJSON;
exports.agentToolInputRunJsonSchemaToJSON = agentToolInputRunJsonSchemaToJSON;
exports.jsonSchemaToolRunToJSON = jsonSchemaToolRunToJSON;
exports.runAgentAgentToolInputRunParametersToJSON = runAgentAgentToolInputRunParametersToJSON;
exports.agentToolInputRunFunctionToJSON = agentToolInputRunFunctionToJSON;
exports.functionToolRunToJSON = functionToolRunToJSON;
exports.agentToolInputRunParametersToJSON = agentToolInputRunParametersToJSON;
exports.codeToolToJSON = codeToolToJSON;
exports.codeToolRunToJSON = codeToolRunToJSON;
exports.headers2ToJSON = headers2ToJSON;
exports.agentToolInputRunHeadersToJSON = agentToolInputRunHeadersToJSON;
exports.blueprintToJSON = blueprintToJSON;
exports.defaultValueToJSON = defaultValueToJSON;
exports.argumentsToJSON = argumentsToJSON;
exports.httpToJSON = httpToJSON;
exports.httpToolRunToJSON = httpToolRunToJSON;
exports.agentToolInputRunCurrentDateToolToJSON = agentToolInputRunCurrentDateToolToJSON;
exports.agentToolInputRunQueryKnowledgeBaseToolToJSON = agentToolInputRunQueryKnowledgeBaseToolToJSON;
exports.agentToolInputRunRetrieveKnowledgeBasesToolToJSON = agentToolInputRunRetrieveKnowledgeBasesToolToJSON;
exports.agentToolInputRunDeleteMemoryDocumentToolToJSON = agentToolInputRunDeleteMemoryDocumentToolToJSON;
exports.agentToolInputRunRetrieveMemoryStoresToolToJSON = agentToolInputRunRetrieveMemoryStoresToolToJSON;
exports.agentToolInputRunWriteMemoryStoreToolToJSON = agentToolInputRunWriteMemoryStoreToolToJSON;
exports.agentToolInputRunQueryMemoryStoreToolToJSON = agentToolInputRunQueryMemoryStoreToolToJSON;
exports.agentToolInputRunRetrieveAgentsToolToJSON = agentToolInputRunRetrieveAgentsToolToJSON;
exports.agentToolInputRunCallSubAgentToolToJSON = agentToolInputRunCallSubAgentToolToJSON;
exports.agentToolInputRunWebScraperToolToJSON = agentToolInputRunWebScraperToolToJSON;
exports.agentToolInputRunGoogleSearchToolToJSON = agentToolInputRunGoogleSearchToolToJSON;
exports.agentToolInputRunToJSON = agentToolInputRunToJSON;
exports.runAgentEvaluatorsToJSON = runAgentEvaluatorsToJSON;
exports.runAgentGuardrailsToJSON = runAgentGuardrailsToJSON;
exports.runAgentSettingsToJSON = runAgentSettingsToJSON;
exports.runAgentRequestBodyToJSON = runAgentRequestBodyToJSON;
exports.runAgentPartsFromJSON = runAgentPartsFromJSON;
exports.runAgentTaskStatusMessageFromJSON = runAgentTaskStatusMessageFromJSON;
exports.runAgentTaskStatusFromJSON = runAgentTaskStatusFromJSON;
exports.runAgentA2ATaskResponseFromJSON = runAgentA2ATaskResponseFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const components = __importStar(require("../components/index.js"));
/**
 * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
 *
 * @remarks
 *
 * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
 * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
 * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
 * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
 *
 * Any of "none", "minimal", "low", "medium", "high", "xhigh".
 */
exports.RunAgentModelConfigurationReasoningEffort = {
    None: "none",
    Minimal: "minimal",
    Low: "low",
    Medium: "medium",
    High: "high",
    Xhigh: "xhigh",
};
/**
 * The type of the tool. Currently, only function is supported.
 */
exports.RunAgentToolChoiceType = {
    Function: "function",
};
exports.RunAgentToolChoice1 = {
    None: "none",
    Auto: "auto",
    Required: "required",
};
exports.RunAgentModelConfigurationModalities = {
    Text: "text",
    Audio: "audio",
};
/**
 * The key of the guardrail.
 */
exports.RunAgentId1 = {
    OrqPiiDetection: "orq_pii_detection",
    OrqSexualModeration: "orq_sexual_moderation",
    OrqHarmfulModeration: "orq_harmful_moderation",
};
/**
 * Determines whether the guardrail runs on the input (user message) or output (model response).
 */
exports.RunAgentModelConfigurationExecuteOn = {
    Input: "input",
    Output: "output",
};
exports.RunAgentModelConfigurationType = {
    ExactMatch: "exact_match",
};
exports.RunAgentLoadBalancerType = {
    WeightBased: "weight_based",
};
/**
 * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
 *
 * @remarks
 *
 * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
 * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
 * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
 * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
 *
 * Any of "none", "minimal", "low", "medium", "high", "xhigh".
 */
exports.RunAgentFallbackModelConfigurationReasoningEffort = {
    None: "none",
    Minimal: "minimal",
    Low: "low",
    Medium: "medium",
    High: "high",
    Xhigh: "xhigh",
};
/**
 * The type of the tool. Currently, only function is supported.
 */
exports.RunAgentToolChoiceAgentsType = {
    Function: "function",
};
exports.RunAgentToolChoiceAgents1 = {
    None: "none",
    Auto: "auto",
    Required: "required",
};
exports.RunAgentFallbackModelConfigurationModalities = {
    Text: "text",
    Audio: "audio",
};
/**
 * The key of the guardrail.
 */
exports.RunAgentIdAgents1 = {
    OrqPiiDetection: "orq_pii_detection",
    OrqSexualModeration: "orq_sexual_moderation",
    OrqHarmfulModeration: "orq_harmful_moderation",
};
/**
 * Determines whether the guardrail runs on the input (user message) or output (model response).
 */
exports.RunAgentFallbackModelConfigurationExecuteOn = {
    Input: "input",
    Output: "output",
};
exports.RunAgentFallbackModelConfigurationType = {
    ExactMatch: "exact_match",
};
exports.RunAgentLoadBalancerAgentsType = {
    WeightBased: "weight_based",
};
/**
 * Message containing tool execution results
 */
exports.RunAgentRoleToolMessage = {
    Tool: "tool",
};
/**
 * Message from the end user
 */
exports.RunAgentRoleUserMessage = {
    User: "user",
};
exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType = {
    Object: "object",
};
/**
 * The connection type used by the MCP server
 */
exports.ConnectionType = {
    Http: "http",
    Sse: "sse",
};
/**
 * The type must be "object"
 */
exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools14FunctionType = {
    Object: "object",
};
/**
 * The type must be "object"
 */
exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools13CodeToolType = {
    Object: "object",
};
exports.Language = {
    Python: "python",
};
/**
 * The HTTP method to use.
 */
exports.Method = {
    Get: "GET",
    Post: "POST",
    Put: "PUT",
    Delete: "DELETE",
};
/**
 * The type of the argument.
 */
exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12HttpType = {
    String: "string",
    Number: "number",
    Boolean: "boolean",
};
/**
 * If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
 */
exports.RunAgentToolApprovalRequired = {
    All: "all",
    RespectTool: "respect_tool",
    None: "none",
};
/**
 * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
 */
exports.RunAgentExecuteOn = {
    Input: "input",
    Output: "output",
};
/**
 * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
 */
exports.RunAgentAgentsExecuteOn = {
    Input: "input",
    Output: "output",
};
/**
 * Template engine for variable interpolation. Text uses {{variable}} syntax, Jinja supports loops/conditionals/filters, Mustache uses {{#section}} syntax.
 */
exports.RunAgentEngine = {
    Text: "text",
    Jinja: "jinja",
    Mustache: "mustache",
};
/**
 * A2A entity type identifier
 */
exports.RunAgentKind = {
    Task: "task",
};
/**
 * 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.
 */
exports.RunAgentTaskState = {
    Submitted: "submitted",
    Working: "working",
    InputRequired: "input-required",
    AuthRequired: "auth-required",
    Completed: "completed",
    Failed: "failed",
    Canceled: "canceled",
    Rejected: "rejected",
};
exports.RunAgentAgentsKind = {
    Message: "message",
};
/**
 * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
 */
exports.RunAgentExtendedMessageRole = {
    User: "user",
    Agent: "agent",
    Tool: "tool",
    System: "system",
};
/** @internal */
exports.RunAgentResponseFormatAgentsJsonSchema$outboundSchema = z.object({
    description: z.string().optional(),
    name: z.string(),
    schema: z.any().optional(),
    strict: z.boolean().default(false),
});
function runAgentResponseFormatAgentsJsonSchemaToJSON(runAgentResponseFormatAgentsJsonSchema) {
    return JSON.stringify(exports.RunAgentResponseFormatAgentsJsonSchema$outboundSchema.parse(runAgentResponseFormatAgentsJsonSchema));
}
/** @internal */
exports.RunAgentResponseFormatJSONSchema$outboundSchema = z.object({
    type: z.literal("json_schema"),
    jsonSchema: z.lazy(() => exports.RunAgentResponseFormatAgentsJsonSchema$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        jsonSchema: "json_schema",
    });
});
function runAgentResponseFormatJSONSchemaToJSON(runAgentResponseFormatJSONSchema) {
    return JSON.stringify(exports.RunAgentResponseFormatJSONSchema$outboundSchema.parse(runAgentResponseFormatJSONSchema));
}
/** @internal */
exports.RunAgentResponseFormatJSONObject$outboundSchema = z.object({
    type: z.literal("json_object"),
});
function runAgentResponseFormatJSONObjectToJSON(runAgentResponseFormatJSONObject) {
    return JSON.stringify(exports.RunAgentResponseFormatJSONObject$outboundSchema.parse(runAgentResponseFormatJSONObject));
}
/** @internal */
exports.RunAgentResponseFormatText$outboundSchema = z.object({
    type: z.literal("text"),
});
function runAgentResponseFormatTextToJSON(runAgentResponseFormatText) {
    return JSON.stringify(exports.RunAgentResponseFormatText$outboundSchema.parse(runAgentResponseFormatText));
}
/** @internal */
exports.RunAgentModelConfigurationResponseFormat$outboundSchema = z.union([
    z.lazy(() => exports.RunAgentResponseFormatText$outboundSchema),
    z.lazy(() => exports.RunAgentResponseFormatJSONObject$outboundSchema),
    z.lazy(() => exports.RunAgentResponseFormatJSONSchema$outboundSchema),
]);
function runAgentModelConfigurationResponseFormatToJSON(runAgentModelConfigurationResponseFormat) {
    return JSON.stringify(exports.RunAgentModelConfigurationResponseFormat$outboundSchema.parse(runAgentModelConfigurationResponseFormat));
}
/** @internal */
exports.RunAgentModelConfigurationReasoningEffort$outboundSchema = z
    .nativeEnum(exports.RunAgentModelConfigurationReasoningEffort);
/** @internal */
exports.RunAgentModelConfigurationStop$outboundSchema = z.union([z.string(), z.array(z.string())]);
function runAgentModelConfigurationStopToJSON(runAgentModelConfigurationStop) {
    return JSON.stringify(exports.RunAgentModelConfigurationStop$outboundSchema.parse(runAgentModelConfigurationStop));
}
/** @internal */
exports.RunAgentModelConfigurationThinking$outboundSchema = z.union([
    components.ThinkingConfigDisabledSchema$outboundSchema,
    components.ThinkingConfigEnabledSchema$outboundSchema,
    components.ThinkingConfigAdaptiveSchema$outboundSchema,
]);
function runAgentModelConfigurationThinkingToJSON(runAgentModelConfigurationThinking) {
    return JSON.stringify(exports.RunAgentModelConfigurationThinking$outboundSchema.parse(runAgentModelConfigurationThinking));
}
/** @internal */
exports.RunAgentToolChoiceType$outboundSchema = z.nativeEnum(exports.RunAgentToolChoiceType);
/** @internal */
exports.RunAgentToolChoiceFunction$outboundSchema = z.object({
    name: z.string(),
});
function runAgentToolChoiceFunctionToJSON(runAgentToolChoiceFunction) {
    return JSON.stringify(exports.RunAgentToolChoiceFunction$outboundSchema.parse(runAgentToolChoiceFunction));
}
/** @internal */
exports.RunAgentToolChoice2$outboundSchema = z.object({
    type: exports.RunAgentToolChoiceType$outboundSchema.optional(),
    function: z.lazy(() => exports.RunAgentToolChoiceFunction$outboundSchema),
});
function runAgentToolChoice2ToJSON(runAgentToolChoice2) {
    return JSON.stringify(exports.RunAgentToolChoice2$outboundSchema.parse(runAgentToolChoice2));
}
/** @internal */
exports.RunAgentToolChoice1$outboundSchema = z.nativeEnum(exports.RunAgentToolChoice1);
/** @internal */
exports.RunAgentModelConfigurationToolChoice$outboundSchema = z.union([
    z.lazy(() => exports.RunAgentToolChoice2$outboundSchema),
    exports.RunAgentToolChoice1$outboundSchema,
]);
function runAgentModelConfigurationToolChoiceToJSON(runAgentModelConfigurationToolChoice) {
    return JSON.stringify(exports.RunAgentModelConfigurationToolChoice$outboundSchema.parse(runAgentModelConfigurationToolChoice));
}
/** @internal */
exports.RunAgentModelConfigurationModalities$outboundSchema = z.nativeEnum(exports.RunAgentModelConfigurationModalities);
/** @internal */
exports.RunAgentId1$outboundSchema = z
    .nativeEnum(exports.RunAgentId1);
/** @internal */
exports.RunAgentModelConfigurationId$outboundSchema = z.union([exports.RunAgentId1$outboundSchema, z.string()]);
function runAgentModelConfigurationIdToJSON(runAgentModelConfigurationId) {
    return JSON.stringify(exports.RunAgentModelConfigurationId$outboundSchema.parse(runAgentModelConfigurationId));
}
/** @internal */
exports.RunAgentModelConfigurationExecuteOn$outboundSchema = z.nativeEnum(exports.RunAgentModelConfigurationExecuteOn);
/** @internal */
exports.RunAgentModelConfigurationGuardrails$outboundSchema = z.object({
    id: z.union([exports.RunAgentId1$outboundSchema, z.string()]),
    executeOn: exports.RunAgentModelConfigurationExecuteOn$outboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        executeOn: "execute_on",
    });
});
function runAgentModelConfigurationGuardrailsToJSON(runAgentModelConfigurationGuardrails) {
    return JSON.stringify(exports.RunAgentModelConfigurationGuardrails$outboundSchema.parse(runAgentModelConfigurationGuardrails));
}
/** @internal */
exports.RunAgentModelConfigurationFallbacks$outboundSchema = z.object({
    model: z.string(),
});
function runAgentModelConfigurationFallbacksToJSON(runAgentModelConfigurationFallbacks) {
    return JSON.stringify(exports.RunAgentModelConfigurationFallbacks$outboundSchema.parse(runAgentModelConfigurationFallbacks));
}
/** @internal */
exports.RunAgentModelConfigurationType$outboundSchema = z.nativeEnum(exports.RunAgentModelConfigurationType);
/** @internal */
exports.RunAgentModelConfigurationCache$outboundSchema = z.object({
    ttl: z.number().default(1800),
    type: exports.RunAgentModelConfigurationType$outboundSchema,
});
function runAgentModelConfigurationCacheToJSON(runAgentModelConfigurationCache) {
    return JSON.stringify(exports.RunAgentModelConfigurationCache$outboundSchema.parse(runAgentModelConfigurationCache));
}
/** @internal */
exports.RunAgentLoadBalancerType$outboundSchema = z.nativeEnum(exports.RunAgentLoadBalancerType);
/** @internal */
exports.RunAgentLoadBalancerModels$outboundSchema = z.object({
    model: z.string(),
    weight: z.number().default(0.5),
});
function runAgentLoadBalancerModelsToJSON(runAgentLoadBalancerModels) {
    return JSON.stringify(exports.RunAgentLoadBalancerModels$outboundSchema.parse(runAgentLoadBalancerModels));
}
/** @internal */
exports.RunAgentLoadBalancer1$outboundSchema = z.object({
    type: exports.RunAgentLoadBalancerType$outboundSchema,
    models: z.array(z.lazy(() => exports.RunAgentLoadBalancerModels$outboundSchema)),
});
function runAgentLoadBalancer1ToJSON(runAgentLoadBalancer1) {
    return JSON.stringify(exports.RunAgentLoadBalancer1$outboundSchema.parse(runAgentLoadBalancer1));
}
/** @internal */
exports.RunAgentModelConfigurationLoadBalancer$outboundSchema = z.lazy(() => exports.RunAgentLoadBalancer1$outboundSchema);
function runAgentModelConfigurationLoadBalancerToJSON(runAgentModelConfigurationLoadBalancer) {
    return JSON.stringify(exports.RunAgentModelConfigurationLoadBalancer$outboundSchema.parse(runAgentModelConfigurationLoadBalancer));
}
/** @internal */
exports.RunAgentModelConfigurationTimeout$outboundSchema = z.object({
    callTimeout: z.number(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        callTimeout: "call_timeout",
    });
});
function runAgentModelConfigurationTimeoutToJSON(runAgentModelConfigurationTimeout) {
    return JSON.stringify(exports.RunAgentModelConfigurationTimeout$outboundSchema.parse(runAgentModelConfigurationTimeout));
}
/** @internal */
exports.RunAgentModelConfigurationParameters$outboundSchema = z.object({
    name: z.string().optional(),
    frequencyPenalty: z.nullable(z.number()).optional(),
    maxTokens: z.nullable(z.number().int()).optional(),
    maxCompletionTokens: z.nullable(z.number().int()).optional(),
    presencePenalty: z.nullable(z.number()).optional(),
    responseFormat: z.union([
        z.lazy(() => exports.RunAgentResponseFormatText$outboundSchema),
        z.lazy(() => exports.RunAgentResponseFormatJSONObject$outboundSchema),
        z.lazy(() => exports.RunAgentResponseFormatJSONSchema$outboundSchema),
    ]).optional(),
    reasoningEffort: exports.RunAgentModelConfigurationReasoningEffort$outboundSchema
        .optional(),
    verbosity: z.string().optional(),
    seed: z.nullable(z.number()).optional(),
    stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
    thinking: z.union([
        components.ThinkingConfigDisabledSchema$outboundSchema,
        components.ThinkingConfigEnabledSchema$outboundSchema,
        components.ThinkingConfigAdaptiveSchema$outboundSchema,
    ]).optional(),
    temperature: z.nullable(z.number()).optional(),
    topP: z.nullable(z.number()).optional(),
    topK: z.nullable(z.number()).optional(),
    toolChoice: z.union([
        z.lazy(() => exports.RunAgentToolChoice2$outboundSchema),
        exports.RunAgentToolChoice1$outboundSchema,
    ]).optional(),
    parallelToolCalls: z.boolean().optional(),
    modalities: z.nullable(z.array(exports.RunAgentModelConfigurationModalities$outboundSchema)).optional(),
    guardrails: z.array(z.lazy(() => exports.RunAgentModelConfigurationGuardrails$outboundSchema)).optional(),
    fallbacks: z.array(z.lazy(() => exports.RunAgentModelConfigurationFallbacks$outboundSchema)).optional(),
    cache: z.lazy(() => exports.RunAgentModelConfigurationCache$outboundSchema)
        .optional(),
    loadBalancer: z.lazy(() => exports.RunAgentLoadBalancer1$outboundSchema).optional(),
    timeout: z.lazy(() => exports.RunAgentModelConfigurationTimeout$outboundSchema)
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        frequencyPenalty: "frequency_penalty",
        maxTokens: "max_tokens",
        maxCompletionTokens: "max_completion_tokens",
        presencePenalty: "presence_penalty",
        responseFormat: "response_format",
        reasoningEffort: "reasoning_effort",
        topP: "top_p",
        topK: "top_k",
        toolChoice: "tool_choice",
        parallelToolCalls: "parallel_tool_calls",
        loadBalancer: "load_balancer",
    });
});
function runAgentModelConfigurationParametersToJSON(runAgentModelConfigurationParameters) {
    return JSON.stringify(exports.RunAgentModelConfigurationParameters$outboundSchema.parse(runAgentModelConfigurationParameters));
}
/** @internal */
exports.RunAgentModelConfigurationRetry$outboundSchema = z.object({
    count: z.number().default(3),
    onCodes: z.array(z.number()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        onCodes: "on_codes",
    });
});
function runAgentModelConfigurationRetryToJSON(runAgentModelConfigurationRetry) {
    return JSON.stringify(exports.RunAgentModelConfigurationRetry$outboundSchema.parse(runAgentModelConfigurationRetry));
}
/** @internal */
exports.RunAgentModelConfiguration2$outboundSchema = z.object({
    id: z.string(),
    parameters: z.lazy(() => exports.RunAgentModelConfigurationParameters$outboundSchema)
        .optional(),
    retry: z.lazy(() => exports.RunAgentModelConfigurationRetry$outboundSchema)
        .optional(),
});
function runAgentModelConfiguration2ToJSON(runAgentModelConfiguration2) {
    return JSON.stringify(exports.RunAgentModelConfiguration2$outboundSchema.parse(runAgentModelConfiguration2));
}
/** @internal */
exports.RunAgentModelConfiguration$outboundSchema = z.union([
    z.lazy(() => exports.RunAgentModelConfiguration2$outboundSchema),
    z.string(),
]);
function runAgentModelConfigurationToJSON(runAgentModelConfiguration) {
    return JSON.stringify(exports.RunAgentModelConfiguration$outboundSchema.parse(runAgentModelConfiguration));
}
/** @internal */
exports.RunAgentResponseFormatAgentsRequestRequestBodyJsonSchema$outboundSchema = z.object({
    description: z.string().optional(),
    name: z.string(),
    schema: z.any().optional(),
    strict: z.boolean().default(false),
});
function runAgentResponseFormatAgentsRequestRequestBodyJsonSchemaToJSON(runAgentResponseFormatAgentsRequestRequestBodyJsonSchema) {
    return JSON.stringify(exports.RunAgentResponseFormatAgentsRequestRequestBodyJsonSchema$outboundSchema
        .parse(runAgentResponseFormatAgentsRequestRequestBodyJsonSchema));
}
/** @internal */
exports.RunAgentResponseFormatAgentsRequestJSONSchema$outboundSchema = z.object({
    type: z.literal("json_schema"),
    jsonSchema: z.lazy(() => exports.RunAgentResponseFormatAgentsRequestRequestBodyJsonSchema$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        jsonSchema: "json_schema",
    });
});
function runAgentResponseFormatAgentsRequestJSONSchemaToJSON(runAgentResponseFormatAgentsRequestJSONSchema) {
    return JSON.stringify(exports.RunAgentResponseFormatAgentsRequestJSONSchema$outboundSchema.parse(runAgentResponseFormatAgentsRequestJSONSchema));
}
/** @internal */
exports.RunAgentResponseFormatAgentsJSONObject$outboundSchema = z.object({
    type: z.literal("json_object"),
});
function runAgentResponseFormatAgentsJSONObjectToJSON(runAgentResponseFormatAgentsJSONObject) {
    return JSON.stringify(exports.RunAgentResponseFormatAgentsJSONObject$outboundSchema.parse(runAgentResponseFormatAgentsJSONObject));
}
/** @internal */
exports.RunAgentResponseFormatAgentsText$outboundSchema = z.object({
    type: z.literal("text"),
});
function runAgentResponseFormatAgentsTextToJSON(runAgentResponseFormatAgentsText) {
    return JSON.stringify(exports.RunAgentResponseFormatAgentsText$outboundSchema.parse(runAgentResponseFormatAgentsText));
}
/** @internal */
exports.RunAgentFallbackModelConfigurationResponseFormat$outboundSchema = z.union([
    z.lazy(() => exports.RunAgentResponseFormatAgentsText$outboundSchema),
    z.lazy(() => exports.RunAgentResponseFormatAgentsJSONObject$outboundSchema),
    z.lazy(() => exports.RunAgentResponseFormatAgentsRequestJSONSchema$outboundSchema),
]);
function runAgentFallbackModelConfigurationResponseFormatToJSON(runAgentFallbackModelConfigurationResponseFormat) {
    return JSON.stringify(exports.RunAgentFallbackModelConfigurationResponseFormat$outboundSchema.parse(runAgentFallbackModelConfigurationResponseFormat));
}
/** @internal */
exports.RunAgentFallbackModelConfigurationReasoningEffort$outboundSchema = z
    .nativeEnum(exports.RunAgentFallbackModelConfigurationReasoningEffort);
/** @internal */
exports.RunAgentFallbackModelConfigurationStop$outboundSchema = z.union([z.string(), z.array(z.string())]);
function runAgentFallbackModelConfigurationStopToJSON(runAgentFallbackModelConfigurationStop) {
    return JSON.stringify(exports.RunAgentFallbackModelConfigurationStop$outboundSchema.parse(runAgentFallbackModelConfigurationStop));
}
/** @internal */
exports.RunAgentFallbackModelConfigurationThinking$outboundSchema = z.union([
    components.ThinkingConfigDisabledSchema$outboundSchema,
    components.ThinkingConfigEnabledSchema$outboundSchema,
    components.ThinkingConfigAdaptiveSchema$outboundSchema,
]);
function runAgentFallbackModelConfigurationThinkingToJSON(runAgentFallbackModelConfigurationThinking) {
    return JSON.stringify(exports.RunAgentFallbackModelConfigurationThinking$outboundSchema.parse(runAgentFallbackModelConfigurationThinking));
}
/** @internal */
exports.RunAgentToolChoiceAgentsType$outboundSchema = z.nativeEnum(exports.RunAgentToolChoiceAgentsType);
/** @internal */
exports.RunAgentToolChoiceAgentsFunction$outboundSchema = z.object({
    name: z.string(),
});
function runAgentToolChoiceAgentsFunctionToJSON(runAgentToolChoiceAgentsFunction) {
    return JSON.stringify(exports.RunAgentToolChoiceAgentsFunction$outboundSchema.parse(runAgentToolChoiceAgentsFunction));
}
/** @internal */
exports.RunAgentToolChoiceAgents2$outboundSchema = z.object({
    type: exports.RunAgentToolChoiceAgentsType$outboundSchema.optional(),
    function: z.lazy(() => exports.RunAgentToolChoiceAgentsFunction$outboundSchema),
});
function runAgentToolChoiceAgents2ToJSON(runAgentToolChoiceAgents2) {
    return JSON.stringify(exports.RunAgentToolChoiceAgents2$outboundSchema.parse(runAgentToolChoiceAgents2));
}
/** @internal */
exports.RunAgentToolChoiceAgents1$outboundSchema = z.nativeEnum(exports.RunAgentToolChoiceAgents1);
/** @internal */
exports.RunAgentFallbackModelConfigurationToolChoice$outboundSchema = z.union([
    z.lazy(() => exports.RunAgentToolChoiceAgents2$outboundSchema),
    exports.RunAgentToolChoiceAgents1$outboundSchema,
]);
function runAgentFallbackModelConfigurationToolChoiceToJSON(runAgentFallbackModelConfigurationToolChoice) {
    return JSON.stringify(exports.RunAgentFallbackModelConfigurationToolChoice$outboundSchema.parse(runAgentFallbackModelConfigurationToolChoice));
}
/** @internal */
exports.RunAgentFallbackModelConfigurationModalities$outboundSchema = z
    .nativeEnum(exports.RunAgentFallbackModelConfigurationModalities);
/** @internal */
exports.RunAgentIdAgents1$outboundSchema = z.nativeEnum(exports.RunAgentIdAgents1);
/** @internal */
exports.RunAgentFallbackModelConfigurationId$outboundSchema = z.union([exports.RunAgentIdAgents1$outboundSchema, z.string()]);
function runAgentFallbackModelConfigurationIdToJSON(runAgentFallbackModelConfigurationId) {
    return JSON.stringify(exports.RunAgentFallbackModelConfigurationId$outboundSchema.parse(runAgentFallbackModelConfigurationId));
}
/** @internal */
exports.RunAgentFallbackModelConfigurationExecuteOn$outboundSchema = z
    .nativeEnum(exports.RunAgentFallbackModelConfigurationExecuteOn);
/** @internal */
exports.RunAgentFallbackModelConfigurationGuardrails$outboundSchema = z.object({
    id: z.union([exports.RunAgentIdAgents1$outboundSchema, z.string()]),
    executeOn: exports.RunAgentFallbackModelConfigurationExecuteOn$outboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        executeOn: "execute_on",
    });
});
function runAgentFallbackModelConfigurationGuardrailsToJSON(runAgentFallbackModelConfigurationGuardrails) {
    return JSON.stringify(exports.RunAgentFallbackModelConfigurationGuardrails$outboundSchema.parse(runAgentFallbackModelConfigurationGuardrails));
}
/** @internal */
exports.RunAgentFallbackModelConfigurationFallbacks$outboundSchema = z.object({
    model: z.string(),
});
function runAgentFallbackModelConfigurationFallbacksToJSON(runAgentFallbackModelConfigurationFallbacks) {
    return JSON.stringify(exports.RunAgentFallbackModelConfigurationFallbacks$outboundSchema.parse(runAgentFallbackModelConfigurationFallbacks));
}
/** @internal */
exports.RunAgentFallbackModelConfigurationType$outboundSchema = z.nativeEnum(exports.RunAgentFallbackModelConfigurationType);
/** @internal */
exports.RunAgentFallbackModelConfigurationCache$outboundSchema = z.object({
    ttl: z.number().default(1800),
    type: exports.RunAgentFallbackModelConfigurationType$outboundSchema,
});
function runAgentFallbackModelConfigurationCacheToJSON(runAgentFallbackModelConfigurationCache) {
    return JSON.stringify(exports.RunAgentFallbackModelConfigurationCache$outboundSchema.parse(runAgentFallbackModelConfigurationCache));
}
/** @internal */
exports.RunAgentLoadBalancerAgentsType$outboundSchema = z.nativeEnum(exports.RunAgentLoadBalancerAgentsType);
/** @internal */
exports.RunAgentLoadBalancerAgentsModels$outboundSchema = z.object({
    model: z.string(),
    weight: z.number().default(0.5),
});
function runAgentLoadBalancerAgentsModelsToJSON(runAgentLoadBalancerAgentsModels) {
    return JSON.stringify(exports.RunAgentLoadBalancerAgentsModels$outboundSchema.parse(runAgentLoadBalancerAgentsModels));
}
/** @internal */
exports.RunAgentLoadBalancerAgents1$outboundSchema = z.object({
    type: exports.RunAgentLoadBalancerAgentsType$outboundSchema,
    models: z.array(z.lazy(() => exports.RunAgentLoadBalancerAgentsModels$outboundSchema)),
});
function runAgentLoadBalancerAgents1ToJSON(runAgentLoadBalancerAgents1) {
    return JSON.stringify(exports.RunAgentLoadBalancerAgents1$outboundSchema.parse(runAgentLoadBalancerAgents1));
}
/** @internal */
exports.RunAgentFallbackModelConfigurationLoadBalancer$outboundSchema = z.lazy(() => exports.RunAgentLoadBalancerAgents1$outboundSchema);
function runAgentFallbackModelConfigurationLoadBalancerToJSON(runAgentFallbackModelConfigurationLoadBalancer) {
    return JSON.stringify(exports.RunAgentFallbackModelConfigurationLoadBalancer$outboundSchema.parse(runAgentFallbackModelConfigurationLoadBalancer));
}
/** @internal */
exports.RunAgentFallbackModelConfigurationTimeout$outboundSchema = z.object({
    callTimeout: z.number(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        callTimeout: "call_timeout",
    });
});
function runAgentFallbackModelConfigurationTimeoutToJSON(runAgentFallbackModelConfigurationTimeout) {
    return JSON.stringify(exports.RunAgentFallbackModelConfigurationTimeout$outboundSchema.parse(runAgentFallbackModelConfigurationTimeout));
}
/** @internal */
exports.RunAgentFallbackModelConfigurationParameters$outboundSchema = z.object({
    name: z.string().optional(),
    frequencyPenalty: z.nullable(z.number()).optional(),
    maxTokens: z.nullable(z.number().int()).optional(),
    maxCompletionTokens: z.nullable(z.number().int()).optional(),
    presencePenalty: z.nullable(z.number()).optional(),
    responseFormat: z.union([
        z.lazy(() => exports.RunAgentResponseFormatAgentsText$outboundSchema),
        z.lazy(() => exports.RunAgentResponseFormatAgentsJSONObject$outboundSchema),
        z.lazy(() => exports.RunAgentResponseFormatAgentsRequestJSONSchema$outboundSchema),
    ]).optional(),
    reasoningEffort: exports.RunAgentFallbackModelConfigurationReasoningEffort$outboundSchema
        .optional(),
    verbosity: z.string().optional(),
    seed: z.nullable(z.number()).optional(),
    stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
    thinking: z.union([
        components.ThinkingConfigDisabledSchema$outboundSchema,
        components.ThinkingConfigEnabledSchema$outboundSchema,
        components.ThinkingConfigAdaptiveSchema$outboundSchema,
    ]).optional(),
    temperature: z.nullable(z.number()).optional(),
    topP: z.nullable(z.number()).optional(),
    topK: z.nullable(z.number()).optional(),
    toolChoice: z.union([
        z.lazy(() => exports.RunAgentToolChoiceAgents2$outboundSchema),
        exports.RunAgentToolChoiceAgents1$outboundSchema,
    ]).optional(),
    parallelToolCalls: z.boolean().optional(),
    modalities: z.nullable(z.array(exports.RunAgentFallbackModelConfigurationModalities$outboundSchema)).optional(),
    guardrails: z.array(z.lazy(() => exports.RunAgentFallbackModelConfigurationGuardrails$outboundSchema)).optional(),
    fallbacks: z.array(z.lazy(() => exports.RunAgentFallbackModelConfigurationFallbacks$outboundSchema)).optional(),
    cache: z.lazy(() => exports.RunAgentFallbackModelConfigurationCache$outboundSchema)
        .optional(),
    loadBalancer: z.lazy(() => exports.RunAgentLoadBalancerAgents1$outboundSchema)
        .optional(),
    timeout: z.lazy(() => exports.RunAgentFallbackModelConfigurationTimeout$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        frequencyPenalty: "frequency_penalty",
        maxTokens: "max_tokens",
        maxCompletionTokens: "max_completion_tokens",
        presencePenalty: "presence_penalty",
        responseFormat: "response_format",
        reasoningEffort: "reasoning_effort",
        topP: "top_p",
        topK: "top_k",
        toolChoice: "tool_choice",
        parallelToolCalls: "parallel_tool_calls",
        loadBalancer: "load_balancer",
    });
});
function runAgentFallbackModelConfigurationParametersToJSON(runAgentFallbackModelConfigurationParameters) {
    return JSON.stringify(exports.RunAgentFallbackModelConfigurationParameters$outboundSchema.parse(runAgentFallbackModelConfigurationParameters));
}
/** @internal */
exports.RunAgentFallbackModelConfigurationRetry$outboundSchema = z.object({
    count: z.number().default(3),
    onCodes: z.array(z.number()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        onCodes: "on_codes",
    });
});
function runAgentFallbackModelConfigurationRetryToJSON(runAgentFallbackModelConfigurationRetry) {
    return JSON.stringify(exports.RunAgentFallbackModelConfigurationRetry$outboundSchema.parse(runAgentFallbackModelConfigurationRetry));
}
/** @internal */
exports.RunAgentFallbackModelConfiguration2$outboundSchema = z.object({
    id: z.string(),
    parameters: z.lazy(() => exports.RunAgentFallbackModelConfigurationParameters$outboundSchema).optional(),
    retry: z.lazy(() => exports.RunAgentFallbackModelConfigurationRetry$outboundSchema)
        .optional(),
});
function runAgentFallbackModelConfiguration2ToJSON(runAgentFallbackModelConfiguration2) {
    return JSON.stringify(exports.RunAgentFallbackModelConfiguration2$outboundSchema.parse(runAgentFallbackModelConfiguration2));
}
/** @internal */
exports.RunAgentFallbackModelConfiguration$outboundSchema = z.union([
    z.lazy(() => exports.RunAgentFallbackModelConfiguration2$outboundSchema),
    z.string(),
]);
function runAgentFallbackModelConfigurationToJSON(runAgentFallbackModelConfiguration) {
    return JSON.stringify(exports.RunAgentFallbackModelConfiguration$outboundSchema.parse(runAgentFallbackModelConfiguration));
}
/** @internal */
exports.RunAgentRoleToolMessage$outboundSchema = z.nativeEnum(exports.RunAgentRoleToolMessage);
/** @internal */
exports.RunAgentRoleUserMessage$outboundSchema = z.nativeEnum(exports.RunAgentRoleUserMessage);
/** @internal */
exports.RunAgentRole$outboundSchema = z.union([
    exports.RunAgentRoleUserMessage$outboundSchema,
    exports.RunAgentRoleToolMessage$outboundSchema,
]);
function runAgentRoleToJSON(runAgentRole) {
    return JSON.stringify(exports.RunAgentRole$outboundSchema.parse(runAgentRole));
}
/** @internal */
exports.RunAgentPublicMessagePart$outboundSchema = z.union([
    components.TextPart$outboundSchema,
    components.FilePart$outboundSchema,
    components.ToolResultPart$outboundSchema,
    components.ErrorPart$outboundSchema,
]);
function runAgentPublicMessagePartToJSON(runAgentPublicMessagePart) {
    return JSON.stringify(exports.RunAgentPublicMessagePart$outboundSchema.parse(runAgentPublicMessagePart));
}
/** @internal */
exports.RunAgentA2AMessage$outboundSchema = z.object({
    messageId: z.string().optional(),
    role: z.union([
        exports.RunAgentRoleUserMessage$outboundSchema,
        exports.RunAgentRoleToolMessage$outboundSchema,
    ]),
    parts: z.array(z.union([
        components.TextPart$outboundSchema,
        components.FilePart$outboundSchema,
        components.ToolResultPart$outboundSchema,
        components.ErrorPart$outboundSchema,
    ])),
});
function runAgentA2AMessageToJSON(runAgentA2AMessage) {
    return JSON.stringify(exports.RunAgentA2AMessage$outboundSchema.parse(runAgentA2AMessage));
}
/** @internal */
exports.RunAgentIdentity$outboundSchema = z.object({
    id: z.string(),
    displayName: z.string().optional(),
    email: z.string().optional(),
    metadata: z.array(z.record(z.any())).optional(),
    logoUrl: z.string().optional(),
    tags: z.array(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
        logoUrl: "logo_url",
    });
});
function runAgentIdentityToJSON(runAgentIdentity) {
    return JSON.stringify(exports.RunAgentIdentity$outboundSchema.parse(runAgentIdentity));
}
/** @internal */
exports.RunAgentContact$outboundSchema = z.object({
    id: z.string(),
    displayName: z.string().optional(),
    email: z.string().optional(),
    metadata: z.array(z.record(z.any())).optional(),
    logoUrl: z.string().optional(),
    tags: z.array(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
        logoUrl: "logo_url",
    });
});
function runAgentContactToJSON(runAgentContact) {
    return JSON.stringify(exports.RunAgentContact$outboundSchema.parse(runAgentContact));
}
/** @internal */
exports.RunAgentThread$outboundSchema = z.object({
    id: z.string(),
    tags: z.array(z.string()).optional(),
});
function runAgentThreadToJSON(runAgentThread) {
    return JSON.stringify(exports.RunAgentThread$outboundSchema.parse(runAgentThread));
}
/** @internal */
exports.RunAgentMemory$outboundSchema = z.object({
    entityId: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        entityId: "entity_id",
    });
});
function runAgentMemoryToJSON(runAgentMemory) {
    return JSON.stringify(exports.RunAgentMemory$outboundSchema.parse(runAgentMemory));
}
/** @internal */
exports.RunAgentKnowledgeBases$outboundSchema = z.object({
    knowledgeId: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        knowledgeId: "knowledge_id",
    });
});
function runAgentKnowledgeBasesToJSON(runAgentKnowledgeBases) {
    return JSON.stringify(exports.RunAgentKnowledgeBases$outboundSchema.parse(runAgentKnowledgeBases));
}
/** @internal */
exports.RunAgentTeamOfAgents$outboundSchema = z.object({
    key: z.string(),
    role: z.string().optional(),
});
function runAgentTeamOfAgentsToJSON(runAgentTeamOfAgents) {
    return JSON.stringify(exports.RunAgentTeamOfAgents$outboundSchema.parse(runAgentTeamOfAgents));
}
/** @internal */
exports.RunAgentAgentToolInputRunHeaders$outboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
function runAgentAgentToolInputRunHeadersToJSON(runAgentAgentToolInputRunHeaders) {
    return JSON.stringify(exports.RunAgentAgentToolInputRunHeaders$outboundSchema.parse(runAgentAgentToolInputRunHeaders));
}
/** @internal */
exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType$outboundSchema = z.nativeEnum(exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType);
/** @internal */
exports.AgentToolInputRunSchema$outboundSchema = z.object({
    type: exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType$outboundSchema,
    properties: z.record(z.any()).optional(),
    required: z.array(z.string()).optional(),
});
function agentToolInputRunSchemaToJSON(agentToolInputRunSchema) {
    return JSON.stringify(exports.AgentToolInputRunSchema$outboundSchema.parse(agentToolInputRunSchema));
}
/** @internal */
exports.Tools$outboundSchema = z.object({
    id: z.string().default("01KRXSQ3AXNJTZEYSTQ4SK1GEH"),
    name: z.string(),
    description: z.string().optional(),
    schema: z.lazy(() => exports.AgentToolInputRunSchema$outboundSchema),
});
function toolsToJSON(tools) {
    return JSON.stringify(exports.Tools$outboundSchema.parse(tools));
}
/** @internal */
exports.ConnectionType$outboundSchema = z.nativeEnum(exports.ConnectionType);
/** @internal */
exports.Mcp$outboundSchema = z
    .object({
    serverUrl: z.string(),
    headers: z.record(z.lazy(() => exports.RunAgentAgentToolInputRunHeaders$outboundSchema)).optional(),
    tools: z.array(z.lazy(() => exports.Tools$outboundSchema)),
    connectionType: exports.ConnectionType$outboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        serverUrl: "server_url",
        connectionType: "connection_type",
    });
});
function mcpToJSON(mcp) {
    return JSON.stringify(exports.Mcp$outboundSchema.parse(mcp));
}
/** @internal */
exports.MCPToolRun$outboundSchema = z.object({
    type: z.literal("mcp"),
    key: z.string(),
    id: z.string().optional(),
    displayName: z.string().optional(),
    description: z.string(),
    mcp: z.lazy(() => exports.Mcp$outboundSchema),
    requiresApproval: z.boolean().default(false),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        id: "_id",
        displayName: "display_name",
        requiresApproval: "requires_approval",
    });
});
function mcpToolRunToJSON(mcpToolRun) {
    return JSON.stringify(exports.MCPToolRun$outboundSchema.parse(mcpToolRun));
}
/** @internal */
exports.Schema$outboundSchema = z.object({
    type: z.string(),
    properties: z.record(z.any()),
    required: z.array(z.string()),
    additionalProperties: z.record(z.any()).optional(),
}).transform((v) => {
    return {
        ...v.additionalProperties,
        ...(0, primitives_js_1.remap)(v, {
            additionalProperties: null,
        }),
    };
});
function schemaToJSON(schema) {
    return JSON.stringify(exports.Schema$outboundSchema.parse(schema));
}
/** @internal */
exports.AgentToolInputRunJsonSchema$outboundSchema = z.object({
    name: z.string(),
    description: z.string(),
    schema: z.lazy(() => exports.Schema$outboundSchema),
    strict: z.boolean().optional(),
});
function agentToolInputRunJsonSchemaToJSON(agentToolInputRunJsonSchema) {
    return JSON.stringify(exports.AgentToolInputRunJsonSchema$outboundSchema.parse(agentToolInputRunJsonSchema));
}
/** @internal */
exports.JSONSchemaToolRun$outboundSchema = z.object({
    type: z.literal("json_schema"),
    key: z.string(),
    id: z.string().optional(),
    displayName: z.string().optional(),
    description: z.string(),
    jsonSchema: z.lazy(() => exports.AgentToolInputRunJsonSchema$outboundSchema),
    requiresApproval: z.boolean().default(false),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        id: "_id",
        displayName: "display_name",
        jsonSchema: "json_schema",
        requiresApproval: "requires_approval",
    });
});
function jsonSchemaToolRunToJSON(jsonSchemaToolRun) {
    return JSON.stringify(exports.JSONSchemaToolRun$outboundSchema.parse(jsonSchemaToolRun));
}
/** @internal */
exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools14FunctionType$outboundSchema = z.nativeEnum(exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools14FunctionType);
/** @internal */
exports.RunAgentAgentToolInputRunParameters$outboundSchema = z.object({
    type: exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools14FunctionType$outboundSchema,
    properties: z.record(z.any()),
    required: z.array(z.string()),
    additionalProperties: z.record(z.any()).optional(),
}).transform((v) => {
    return {
        ...v.additionalProperties,
        ...(0, primitives_js_1.remap)(v, {
            additionalProperties: null,
        }),
    };
});
function runAgentAgentToolInputRunParametersToJSON(runAgentAgentToolInputRunParameters) {
    return JSON.stringify(exports.RunAgentAgentToolInputRunParameters$outboundSchema.parse(runAgentAgentToolInputRunParameters));
}
/** @internal */
exports.AgentToolInputRunFunction$outboundSchema = z.object({
    name: z.string(),
    description: z.string().optional(),
    strict: z.boolean().optional(),
    parameters: z.lazy(() => exports.RunAgentAgentToolInputRunParameters$outboundSchema)
        .optional(),
});
function agentToolInputRunFunctionToJSON(agentToolInputRunFunction) {
    return JSON.stringify(exports.AgentToolInputRunFunction$outboundSchema.parse(agentToolInputRunFunction));
}
/** @internal */
exports.FunctionToolRun$outboundSchema = z.object({
    type: z.literal("function"),
    key: z.string(),
    id: z.string().optional(),
    displayName: z.string().optional(),
    description: z.string().optional(),
    function: z.lazy(() => exports.AgentToolInputRunFunction$outboundSchema),
    requiresApproval: z.boolean().default(false),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        id: "_id",
        displayName: "display_name",
        requiresApproval: "requires_approval",
    });
});
function functionToolRunToJSON(functionToolRun) {
    return JSON.stringify(exports.FunctionToolRun$outboundSchema.parse(functionToolRun));
}
/** @internal */
exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools13CodeToolType$outboundSchema = z.nativeEnum(exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools13CodeToolType);
/** @internal */
exports.AgentToolInputRunParameters$outboundSchema = z.object({
    type: exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools13CodeToolType$outboundSchema,
    properties: z.record(z.any()),
    required: z.array(z.string()),
    additionalProperties: z.record(z.any()).optional(),
}).transform((v) => {
    return {
        ...v.additionalProperties,
        ...(0, primitives_js_1.remap)(v, {
            additionalProperties: null,
        }),
    };
});
function agentToolInputRunParametersToJSON(agentToolInputRunParameters) {
    return JSON.stringify(exports.AgentToolInputRunParameters$outboundSchema.parse(agentToolInputRunParameters));
}
/** @internal */
exports.Language$outboundSchema = z
    .nativeEnum(exports.Language);
/** @internal */
exports.CodeTool$outboundSchema = z.object({
    parameters: z.lazy(() => exports.AgentToolInputRunParameters$outboundSchema)
        .optional(),
    language: exports.Language$outboundSchema,
    code: z.string(),
});
function codeToolToJSON(codeTool) {
    return JSON.stringify(exports.CodeTool$outboundSchema.parse(codeTool));
}
/** @internal */
exports.CodeToolRun$outboundSchema = z.object({
    type: z.literal("code"),
    key: z.string(),
    id: z.string().optional(),
    displayName: z.string().optional(),
    description: z.string(),
    codeTool: z.lazy(() => exports.CodeTool$outboundSchema),
    requiresApproval: z.boolean().default(false),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        id: "_id",
        displayName: "display_name",
        codeTool: "code_tool",
        requiresApproval: "requires_approval",
    });
});
function codeToolRunToJSON(codeToolRun) {
    return JSON.stringify(exports.CodeToolRun$outboundSchema.parse(codeToolRun));
}
/** @internal */
exports.Method$outboundSchema = z
    .nativeEnum(exports.Method);
/** @internal */
exports.Headers2$outboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
function headers2ToJSON(headers2) {
    return JSON.stringify(exports.Headers2$outboundSchema.parse(headers2));
}
/** @internal */
exports.AgentToolInputRunHeaders$outboundSchema = z.union([z.lazy(() => exports.Headers2$outboundSchema), z.string()]);
function agentToolInputRunHeadersToJSON(agentToolInputRunHeaders) {
    return JSON.stringify(exports.AgentToolInputRunHeaders$outboundSchema.parse(agentToolInputRunHeaders));
}
/** @internal */
exports.Blueprint$outboundSchema = z.object({
    url: z.string(),
    method: exports.Method$outboundSchema,
    headers: z.record(z.union([z.lazy(() => exports.Headers2$outboundSchema), z.string()])).optional(),
    body: z.record(z.any()).optional(),
});
function blueprintToJSON(blueprint) {
    return JSON.stringify(exports.Blueprint$outboundSchema.parse(blueprint));
}
/** @internal */
exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12HttpType$outboundSchema = z.nativeEnum(exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12HttpType);
/** @internal */
exports.DefaultValue$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function defaultValueToJSON(defaultValue) {
    return JSON.stringify(exports.DefaultValue$outboundSchema.parse(defaultValue));
}
/** @internal */
exports.Arguments$outboundSchema = z.object({
    type: exports.RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools12HttpType$outboundSchema,
    description: z.string(),
    sendToModel: z.boolean().default(true),
    defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sendToModel: "send_to_model",
        defaultValue: "default_value",
    });
});
function argumentsToJSON(value) {
    return JSON.stringify(exports.Arguments$outboundSchema.parse(value));
}
/** @internal */
exports.Http$outboundSchema = z.object({
    blueprint: z.lazy(() => exports.Blueprint$outboundSchema),
    arguments: z.record(z.lazy(() => exports.Arguments$outboundSchema)).optional(),
});
function httpToJSON(http) {
    return JSON.stringify(exports.Http$outboundSchema.parse(http));
}
/** @internal */
exports.HTTPToolRun$outboundSchema = z.object({
    type: z.literal("http"),
    key: z.string(),
    id: z.string().optional(),
    displayName: z.string().optional(),
    description: z.string(),
    http: z.lazy(() => exports.Http$outboundSchema),
    requiresApproval: z.boolean().default(false),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        id: "_id",
        displayName: "display_name",
        requiresApproval: "requires_approval",
    });
});
function httpToolRunToJSON(httpToolRun) {
    return JSON.stringify(exports.HTTPToolRun$outboundSchema.parse(httpToolRun));
}
/** @internal */
exports.AgentToolInputRunCurrentDateTool$outboundSchema = z.object({
    type: z.literal("current_date"),
    requiresApproval: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        requiresApproval: "requires_approval",
    });
});
function agentToolInputRunCurrentDateToolToJSON(agentToolInputRunCurrentDateTool) {
    return JSON.stringify(exports.AgentToolInputRunCurrentDateTool$outboundSchema.parse(agentToolInputRunCurrentDateTool));
}
/** @internal */
exports.AgentToolInputRunQueryKnowledgeBaseTool$outboundSchema = z.object({
    type: z.literal("query_knowledge_base"),
    requiresApproval: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        requiresApproval: "requires_approval",
    });
});
function agentToolInputRunQueryKnowledgeBaseToolToJSON(agentToolInputRunQueryKnowledgeBaseTool) {
    return JSON.stringify(exports.AgentToolInputRunQueryKnowledgeBaseTool$outboundSchema.parse(agentToolInputRunQueryKnowledgeBaseTool));
}
/** @internal */
exports.AgentToolInputRunRetrieveKnowledgeBasesTool$outboundSchema = z.object({
    type: z.literal("retrieve_knowledge_bases"),
    requiresApproval: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        requiresApproval: "requires_approval",
    });
});
function agentToolInputRunRetrieveKnowledgeBasesToolToJSON(agentToolInputRunRetrieveKnowledgeBasesTool) {
    return JSON.stringify(exports.AgentToolInputRunRetrieveKnowledgeBasesTool$outboundSchema.parse(agentToolInputRunRetrieveKnowledgeBasesTool));
}
/** @internal */
exports.AgentToolInputRunDeleteMemoryDocumentTool$outboundSchema = z.object({
    type: z.literal("delete_memory_document"),
    requiresApproval: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        requiresApproval: "requires_approval",
    });
});
function agentToolInputRunDeleteMemoryDocumentToolToJSON(agentToolInputRunDeleteMemoryDocumentTool) {
    return JSON.stringify(exports.AgentToolInputRunDeleteMemoryDocumentTool$outboundSchema.parse(agentToolInputRunDeleteMemoryDocumentTool));
}
/** @internal */
exports.AgentToolInputRunRetrieveMemoryStoresTool$outboundSchema = z.object({
    type: z.literal("retrieve_memory_stores"),
    requiresApproval: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        requiresApproval: "requires_approval",
    });
});
function agentToolInputRunRetrieveMemoryStoresToolToJSON(agentToolInputRunRetrieveMemoryStoresTool) {
    return JSON.stringify(exports.AgentToolInputRunRetrieveMemoryStoresTool$outboundSchema.parse(agentToolInputRunRetrieveMemoryStoresTool));
}
/** @internal */
exports.AgentToolInputRunWriteMemoryStoreTool$outboundSchema = z.object({
    type: z.literal("write_memory_store"),
    requiresApproval: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        requiresApproval: "requires_approval",
    });
});
function agentToolInputRunWriteMemoryStoreToolToJSON(agentToolInputRunWriteMemoryStoreTool) {
    return JSON.stringify(exports.AgentToolInputRunWriteMemoryStoreTool$outboundSchema.parse(agentToolInputRunWriteMemoryStoreTool));
}
/** @internal */
exports.AgentToolInputRunQueryMemoryStoreTool$outboundSchema = z.object({
    type: z.literal("query_memory_store"),
    requiresApproval: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        requiresApproval: "requires_approval",
    });
});
function agentToolInputRunQueryMemoryStoreToolToJSON(agentToolInputRunQueryMemoryStoreTool) {
    return JSON.stringify(exports.AgentToolInputRunQueryMemoryStoreTool$outboundSchema.parse(agentToolInputRunQueryMemoryStoreTool));
}
/** @internal */
exports.AgentToolInputRunRetrieveAgentsTool$outboundSchema = z.object({
    type: z.literal("retrieve_agents"),
    requiresApproval: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        requiresApproval: "requires_approval",
    });
});
function agentToolInputRunRetrieveAgentsToolToJSON(agentToolInputRunRetrieveAgentsTool) {
    return JSON.stringify(exports.AgentToolInputRunRetrieveAgentsTool$outboundSchema.parse(agentToolInputRunRetrieveAgentsTool));
}
/** @internal */
exports.AgentToolInputRunCallSubAgentTool$outboundSchema = z.object({
    type: z.literal("call_sub_agent"),
    requiresApproval: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        requiresApproval: "requires_approval",
    });
});
function agentToolInputRunCallSubAgentToolToJSON(agentToolInputRunCallSubAgentTool) {
    return JSON.stringify(exports.AgentToolInputRunCallSubAgentTool$outboundSchema.parse(agentToolInputRunCallSubAgentTool));
}
/** @internal */
exports.AgentToolInputRunWebScraperTool$outboundSchema = z.object({
    type: z.literal("web_scraper"),
    requiresApproval: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        requiresApproval: "requires_approval",
    });
});
function agentToolInputRunWebScraperToolToJSON(agentToolInputRunWebScraperTool) {
    return JSON.stringify(exports.AgentToolInputRunWebScraperTool$outboundSchema.parse(agentToolInputRunWebScraperTool));
}
/** @internal */
exports.AgentToolInputRunGoogleSearchTool$outboundSchema = z.object({
    type: z.literal("google_search"),
    requiresApproval: z.boolean().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        requiresApproval: "requires_approval",
    });
});
function agentToolInputRunGoogleSearchToolToJSON(agentToolInputRunGoogleSearchTool) {
    return JSON.stringify(exports.AgentToolInputRunGoogleSearchTool$outboundSchema.parse(agentToolInputRunGoogleSearchTool));
}
/** @internal */
exports.AgentToolInputRun$outboundSchema = z.union([
    z.lazy(() => exports.AgentToolInputRunGoogleSearchTool$outboundSchema),
    z.lazy(() => exports.AgentToolInputRunWebScraperTool$outboundSchema),
    z.lazy(() => exports.AgentToolInputRunCallSubAgentTool$outboundSchema),
    z.lazy(() => exports.AgentToolInputRunRetrieveAgentsTool$outboundSchema),
    z.lazy(() => exports.AgentToolInputRunQueryMemoryStoreTool$outboundSchema),
    z.lazy(() => exports.AgentToolInputRunWriteMemoryStoreTool$outboundSchema),
    z.lazy(() => exports.AgentToolInputRunRetrieveMemoryStoresTool$outboundSchema),
    z.lazy(() => exports.AgentToolInputRunDeleteMemoryDocumentTool$outboundSchema),
    z.lazy(() => exports.AgentToolInputRunRetrieveKnowledgeBasesTool$outboundSchema),
    z.lazy(() => exports.AgentToolInputRunQueryKnowledgeBaseTool$outboundSchema),
    z.lazy(() => exports.AgentToolInputRunCurrentDateTool$outboundSchema),
    z.lazy(() => exports.HTTPToolRun$outboundSchema),
    z.lazy(() => exports.CodeToolRun$outboundSchema),
    z.lazy(() => exports.FunctionToolRun$outboundSchema),
    z.lazy(() => exports.JSONSchemaToolRun$outboundSchema),
    z.lazy(() => exports.MCPToolRun$outboundSchema),
]);
function agentToolInputRunToJSON(agentToolInputRun) {
    return JSON.stringify(exports.AgentToolInputRun$outboundSchema.parse(agentToolInputRun));
}
/** @internal */
exports.RunAgentToolApprovalRequired$outboundSchema = z.nativeEnum(exports.RunAgentToolApprovalRequired);
/** @internal */
exports.RunAgentExecuteOn$outboundSchema = z.nativeEnum(exports.RunAgentExecuteOn);
/** @internal */
exports.RunAgentEvaluators$outboundSchema = z.object({
    id: z.string(),
    sampleRate: z.number().default(50),
    executeOn: exports.RunAgentExecuteOn$outboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sampleRate: "sample_rate",
        executeOn: "execute_on",
    });
});
function runAgentEvaluatorsToJSON(runAgentEvaluators) {
    return JSON.stringify(exports.RunAgentEvaluators$outboundSchema.parse(runAgentEvaluators));
}
/** @internal */
exports.RunAgentAgentsExecuteOn$outboundSchema = z.nativeEnum(exports.RunAgentAgentsExecuteOn);
/** @internal */
exports.RunAgentGuardrails$outboundSchema = z.object({
    id: z.string(),
    sampleRate: z.number().default(50),
    executeOn: exports.RunAgentAgentsExecuteOn$outboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sampleRate: "sample_rate",
        executeOn: "execute_on",
    });
});
function runAgentGuardrailsToJSON(runAgentGuardrails) {
    return JSON.stringify(exports.RunAgentGuardrails$outboundSchema.parse(runAgentGuardrails));
}
/** @internal */
exports.RunAgentSettings$outboundSchema = z.object({
    tools: z.array(z.union([
        z.lazy(() => exports.AgentToolInputRunGoogleSearchTool$outboundSchema),
        z.lazy(() => exports.AgentToolInputRunWebScraperTool$outboundSchema),
        z.lazy(() => exports.AgentToolInputRunCallSubAgentTool$outboundSchema),
        z.lazy(() => exports.AgentToolInputRunRetrieveAgentsTool$outboundSchema),
        z.lazy(() => exports.AgentToolInputRunQueryMemoryStoreTool$outboundSchema),
        z.lazy(() => exports.AgentToolInputRunWriteMemoryStoreTool$outboundSchema),
        z.lazy(() => exports.AgentToolInputRunRetrieveMemoryStoresTool$outboundSchema),
        z.lazy(() => exports.AgentToolInputRunDeleteMemoryDocumentTool$outboundSchema),
        z.lazy(() => exports.AgentToolInputRunRetrieveKnowledgeBasesTool$outboundSchema),
        z.lazy(() => exports.AgentToolInputRunQueryKnowledgeBaseTool$outboundSchema),
        z.lazy(() => exports.AgentToolInputRunCurrentDateTool$outboundSchema),
        z.lazy(() => exports.HTTPToolRun$outboundSchema),
        z.lazy(() => exports.CodeToolRun$outboundSchema),
        z.lazy(() => exports.FunctionToolRun$outboundSchema),
        z.lazy(() => exports.JSONSchemaToolRun$outboundSchema),
        z.lazy(() => exports.MCPToolRun$outboundSchema),
    ])).optional(),
    toolApprovalRequired: exports.RunAgentToolApprovalRequired$outboundSchema.default("none"),
    maxIterations: z.number().int().default(100),
    maxExecutionTime: z.number().int().default(600),
    maxCost: z.number().default(0),
    evaluators: z.array(z.lazy(() => exports.RunAgentEvaluators$outboundSchema))
        .optional(),
    guardrails: z.array(z.lazy(() => exports.RunAgentGuardrails$outboundSchema))
        .optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolApprovalRequired: "tool_approval_required",
        maxIterations: "max_iterations",
        maxExecutionTime: "max_execution_time",
        maxCost: "max_cost",
    });
});
function runAgentSettingsToJSON(runAgentSettings) {
    return JSON.stringify(exports.RunAgentSettings$outboundSchema.parse(runAgentSettings));
}
/** @internal */
exports.RunAgentEngine$outboundSchema = z.nativeEnum(exports.RunAgentEngine);
/** @internal */
exports.RunAgentRequestBody$outboundSchema = z.object({
    key: z.string(),
    taskId: z.string().optional(),
    model: z.union([
        z.lazy(() => exports.RunAgentModelConfiguration2$outboundSchema),
        z.string(),
    ]),
    fallbackModels: z.array(z.union([
        z.lazy(() => exports.RunAgentFallbackModelConfiguration2$outboundSchema),
        z.string(),
    ])).optional(),
    role: z.string(),
    instructions: z.string(),
    message: z.lazy(() => exports.RunAgentA2AMessage$outboundSchema),
    variables: z.record(z.any()).optional(),
    identity: z.lazy(() => exports.RunAgentIdentity$outboundSchema).optional(),
    contact: z.lazy(() => exports.RunAgentContact$outboundSchema).optional(),
    thread: z.lazy(() => exports.RunAgentThread$outboundSchema).optional(),
    memory: z.lazy(() => exports.RunAgentMemory$outboundSchema).optional(),
    path: z.string(),
    description: z.string().optional(),
    systemPrompt: z.nullable(z.string()).optional(),
    memoryStores: z.array(z.string()).optional(),
    knowledgeBases: z.array(z.lazy(() => exports.RunAgentKnowledgeBases$outboundSchema))
        .optional(),
    teamOfAgents: z.array(z.lazy(() => exports.RunAgentTeamOfAgents$outboundSchema))
        .optional(),
    settings: z.lazy(() => exports.RunAgentSettings$outboundSchema),
    metadata: z.record(z.any()).optional(),
    engine: exports.RunAgentEngine$outboundSchema.default("text"),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        taskId: "task_id",
        fallbackModels: "fallback_models",
        systemPrompt: "system_prompt",
        memoryStores: "memory_stores",
        knowledgeBases: "knowledge_bases",
        teamOfAgents: "team_of_agents",
    });
});
function runAgentRequestBodyToJSON(runAgentRequestBody) {
    return JSON.stringify(exports.RunAgentRequestBody$outboundSchema.parse(runAgentRequestBody));
}
/** @internal */
exports.RunAgentKind$inboundSchema = z.nativeEnum(exports.RunAgentKind);
/** @internal */
exports.RunAgentTaskState$inboundSchema = z.nativeEnum(exports.RunAgentTaskState);
/** @internal */
exports.RunAgentAgentsKind$inboundSchema = z.nativeEnum(exports.RunAgentAgentsKind);
/** @internal */
exports.RunAgentExtendedMessageRole$inboundSchema = z.nativeEnum(exports.RunAgentExtendedMessageRole);
/** @internal */
exports.RunAgentParts$inboundSchema = z.union([
    components.TextPart$inboundSchema,
    components.ErrorPart$inboundSchema,
    components.DataPart$inboundSchema,
    components.FilePart$inboundSchema,
    components.ToolCallPart$inboundSchema,
    components.ToolResultPart$inboundSchema,
]);
function runAgentPartsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RunAgentParts$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RunAgentParts' from JSON`);
}
/** @internal */
exports.RunAgentTaskStatusMessage$inboundSchema = z.object({
    kind: exports.RunAgentAgentsKind$inboundSchema,
    messageId: z.string(),
    role: exports.RunAgentExtendedMessageRole$inboundSchema,
    parts: z.array(z.union([
        components.TextPart$inboundSchema,
        components.ErrorPart$inboundSchema,
        components.DataPart$inboundSchema,
        components.FilePart$inboundSchema,
        components.ToolCallPart$inboundSchema,
        components.ToolResultPart$inboundSchema,
    ])),
});
function runAgentTaskStatusMessageFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RunAgentTaskStatusMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RunAgentTaskStatusMessage' from JSON`);
}
/** @internal */
exports.RunAgentTaskStatus$inboundSchema = z.object({
    state: exports.RunAgentTaskState$inboundSchema,
    timestamp: z.string().optional(),
    message: z.lazy(() => exports.RunAgentTaskStatusMessage$inboundSchema).optional(),
});
function runAgentTaskStatusFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RunAgentTaskStatus$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RunAgentTaskStatus' from JSON`);
}
/** @internal */
exports.RunAgentA2ATaskResponse$inboundSchema = z.object({
    id: z.string(),
    contextId: z.string(),
    kind: exports.RunAgentKind$inboundSchema,
    status: z.lazy(() => exports.RunAgentTaskStatus$inboundSchema),
    messages: z.array(components.ExtendedMessage$inboundSchema).optional(),
    metadata: z.record(z.any()).optional(),
});
function runAgentA2ATaskResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RunAgentA2ATaskResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RunAgentA2ATaskResponse' from JSON`);
}
//# sourceMappingURL=runagent.js.map