mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
refactor(dify-agent): download Binding files through Agent Stub (#40143)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
c094117ca2
commit
916d7e1c96
71 files changed
+4692
-2484
No files matched your search
@@ -1274,7 +1274,7 @@ List a directory in an Agent App conversation sandbox
|
||||
| agent_id | path | Agent ID | Yes | string (uuid) |
|
||||
| caller_id | query | Agent App caller ID | Yes | string |
|
||||
| caller_type | query | | Yes | string, <br>**Available values:** "build_draft", "conversation" |
|
||||
| path | query | Directory path relative to the sandbox workspace | No | string, <br>**Default:** . |
|
||||
| path | query | Binding path: relative paths start in Workspace; exact `~` and paths beginning with `~/` start in Home; `~user` is an ordinary relative path from Workspace; absolute paths remain absolute; `..` and paths outside Workspace are governed by backend isolation, not a Workspace-root restriction | No | string, <br>**Default:** . |
|
||||
|
||||
#### Responses
|
||||
|
||||
@@ -1282,26 +1282,8 @@ List a directory in an Agent App conversation sandbox
|
||||
| ---- | ----------- | ------ |
|
||||
| 200 | Listing returned | **application/json**: [SandboxListResponse](#sandboxlistresponse)<br> |
|
||||
|
||||
### [GET] /agent/{agent_id}/sandbox/files/read
|
||||
Read a text/binary preview file in an Agent App conversation sandbox
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Located in | Description | Required | Schema |
|
||||
| ---- | ---------- | ----------- | -------- | ------ |
|
||||
| agent_id | path | Agent ID | Yes | string (uuid) |
|
||||
| caller_id | query | Agent App caller ID | Yes | string |
|
||||
| caller_type | query | | Yes | string, <br>**Available values:** "build_draft", "conversation" |
|
||||
| path | query | File path relative to the sandbox workspace | Yes | string |
|
||||
|
||||
#### Responses
|
||||
|
||||
| Code | Description | Schema |
|
||||
| ---- | ----------- | ------ |
|
||||
| 200 | Preview returned | **application/json**: [SandboxReadResponse](#sandboxreadresponse)<br> |
|
||||
|
||||
### [POST] /agent/{agent_id}/sandbox/files/upload
|
||||
Upload one Agent App sandbox file and return a signed download URL
|
||||
### [POST] /agent/{agent_id}/sandbox/files/download
|
||||
Create a ToolFile from one Agent App Binding file and return its download URL
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1313,13 +1295,31 @@ Upload one Agent App sandbox file and return a signed download URL
|
||||
|
||||
| Required | Schema |
|
||||
| -------- | ------ |
|
||||
| Yes | **application/json**: [AgentSandboxUploadPayload](#agentsandboxuploadpayload)<br> |
|
||||
| Yes | **application/json**: [AgentSandboxDownloadPayload](#agentsandboxdownloadpayload)<br> |
|
||||
|
||||
#### Responses
|
||||
|
||||
| Code | Description | Schema |
|
||||
| ---- | ----------- | ------ |
|
||||
| 200 | Uploaded | **application/json**: [SandboxUploadResponse](#sandboxuploadresponse)<br> |
|
||||
| 200 | Download URL returned | **application/json**: [SandboxDownloadResponse](#sandboxdownloadresponse)<br> |
|
||||
|
||||
### [GET] /agent/{agent_id}/sandbox/files/read
|
||||
Read a text/binary preview file in an Agent App conversation sandbox
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Located in | Description | Required | Schema |
|
||||
| ---- | ---------- | ----------- | -------- | ------ |
|
||||
| agent_id | path | Agent ID | Yes | string (uuid) |
|
||||
| caller_id | query | Agent App caller ID | Yes | string |
|
||||
| caller_type | query | | Yes | string, <br>**Available values:** "build_draft", "conversation" |
|
||||
| path | query | Binding path: relative paths start in Workspace; exact `~` and paths beginning with `~/` start in Home; `~user` is an ordinary relative path from Workspace; absolute paths remain absolute; `..` and paths outside Workspace are governed by backend isolation, not a Workspace-root restriction | Yes | string |
|
||||
|
||||
#### Responses
|
||||
|
||||
| Code | Description | Schema |
|
||||
| ---- | ----------- | ------ |
|
||||
| 200 | Preview returned | **application/json**: [SandboxReadResponse](#sandboxreadresponse)<br> |
|
||||
|
||||
### [POST] /agent/{agent_id}/skills/upload
|
||||
Upload + standardize a Skill into an Agent App drive
|
||||
@@ -3822,7 +3822,7 @@ List a directory in a workflow Agent node sandbox
|
||||
| node_id | path | Workflow Agent node ID | Yes | string |
|
||||
| workflow_run_id | path | Workflow run ID | Yes | string (uuid) |
|
||||
| node_execution_id | query | Workflow node execution ID | Yes | string |
|
||||
| path | query | Directory path relative to the sandbox workspace | No | string, <br>**Default:** . |
|
||||
| path | query | Binding path: relative paths start in Workspace; exact `~` and paths beginning with `~/` start in Home; `~user` is an ordinary relative path from Workspace; absolute paths remain absolute; `..` and paths outside Workspace are governed by backend isolation, not a Workspace-root restriction | No | string, <br>**Default:** . |
|
||||
|
||||
#### Responses
|
||||
|
||||
@@ -3830,27 +3830,8 @@ List a directory in a workflow Agent node sandbox
|
||||
| ---- | ----------- | ------ |
|
||||
| 200 | Listing returned | **application/json**: [SandboxListResponse](#sandboxlistresponse)<br> |
|
||||
|
||||
### [GET] /apps/{app_id}/workflow-runs/{workflow_run_id}/agent-nodes/{node_id}/sandbox/files/read
|
||||
Read a text/binary preview file in a workflow Agent node sandbox
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Located in | Description | Required | Schema |
|
||||
| ---- | ---------- | ----------- | -------- | ------ |
|
||||
| app_id | path | Application ID | Yes | string (uuid) |
|
||||
| node_id | path | Workflow Agent node ID | Yes | string |
|
||||
| workflow_run_id | path | Workflow run ID | Yes | string (uuid) |
|
||||
| node_execution_id | query | Workflow node execution ID | Yes | string |
|
||||
| path | query | File path relative to the sandbox workspace | Yes | string |
|
||||
|
||||
#### Responses
|
||||
|
||||
| Code | Description | Schema |
|
||||
| ---- | ----------- | ------ |
|
||||
| 200 | Preview returned | **application/json**: [SandboxReadResponse](#sandboxreadresponse)<br> |
|
||||
|
||||
### [POST] /apps/{app_id}/workflow-runs/{workflow_run_id}/agent-nodes/{node_id}/sandbox/files/upload
|
||||
Upload one workflow Agent sandbox file and return a signed download URL
|
||||
### [POST] /apps/{app_id}/workflow-runs/{workflow_run_id}/agent-nodes/{node_id}/sandbox/files/download
|
||||
Create a ToolFile from one workflow Agent Binding file and return its download URL
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -3864,13 +3845,32 @@ Upload one workflow Agent sandbox file and return a signed download URL
|
||||
|
||||
| Required | Schema |
|
||||
| -------- | ------ |
|
||||
| Yes | **application/json**: [WorkflowAgentSandboxUploadPayload](#workflowagentsandboxuploadpayload)<br> |
|
||||
| Yes | **application/json**: [WorkflowAgentSandboxDownloadPayload](#workflowagentsandboxdownloadpayload)<br> |
|
||||
|
||||
#### Responses
|
||||
|
||||
| Code | Description | Schema |
|
||||
| ---- | ----------- | ------ |
|
||||
| 200 | Uploaded | **application/json**: [SandboxUploadResponse](#sandboxuploadresponse)<br> |
|
||||
| 200 | Download URL returned | **application/json**: [SandboxDownloadResponse](#sandboxdownloadresponse)<br> |
|
||||
|
||||
### [GET] /apps/{app_id}/workflow-runs/{workflow_run_id}/agent-nodes/{node_id}/sandbox/files/read
|
||||
Read a text/binary preview file in a workflow Agent node sandbox
|
||||
|
||||
#### Parameters
|
||||
|
||||
| Name | Located in | Description | Required | Schema |
|
||||
| ---- | ---------- | ----------- | -------- | ------ |
|
||||
| app_id | path | Application ID | Yes | string (uuid) |
|
||||
| node_id | path | Workflow Agent node ID | Yes | string |
|
||||
| workflow_run_id | path | Workflow run ID | Yes | string (uuid) |
|
||||
| node_execution_id | query | Workflow node execution ID | Yes | string |
|
||||
| path | query | Binding path: relative paths start in Workspace; exact `~` and paths beginning with `~/` start in Home; `~user` is an ordinary relative path from Workspace; absolute paths remain absolute; `..` and paths outside Workspace are governed by backend isolation, not a Workspace-root restriction | Yes | string |
|
||||
|
||||
#### Responses
|
||||
|
||||
| Code | Description | Schema |
|
||||
| ---- | ----------- | ------ |
|
||||
| 200 | Preview returned | **application/json**: [SandboxReadResponse](#sandboxreadresponse)<br> |
|
||||
|
||||
### [GET] /apps/{app_id}/workflow/comments
|
||||
**Get all comments for a workflow**
|
||||
@@ -14703,6 +14703,14 @@ section may be empty, which is how callers express "no knowledge layer".
|
||||
| workflow_id | string | | No |
|
||||
| workflow_node_id | string | | No |
|
||||
|
||||
#### AgentSandboxDownloadPayload
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| caller_id | string | Agent App caller ID | Yes |
|
||||
| caller_type | string, <br>**Available values:** "build_draft", "conversation" | *Enum:* `"build_draft"`, `"conversation"` | Yes |
|
||||
| path | string | Binding path: relative paths start in Workspace; exact `~` and paths beginning with `~/` start in Home; `~user` is an ordinary relative path from Workspace; absolute paths remain absolute; `..` and paths outside Workspace are governed by backend isolation, not a Workspace-root restriction | Yes |
|
||||
|
||||
#### AgentSandboxProviderConfig
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
@@ -14712,14 +14720,6 @@ section may be empty, which is how callers express "no knowledge layer".
|
||||
| image | string | | No |
|
||||
| working_dir | string | | No |
|
||||
|
||||
#### AgentSandboxUploadPayload
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| caller_id | string | Agent App caller ID | Yes |
|
||||
| caller_type | string, <br>**Available values:** "build_draft", "conversation" | *Enum:* `"build_draft"`, `"conversation"` | Yes |
|
||||
| path | string | File path relative to the sandbox workspace | Yes |
|
||||
|
||||
#### AgentScope
|
||||
|
||||
Visibility and lifecycle scope of an Agent record.
|
||||
@@ -21522,6 +21522,12 @@ Whitelist scopes accepted by RBAC app and dataset access config APIs.
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| SSOProtocol | string | | |
|
||||
|
||||
#### SandboxDownloadResponse
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| url | string | | Yes |
|
||||
|
||||
#### SandboxFileEntryResponse
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
@@ -21555,12 +21561,6 @@ Whitelist scopes accepted by RBAC app and dataset access config APIs.
|
||||
| text | string | | No |
|
||||
| truncated | boolean | | Yes |
|
||||
|
||||
#### SandboxUploadResponse
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| url | string | | Yes |
|
||||
|
||||
#### SavedMessageCreatePayload
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
@@ -23367,12 +23367,12 @@ How a workflow node is bound to an Agent.
|
||||
| variant | string | | Yes |
|
||||
| workflow_id | string | | No |
|
||||
|
||||
#### WorkflowAgentSandboxUploadPayload
|
||||
#### WorkflowAgentSandboxDownloadPayload
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| node_execution_id | string | Workflow node execution ID | Yes |
|
||||
| path | string | File path relative to the sandbox workspace | Yes |
|
||||
| path | string | Binding path: relative paths start in Workspace; exact `~` and paths beginning with `~/` start in Home; `~user` is an ordinary relative path from Workspace; absolute paths remain absolute; `..` and paths outside Workspace are governed by backend isolation, not a Workspace-root restriction | Yes |
|
||||
|
||||
#### WorkflowAppLogPaginationResponse
|
||||
|
||||
|
||||
Reference in new issue
Block a user