dify/packages/contracts/generated/api/console/agents/zod.gen.ts
zyssyz123 60cd346fa6
feat: wire workflow agent node runtime (#36437)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-20 12:39:45 +00:00

223 lines
5.6 KiB
TypeScript

// This file is auto-generated by @hey-api/openapi-ts
import * as z from 'zod'
/**
* AgentIconType
*
* Supported icon storage formats for Agent roster entries.
*/
export const zAgentIconType = z.enum(['emoji', 'image', 'link'])
/**
* RosterAgentUpdatePayload
*/
export const zRosterAgentUpdatePayload = z.object({
description: z.string().nullish(),
icon: z.string().max(255).nullish(),
icon_background: z.string().max(255).nullish(),
icon_type: zAgentIconType.optional(),
name: z.string().min(1).max(255).nullish(),
})
/**
* AppVariableConfig
*/
export const zAppVariableConfig = z.object({
default: z.unknown().optional(),
name: z.string().min(1).max(255),
required: z.boolean().optional().default(false),
type: z.string().min(1).max(64),
})
/**
* AgentSoulEnvConfig
*/
export const zAgentSoulEnvConfig = z.object({
secret_refs: z.array(z.record(z.string(), z.unknown())).optional(),
variables: z.array(z.record(z.string(), z.unknown())).optional(),
})
/**
* AgentSoulHumanConfig
*/
export const zAgentSoulHumanConfig = z.object({
contacts: z.array(z.record(z.string(), z.unknown())).optional(),
tools: z.array(z.record(z.string(), z.unknown())).optional(),
})
/**
* AgentSoulMemoryConfig
*/
export const zAgentSoulMemoryConfig = z.object({
artifacts: z.array(z.record(z.string(), z.unknown())).optional(),
budget: z.string().nullish(),
scope: z.string().nullish(),
})
/**
* AgentSoulPromptConfig
*/
export const zAgentSoulPromptConfig = z.object({
system_prompt: z.string().optional().default(''),
})
/**
* AgentSoulSandboxConfig
*/
export const zAgentSoulSandboxConfig = z.object({
config: z.record(z.string(), z.unknown()).optional(),
provider: z.string().nullish(),
})
/**
* AgentSoulSkillsFilesConfig
*/
export const zAgentSoulSkillsFilesConfig = z.object({
files: z.array(z.record(z.string(), z.unknown())).optional(),
skills: z.array(z.record(z.string(), z.unknown())).optional(),
})
/**
* AgentSoulToolsConfig
*/
export const zAgentSoulToolsConfig = z.object({
cli_tools: z.array(z.record(z.string(), z.unknown())).optional(),
dify_tools: z.array(z.record(z.string(), z.unknown())).optional(),
})
/**
* AgentKnowledgeQueryMode
*/
export const zAgentKnowledgeQueryMode = z.enum(['generated_query', 'user_query'])
/**
* AgentSoulKnowledgeConfig
*/
export const zAgentSoulKnowledgeConfig = z.object({
datasets: z.array(z.record(z.string(), z.unknown())).optional(),
query_config: z.record(z.string(), z.unknown()).optional(),
query_mode: zAgentKnowledgeQueryMode.optional(),
})
/**
* AgentSoulModelCredentialRef
*
* Reference to model credentials resolved only at runtime.
*/
export const zAgentSoulModelCredentialRef = z.object({
id: z.string().max(255).nullish(),
provider: z.string().max(255).nullish(),
type: z.string().min(1).max(64),
})
/**
* AgentSoulModelConfig
*
* Stable model selection for Agent runtime without storing secret values.
*/
export const zAgentSoulModelConfig = z.object({
credential_ref: zAgentSoulModelCredentialRef.optional(),
model: z.string().min(1).max(255),
model_provider: z.string().min(1).max(255),
model_settings: z.record(z.string(), z.unknown()).optional(),
plugin_id: z.string().min(1).max(255),
})
/**
* AgentSoulConfig
*/
export const zAgentSoulConfig = z.object({
app_features: z.record(z.string(), z.unknown()).optional(),
app_variables: z.array(zAppVariableConfig).optional(),
env: zAgentSoulEnvConfig.optional(),
human: zAgentSoulHumanConfig.optional(),
knowledge: zAgentSoulKnowledgeConfig.optional(),
memory: zAgentSoulMemoryConfig.optional(),
misc_legacy: z.record(z.string(), z.unknown()).optional(),
model: zAgentSoulModelConfig.optional(),
prompt: zAgentSoulPromptConfig.optional(),
sandbox: zAgentSoulSandboxConfig.optional(),
schema_version: z.int().optional().default(1),
skills_files: zAgentSoulSkillsFilesConfig.optional(),
tools: zAgentSoulToolsConfig.optional(),
})
/**
* RosterAgentCreatePayload
*/
export const zRosterAgentCreatePayload = z.object({
agent_soul: zAgentSoulConfig.optional(),
description: z.string().optional().default(''),
icon: z.string().max(255).nullish(),
icon_background: z.string().max(255).nullish(),
icon_type: zAgentIconType.optional(),
name: z.string().min(1).max(255),
version_note: z.string().nullish(),
})
/**
* Success
*/
export const zGetAgentsResponse = z.record(z.string(), z.unknown())
export const zPostAgentsBody = zRosterAgentCreatePayload
/**
* Success
*/
export const zPostAgentsResponse = z.record(z.string(), z.unknown())
/**
* Success
*/
export const zGetAgentsInviteOptionsResponse = z.record(z.string(), z.unknown())
export const zDeleteAgentsByAgentIdPath = z.object({
agent_id: z.string(),
})
/**
* Success
*/
export const zDeleteAgentsByAgentIdResponse = z.record(z.string(), z.unknown())
export const zGetAgentsByAgentIdPath = z.object({
agent_id: z.string(),
})
/**
* Success
*/
export const zGetAgentsByAgentIdResponse = z.record(z.string(), z.unknown())
export const zPatchAgentsByAgentIdBody = zRosterAgentUpdatePayload
export const zPatchAgentsByAgentIdPath = z.object({
agent_id: z.string(),
})
/**
* Success
*/
export const zPatchAgentsByAgentIdResponse = z.record(z.string(), z.unknown())
export const zGetAgentsByAgentIdVersionsPath = z.object({
agent_id: z.string(),
})
/**
* Success
*/
export const zGetAgentsByAgentIdVersionsResponse = z.record(z.string(), z.unknown())
export const zGetAgentsByAgentIdVersionsByVersionIdPath = z.object({
agent_id: z.string(),
version_id: z.string(),
})
/**
* Success
*/
export const zGetAgentsByAgentIdVersionsByVersionIdResponse = z.record(z.string(), z.unknown())