export type CallbackConfig = {position?: string | undefined, taskName?: string | undefined}; export type CliConfig = {allowShell?: boolean | undefined, allowedCommands?: Array | undefined, enabled?: boolean | undefined, timeout?: number | undefined}; export type CodeExecutionConfig = {allowedCommands?: Array | undefined, allowedLanguages?: Array | undefined, enabled?: boolean | undefined, timeout?: number | undefined}; export type GuardrailConfig = {guardrailType?: string | undefined, maxRetries?: number | undefined, maxTokens?: number | undefined, message?: string | undefined, mode?: string | undefined, model?: string | undefined, name?: string | undefined, onFail?: string | undefined, patterns?: Array | undefined, policy?: string | undefined, position?: string | undefined, taskName?: string | undefined}; export type HandoffConfig = {resultContains?: string | undefined, target?: string | undefined, taskName?: string | undefined, text?: string | undefined, toolName?: string | undefined, type?: string | undefined}; export type MemoryConfig = {maxMessages?: number | undefined, messages?: Array<{[key: string]: Record}> | undefined}; export type OutputTypeConfig = {className?: string | undefined, schema?: {[key: string]: Record} | undefined}; export type PrefillToolCallConfig = {arguments?: {[key: string]: Record} | undefined, toolName?: string | undefined}; export type WorkerRef = {taskName?: string | undefined}; export type TerminationConfig = {caseSensitive?: boolean | undefined, conditions?: Array | undefined, maxCompletionTokens?: number | undefined, maxMessages?: number | undefined, maxPromptTokens?: number | undefined, maxTotalTokens?: number | undefined, stopMessage?: string | undefined, text?: string | undefined, type?: string | undefined}; export type ThinkingConfig = {budgetTokens?: number | undefined, enabled?: boolean | undefined}; export type ToolConfig = {approvalRequired?: boolean | undefined, config?: {[key: string]: Record} | undefined, description?: string | undefined, guardrails?: Array | undefined, inputSchema?: {[key: string]: Record} | undefined, maxCalls?: number | undefined, name?: string | undefined, outputSchema?: {[key: string]: Record} | undefined, stateful?: boolean | undefined, timeoutSeconds?: number | undefined, toolType?: string | undefined}; export type AgentConfig = {agents?: Array | undefined, allowedTransitions?: {[key: string]: Array} | undefined, baseUrl?: string | undefined, callbacks?: Array | undefined, cliConfig?: CliConfig | undefined, codeExecution?: CodeExecutionConfig | undefined, contextWindowBudget?: number | undefined, credentials?: Array | undefined, description?: string | undefined, enablePlanning?: boolean | undefined, external?: boolean | undefined, fallback?: AgentConfig | undefined, fallbackMaxTurns?: number | undefined, gate?: {[key: string]: Record} | undefined, guardrails?: Array | undefined, handoffs?: Array | undefined, includeContents?: string | undefined, instructions?: Record | undefined, introduction?: string | undefined, maskedFields?: Array | undefined, maxTokens?: number | undefined, maxTurns?: number | undefined, memory?: MemoryConfig | undefined, metadata?: {[key: string]: Record} | undefined, model?: string | undefined, name?: string | undefined, outputType?: OutputTypeConfig | undefined, planSource?: {[key: string]: Record} | undefined, planner?: AgentConfig | undefined, plannerContext?: Array<{[key: string]: Record}> | undefined, prefillTools?: Array | undefined, reasoningEffort?: string | undefined, requiredTools?: Array | undefined, router?: Record | undefined, stopWhen?: WorkerRef | undefined, strategy?: ('handoff' | 'sequential' | 'parallel' | 'router' | 'round_robin' | 'random' | 'swarm' | 'manual' | 'plan_execute') | undefined, synthesize?: boolean | undefined, temperature?: number | undefined, termination?: TerminationConfig | undefined, thinkingConfig?: ThinkingConfig | undefined, timeoutSeconds?: number | undefined, tools?: Array | undefined}; export type AgentStartRequest = {agentConfig?: AgentConfig | undefined, context?: {[key: string]: Record} | undefined, framework?: string | undefined, idempotencyKey?: string | undefined, media?: Array | undefined, model?: string | undefined, name?: string | undefined, prompt?: string | undefined, rawConfig?: {[key: string]: Record} | undefined, runId?: string | undefined, sessionId?: string | undefined, skillRef?: {[key: string]: Record} | undefined, static_plan?: {[key: string]: Record} | undefined, timeoutSeconds?: number | undefined, version?: number | undefined}; export type CreateApiApiAgentDeployArgs = {body: AgentStartRequest}; export type CreateApiApiAgentDeployOptions = {baseUrl?: string | undefined, apiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * POST /api/agent/deploy */ export const createApiApiAgentDeploy = async (args: CreateApiApiAgentDeployArgs, options?: CreateApiApiAgentDeployOptions) => { const {baseUrl = "https://developer.orkescloud.com", fetch: fetchFn = fetch, apiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "*/*") if (apiKey !== undefined) headers.set("X-Authorization", apiKey) const url = `${baseUrl.replace(/\/+$/, '')}/api/agent/deploy${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };