fix(api): tighten agent v2 generated contracts (#36989)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
yyh
2026-06-03 06:52:40 +00:00
committed by GitHub
co-authored by autofix-ci[bot]
parent d6b4c800c2
commit 2d6c9300e3
15 changed files with 1458 additions and 484 deletions
+239 -33
View File
@@ -1072,7 +1072,7 @@ Update an Agent App's presentation features (opener, follow-up, citations, ...)
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| payload | body | | Yes | [AgentAppFeaturesRequest](#agentappfeaturesrequest) |
| payload | body | | Yes | [AgentAppFeaturesPayload](#agentappfeaturespayload) |
| app_id | path | Application ID | Yes | string |
##### Responses
@@ -10769,7 +10769,7 @@ Get banner list
| save_options | [ [ComposerSaveStrategy](#composersavestrategy) ] | | Yes |
| variant | string | | Yes |
#### AgentAppFeaturesRequest
#### AgentAppFeaturesPayload
Presentation features configurable on an Agent App.
@@ -10779,12 +10779,21 @@ default (the config form sends the full desired feature state on save).
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| opening_statement | string | Conversation opener shown before the first turn | No |
| retriever_resource | object | Citations / attributions config, e.g. {'enabled': true} | No |
| sensitive_word_avoidance | object | Content moderation config | No |
| speech_to_text | object | Speech-to-text config | No |
| retriever_resource | [AgentFeatureToggleConfig](#agentfeaturetoggleconfig) | Citations / attributions config, e.g. {'enabled': true} | No |
| sensitive_word_avoidance | [AgentSensitiveWordAvoidanceFeatureConfig](#agentsensitivewordavoidancefeatureconfig) | Content moderation config | No |
| speech_to_text | [AgentFeatureToggleConfig](#agentfeaturetoggleconfig) | Speech-to-text config | No |
| suggested_questions | [ string ] | Preset questions shown alongside the opener | No |
| suggested_questions_after_answer | object | Follow-up suggestions config, e.g. {'enabled': true} | No |
| text_to_speech | object | Text-to-speech config | No |
| suggested_questions_after_answer | [AgentSuggestedQuestionsAfterAnswerFeatureConfig](#agentsuggestedquestionsafteranswerfeatureconfig) | Follow-up suggestions config, e.g. {'enabled': true} | No |
| text_to_speech | [AgentTextToSpeechFeatureConfig](#agenttexttospeechfeatureconfig) | Text-to-speech config | No |
#### AgentCliToolConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| command | string | | No |
| description | string | | No |
| enabled | boolean | | No |
| name | string | | No |
#### AgentComposerAgentResponse
@@ -10817,6 +10826,17 @@ default (the config form sends the full desired feature state on save).
| capabilities | [ComposerCandidateCapabilities](#composercandidatecapabilities) | | No |
| variant | [ComposerVariant](#composervariant) | | Yes |
#### AgentComposerDifyToolCandidateResponse
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| description | string | | No |
| id | string | | No |
| name | string | | No |
| plugin_id | string | | No |
| provider | string | | No |
| provider_id | string | | No |
#### AgentComposerImpactBindingResponse
| Name | Type | Description | Required |
@@ -10838,18 +10858,18 @@ default (the config form sends the full desired feature state on save).
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| declare_output_types | [ [DeclaredOutputType](#declaredoutputtype) ] | | No |
| human_contacts | [ object ] | | No |
| previous_node_outputs | [ object ] | | No |
| human_contacts | [ [AgentHumanContactConfig](#agenthumancontactconfig) ] | | No |
| previous_node_outputs | [ [WorkflowPreviousNodeOutputRef](#workflowpreviousnodeoutputref) ] | | No |
#### AgentComposerSoulCandidatesResponse
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| cli_tools | [ object ] | | No |
| dify_tools | [ object ] | | No |
| human_contacts | [ object ] | | No |
| knowledge_datasets | [ object ] | | No |
| skills_files | [ object ] | | No |
| cli_tools | [ [AgentCliToolConfig](#agentclitoolconfig) ] | | No |
| dify_tools | [ [AgentComposerDifyToolCandidateResponse](#agentcomposerdifytoolcandidateresponse) ] | | No |
| human_contacts | [ [AgentHumanContactConfig](#agenthumancontactconfig) ] | | No |
| knowledge_datasets | [ [AgentKnowledgeDatasetConfig](#agentknowledgedatasetconfig) ] | | No |
| skills_files | [ [AgentSkillRefConfig](#agentskillrefconfig) ] | | No |
#### AgentComposerSoulLockResponse
@@ -10920,6 +10940,49 @@ Audit operation recorded for Agent Soul version/revision changes.
| version | integer | | Yes |
| version_note | string | | No |
#### AgentEnvVariableConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| name | string | | No |
| required | boolean | | No |
| type | string | | No |
| value | string<br>integer<br>number<br>boolean<br>[ string ]<br>[ integer ]<br>[ number ]<br>[ boolean ] | | No |
#### AgentFeatureToggleConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| enabled | boolean | | No |
#### AgentFileRefConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| id | string | | No |
| name | string | | No |
| transfer_method | string | | No |
| type | string | | No |
| url | string | | No |
#### AgentHumanContactConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| contact_id | string | | No |
| email | string | | No |
| human_id | string | | No |
| id | string | | No |
| name | string | | No |
#### AgentHumanToolConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| description | string | | No |
| enabled | boolean | | No |
| name | string | | No |
#### AgentIconType
Supported icon storage formats for Agent roster entries.
@@ -10993,6 +11056,23 @@ the current roster/workflow APIs scoped to Dify Agent.
| ---- | ---- | ----------- | -------- |
| AgentKind | string | Agent implementation family. This leaves room for future non-Dify agent implementations while keeping the current roster/workflow APIs scoped to Dify Agent. | |
#### AgentKnowledgeDatasetConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| description | string | | No |
| id | string | | No |
| name | string | | No |
#### AgentKnowledgeQueryConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| query | string | | No |
| score_threshold | number | | No |
| score_threshold_enabled | boolean | | No |
| top_k | integer | | No |
#### AgentKnowledgeQueryMode
| Name | Type | Description | Required |
@@ -11006,6 +11086,37 @@ the current roster/workflow APIs scoped to Dify Agent.
| conversation_id | string | Conversation UUID | Yes |
| message_id | string | Message UUID | Yes |
#### AgentMemoryArtifactConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| id | string | | No |
| name | string | | No |
| type | string | | No |
| url | string | | No |
#### AgentModelResponseFormatConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| type | string | | No |
#### AgentModerationIOConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| enabled | boolean | | No |
| preset_response | string | | No |
#### AgentModerationProviderConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| api_based_extension_id | string | | No |
| inputs_config | [AgentModerationIOConfig](#agentmoderationioconfig) | | No |
| keywords | string | | No |
| outputs_config | [AgentModerationIOConfig](#agentmoderationioconfig) | | No |
#### AgentReferencingWorkflowResponse
| Name | Type | Description | Required |
@@ -11058,6 +11169,14 @@ the current roster/workflow APIs scoped to Dify Agent.
| workflow_id | string | | No |
| workflow_node_id | string | | No |
#### AgentSandboxProviderConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| env | [ [AgentEnvVariableConfig](#agentenvvariableconfig) ] | | No |
| image | string | | No |
| working_dir | string | | No |
#### AgentScope
Visibility and lifecycle scope of an Agent record.
@@ -11066,17 +11185,56 @@ Visibility and lifecycle scope of an Agent record.
| ---- | ---- | ----------- | -------- |
| AgentScope | string | Visibility and lifecycle scope of an Agent record. | |
#### AgentSecretRefConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| id | string | | No |
| name | string | | No |
| provider | string | | No |
| type | string | | No |
#### AgentSensitiveWordAvoidanceFeatureConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| config | [AgentModerationProviderConfig](#agentmoderationproviderconfig) | | No |
| enabled | boolean | | No |
| type | string | | No |
#### AgentSkillRefConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| description | string | | No |
| file_id | string | | No |
| id | string | | No |
| name | string | | No |
| path | string | | No |
#### AgentSoulAppFeaturesConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| opening_statement | string | | No |
| retriever_resource | [AgentFeatureToggleConfig](#agentfeaturetoggleconfig) | | No |
| sensitive_word_avoidance | [AgentSensitiveWordAvoidanceFeatureConfig](#agentsensitivewordavoidancefeatureconfig) | | No |
| speech_to_text | [AgentFeatureToggleConfig](#agentfeaturetoggleconfig) | | No |
| suggested_questions | [ string ] | | No |
| suggested_questions_after_answer | [AgentSuggestedQuestionsAfterAnswerFeatureConfig](#agentsuggestedquestionsafteranswerfeatureconfig) | | No |
| text_to_speech | [AgentTextToSpeechFeatureConfig](#agenttexttospeechfeatureconfig) | | No |
#### AgentSoulConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| app_features | object | | No |
| app_features | [AgentSoulAppFeaturesConfig](#agentsoulappfeaturesconfig) | | No |
| app_variables | [ [AppVariableConfig](#appvariableconfig) ] | | No |
| env | [AgentSoulEnvConfig](#agentsoulenvconfig) | | No |
| human | [AgentSoulHumanConfig](#agentsoulhumanconfig) | | No |
| knowledge | [AgentSoulKnowledgeConfig](#agentsoulknowledgeconfig) | | No |
| memory | [AgentSoulMemoryConfig](#agentsoulmemoryconfig) | | No |
| misc_legacy | object | | No |
| misc_legacy | [AgentSoulAppFeaturesConfig](#agentsoulappfeaturesconfig) | | No |
| model | [AgentSoulModelConfig](#agentsoulmodelconfig) | | No |
| prompt | [AgentSoulPromptConfig](#agentsoulpromptconfig) | | No |
| sandbox | [AgentSoulSandboxConfig](#agentsoulsandboxconfig) | | No |
@@ -11125,29 +11283,29 @@ old Agent tool payloads can be read while new payloads stay explicit.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| secret_refs | [ object ] | | No |
| variables | [ object ] | | No |
| secret_refs | [ [AgentSecretRefConfig](#agentsecretrefconfig) ] | | No |
| variables | [ [AgentEnvVariableConfig](#agentenvvariableconfig) ] | | No |
#### AgentSoulHumanConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| contacts | [ object ] | | No |
| tools | [ object ] | | No |
| contacts | [ [AgentHumanContactConfig](#agenthumancontactconfig) ] | | No |
| tools | [ [AgentHumanToolConfig](#agenthumantoolconfig) ] | | No |
#### AgentSoulKnowledgeConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| datasets | [ object ] | | No |
| query_config | object | | No |
| datasets | [ [AgentKnowledgeDatasetConfig](#agentknowledgedatasetconfig) ] | | No |
| query_config | [AgentKnowledgeQueryConfig](#agentknowledgequeryconfig) | | No |
| query_mode | [AgentKnowledgeQueryMode](#agentknowledgequerymode) | | No |
#### AgentSoulMemoryConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| artifacts | [ object ] | | No |
| artifacts | [ [AgentMemoryArtifactConfig](#agentmemoryartifactconfig) ] | | No |
| budget | string | | No |
| scope | string | | No |
@@ -11160,7 +11318,7 @@ Stable model selection for Agent runtime without storing secret values.
| credential_ref | [AgentSoulModelCredentialRef](#agentsoulmodelcredentialref) | | No |
| model | string | | Yes |
| model_provider | string | | Yes |
| model_settings | object | | No |
| model_settings | [AgentSoulModelSettings](#agentsoulmodelsettings) | | No |
| plugin_id | string | | Yes |
#### AgentSoulModelCredentialRef
@@ -11173,6 +11331,18 @@ Reference to model credentials resolved only at runtime.
| provider | string | | No |
| type | string | | Yes |
#### AgentSoulModelSettings
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| frequency_penalty | number | | No |
| max_tokens | integer | | No |
| presence_penalty | number | | No |
| response_format | [AgentModelResponseFormatConfig](#agentmodelresponseformatconfig) | | No |
| stop | [ string ] | | No |
| temperature | number | | No |
| top_p | number | | No |
#### AgentSoulPromptConfig
| Name | Type | Description | Required |
@@ -11183,21 +11353,21 @@ Reference to model credentials resolved only at runtime.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| config | object | | No |
| config | [AgentSandboxProviderConfig](#agentsandboxproviderconfig) | | No |
| provider | string | | No |
#### AgentSoulSkillsFilesConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| files | [ object ] | | No |
| skills | [ object ] | | No |
| files | [ [AgentFileRefConfig](#agentfilerefconfig) ] | | No |
| skills | [ [AgentSkillRefConfig](#agentskillrefconfig) ] | | No |
#### AgentSoulToolsConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| cli_tools | [ object ] | | No |
| cli_tools | [ [AgentCliToolConfig](#agentclitoolconfig) ] | | No |
| dify_tools | [ [AgentSoulDifyToolConfig](#agentsouldifytoolconfig) ] | | No |
#### AgentSource
@@ -11216,6 +11386,23 @@ Soft lifecycle state for Agent records.
| ---- | ---- | ----------- | -------- |
| AgentStatus | string | Soft lifecycle state for Agent records. | |
#### AgentSuggestedQuestionsAfterAnswerFeatureConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| enabled | boolean | | No |
| model | [AgentSoulModelConfig](#agentsoulmodelconfig) | | No |
| prompt | string | | No |
#### AgentTextToSpeechFeatureConfig
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| autoPlay | string | | No |
| enabled | boolean | | No |
| language | string | | No |
| voice | string | | No |
#### AgentThought
| Name | Type | Description | Required |
@@ -12833,9 +13020,9 @@ Per PRD §OUTPUT 配置框, output check is **file-only** and optional. Stage 4
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| benchmark_file_ref | object | | No |
| benchmark_file_ref | [AgentFileRefConfig](#agentfilerefconfig) | | No |
| enabled | boolean | | No |
| model_ref | object | | No |
| model_ref | [AgentSoulModelConfig](#agentsoulmodelconfig) | | No |
| prompt | string | | No |
#### DeclaredOutputConfig
@@ -16262,13 +16449,19 @@ How a workflow node is bound to an Agent.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| declared_outputs | [ [DeclaredOutputConfig](#declaredoutputconfig) ] | | No |
| human_contacts | [ object ] | | No |
| metadata | object | | No |
| human_contacts | [ [AgentHumanContactConfig](#agenthumancontactconfig) ] | | No |
| metadata | [WorkflowNodeJobMetadata](#workflownodejobmetadata) | | No |
| mode | [WorkflowNodeJobMode](#workflownodejobmode) | | No |
| previous_node_output_refs | [ object ] | | No |
| previous_node_output_refs | [ [WorkflowPreviousNodeOutputRef](#workflowpreviousnodeoutputref) ] | | No |
| schema_version | integer | | No |
| workflow_prompt | string | | No |
#### WorkflowNodeJobMetadata
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| file_refs | [ [AgentFileRefConfig](#agentfilerefconfig) ] | | No |
#### WorkflowNodeJobMode
| Name | Type | Description | Required |
@@ -16328,6 +16521,19 @@ How a workflow node is bound to an Agent.
| paused_at | string | | No |
| paused_nodes | [ [PausedNodeResponse](#pausednoderesponse) ] | | Yes |
#### WorkflowPreviousNodeOutputRef
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| key | string | | No |
| name | string | | No |
| node_id | string | | No |
| output | string | | No |
| selector | [ ] | | No |
| value_selector | [ ] | | No |
| variable | string | | No |
| variable_selector | [ ] | | No |
#### WorkflowResponse
| Name | Type | Description | Required |