From eb8d23d82bae258aed8a1157095cb1b3e3518206 Mon Sep 17 00:00:00 2001 From: -LAN- Date: Thu, 22 Oct 2026 15:39:40 +0800 Subject: [PATCH 1/2] chore(release): prepare version 1.18.0 Bump the API, agent, web, and CLI package versions to 1.18.0. Synchronize the Python lockfiles and Docker Compose image tags, including the middleware sandbox, and regenerate the main Compose file. --- api/pyproject.toml | 2 +- api/uv.lock | 4 ++-- cli/package.json | 2 +- dify-agent/pyproject.toml | 2 +- dify-agent/uv.lock | 2 +- docker/docker-compose-template.yaml | 18 +++++++++--------- docker/docker-compose.middleware.yaml | 2 +- docker/docker-compose.yaml | 18 +++++++++--------- web/package.json | 2 +- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/api/pyproject.toml b/api/pyproject.toml index dc3075687aaba8..7fd988b998f2a0 100644 --- a/api/pyproject.toml +++ b/api/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "dify-api" -version = "1.17.1" +version = "1.18.0" requires-python = "~=3.13.0" dependencies = [ diff --git a/api/uv.lock b/api/uv.lock index 3c0b9a8abae085..5f158f01caa3ac 100644 --- a/api/uv.lock +++ b/api/uv.lock @@ -1339,7 +1339,7 @@ wheels = [ [[package]] name = "dify-agent" -version = "1.17.1" +version = "1.18.0" source = { editable = "../dify-agent" } dependencies = [ { name = "httpx" }, @@ -1393,7 +1393,7 @@ docs = [ [[package]] name = "dify-api" -version = "1.17.1" +version = "1.18.0" source = { virtual = "." } dependencies = [ { name = "aliyun-log-python-sdk" }, diff --git a/cli/package.json b/cli/package.json index 970d2d16593435..d639db385d1888 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@langgenius/difyctl", - "version": "1.17.1", + "version": "1.18.0", "description": "Dify command-line interface", "license": "Apache-2.0", "files": [ diff --git a/dify-agent/pyproject.toml b/dify-agent/pyproject.toml index 0fdf242a7294db..dbd899059fc7b8 100644 --- a/dify-agent/pyproject.toml +++ b/dify-agent/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "dify-agent" -version = "1.17.1" +version = "1.18.0" description = "Add your description here" readme = "README.md" requires-python = ">=3.13,<4.0" diff --git a/dify-agent/uv.lock b/dify-agent/uv.lock index b95e524f9a4553..1df338bae42843 100644 --- a/dify-agent/uv.lock +++ b/dify-agent/uv.lock @@ -533,7 +533,7 @@ wheels = [ [[package]] name = "dify-agent" -version = "1.17.1" +version = "1.18.0" source = { editable = "." } dependencies = [ { name = "httpx" }, diff --git a/docker/docker-compose-template.yaml b/docker/docker-compose-template.yaml index 89ef6d084bd174..1aa02fb9d37e08 100644 --- a/docker/docker-compose-template.yaml +++ b/docker/docker-compose-template.yaml @@ -134,7 +134,7 @@ x-shared-worker-config: &shared-worker-config # KNOWLEDGE_FS_WORKER_IMAGE must bundle the KnowledgeFS engine at KNOWLEDGE_FS_BACKGROUND_ENGINE_PATH; # standard Dify API images do not, and the worker entrypoint exits without it. x-knowledge-fs-celery-worker: &knowledge-fs-celery-worker - image: ${KNOWLEDGE_FS_WORKER_IMAGE:-langgenius/dify-api:1.17.0} + image: ${KNOWLEDGE_FS_WORKER_IMAGE:-langgenius/dify-api:1.18.0} profiles: - knowledge-fs-celery restart: always @@ -265,7 +265,7 @@ services: # API service api: <<: *shared-api-worker-config - image: langgenius/dify-api:1.17.1 + image: langgenius/dify-api:1.18.0 environment: MODE: api # The bundled Nginx supplies a verified client IP; keep direct API callers trusted. @@ -315,7 +315,7 @@ services: # WebSocket service for workflow collaboration. api_websocket: <<: *shared-api-worker-config - image: langgenius/dify-api:1.17.1 + image: langgenius/dify-api:1.18.0 profiles: - collaboration environment: @@ -347,7 +347,7 @@ services: # The Celery worker for processing all queues (dataset, workflow, mail, etc.) worker: <<: *shared-worker-config - image: langgenius/dify-api:1.17.1 + image: langgenius/dify-api:1.18.0 environment: MODE: worker SENTRY_DSN: ${API_SENTRY_DSN:-} @@ -394,7 +394,7 @@ services: # Keep this queue out of the generic worker so large file copies cannot starve existing jobs. worker_knowledge_fs_upgrade: <<: *shared-worker-config - image: langgenius/dify-api:1.17.1 + image: langgenius/dify-api:1.18.0 profiles: - knowledge-fs environment: @@ -427,7 +427,7 @@ services: # Celery beat for scheduling periodic tasks. worker_beat: <<: *shared-worker-beat-config - image: langgenius/dify-api:1.17.1 + image: langgenius/dify-api:1.18.0 environment: MODE: beat depends_on: @@ -460,7 +460,7 @@ services: # Frontend web application. web: - image: langgenius/dify-web:1.17.1 + image: langgenius/dify-web:1.18.0 restart: always env_file: - path: ./envs/core-services/web.env @@ -621,7 +621,7 @@ services: # on port 3128, which only allows agent_backend /agent-stub/ and the Dify API # /files/* endpoints (see ssrf_proxy/squid-agent.conf.template). local_sandbox: - image: langgenius/dify-agent-local-sandbox:1.17.1 + image: langgenius/dify-agent-local-sandbox:1.18.0 command: ["shellctl", "serve", "--listen", "0.0.0.0:5004", "--require-auth-token"] restart: always env_file: @@ -819,7 +819,7 @@ services: # Dify Agent backend service. agent_backend: - image: langgenius/dify-agent-backend:1.17.1 + image: langgenius/dify-agent-backend:1.18.0 restart: always env_file: - path: ./envs/core-services/dify-agent.env diff --git a/docker/docker-compose.middleware.yaml b/docker/docker-compose.middleware.yaml index 43ba6226388cdf..7dcd2b811cb863 100644 --- a/docker/docker-compose.middleware.yaml +++ b/docker/docker-compose.middleware.yaml @@ -134,7 +134,7 @@ services: # Exposes port 5004 on the host so a locally-run agent backend can reach it # at http://localhost:5004 (DIFY_AGENT_LOCAL_SANDBOX_ENDPOINT). local_sandbox: - image: langgenius/dify-agent-local-sandbox:1.17.1 + image: langgenius/dify-agent-local-sandbox:1.18.0 restart: always env_file: - ./middleware.env diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 8c03d7af963f0e..b0b03eafedf3e5 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -140,7 +140,7 @@ x-shared-worker-config: &shared-worker-config # KNOWLEDGE_FS_WORKER_IMAGE must bundle the KnowledgeFS engine at KNOWLEDGE_FS_BACKGROUND_ENGINE_PATH; # standard Dify API images do not, and the worker entrypoint exits without it. x-knowledge-fs-celery-worker: &knowledge-fs-celery-worker - image: ${KNOWLEDGE_FS_WORKER_IMAGE:-langgenius/dify-api:1.17.0} + image: ${KNOWLEDGE_FS_WORKER_IMAGE:-langgenius/dify-api:1.18.0} profiles: - knowledge-fs-celery restart: always @@ -271,7 +271,7 @@ services: # API service api: <<: *shared-api-worker-config - image: langgenius/dify-api:1.17.1 + image: langgenius/dify-api:1.18.0 environment: MODE: api # The bundled Nginx supplies a verified client IP; keep direct API callers trusted. @@ -321,7 +321,7 @@ services: # WebSocket service for workflow collaboration. api_websocket: <<: *shared-api-worker-config - image: langgenius/dify-api:1.17.1 + image: langgenius/dify-api:1.18.0 profiles: - collaboration environment: @@ -353,7 +353,7 @@ services: # The Celery worker for processing all queues (dataset, workflow, mail, etc.) worker: <<: *shared-worker-config - image: langgenius/dify-api:1.17.1 + image: langgenius/dify-api:1.18.0 environment: MODE: worker SENTRY_DSN: ${API_SENTRY_DSN:-} @@ -400,7 +400,7 @@ services: # Keep this queue out of the generic worker so large file copies cannot starve existing jobs. worker_knowledge_fs_upgrade: <<: *shared-worker-config - image: langgenius/dify-api:1.17.1 + image: langgenius/dify-api:1.18.0 profiles: - knowledge-fs environment: @@ -433,7 +433,7 @@ services: # Celery beat for scheduling periodic tasks. worker_beat: <<: *shared-worker-beat-config - image: langgenius/dify-api:1.17.1 + image: langgenius/dify-api:1.18.0 environment: MODE: beat depends_on: @@ -466,7 +466,7 @@ services: # Frontend web application. web: - image: langgenius/dify-web:1.17.1 + image: langgenius/dify-web:1.18.0 restart: always env_file: - path: ./envs/core-services/web.env @@ -627,7 +627,7 @@ services: # on port 3128, which only allows agent_backend /agent-stub/ and the Dify API # /files/* endpoints (see ssrf_proxy/squid-agent.conf.template). local_sandbox: - image: langgenius/dify-agent-local-sandbox:1.17.1 + image: langgenius/dify-agent-local-sandbox:1.18.0 command: ["shellctl", "serve", "--listen", "0.0.0.0:5004", "--require-auth-token"] restart: always env_file: @@ -825,7 +825,7 @@ services: # Dify Agent backend service. agent_backend: - image: langgenius/dify-agent-backend:1.17.1 + image: langgenius/dify-agent-backend:1.18.0 restart: always env_file: - path: ./envs/core-services/dify-agent.env diff --git a/web/package.json b/web/package.json index cdf189b89e92ea..208cd658c115c5 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "dify-web", - "version": "1.17.1", + "version": "1.18.0", "private": true, "type": "module", "imports": { From 720d8489453cea51c26382e43f4b8ba7024a6dca Mon Sep 17 00:00:00 2001 From: -LAN- Date: Fri, 23 Oct 2026 12:04:32 +0800 Subject: [PATCH 2/2] test(web): wait for local Knowledge preview content --- web/features/new-rag/create/__tests__/page.spec.tsx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/web/features/new-rag/create/__tests__/page.spec.tsx b/web/features/new-rag/create/__tests__/page.spec.tsx index 9113ff28c62ac5..e1c30b442f7ec7 100644 --- a/web/features/new-rag/create/__tests__/page.spec.tsx +++ b/web/features/new-rag/create/__tests__/page.spec.tsx @@ -3053,25 +3053,22 @@ describe('CreateKnowledgePage', () => { }) it('previews a selected file locally without claiming it', async () => { + const user = userEvent.setup() navigationMock.startMode = 'upload' const file = new File(['# 让状态可分析'], 'handbook.md', { type: 'text/markdown' }) const open = vi.spyOn(globalThis, 'open').mockReturnValue(null) await renderPage() - fireEvent.change( + await user.upload( screen.getByLabelText('knowledgeSpace.uploadFiles', { selector: 'input[type="file"]', }), - { target: { files: [file] } }, + file, ) - await act(async () => { - await Promise.resolve() - await Promise.resolve() - }) - fireEvent.click(screen.getByRole('button', { name: 'knowledgeSpace.preview' })) + await user.click(screen.getByRole('button', { name: 'knowledgeSpace.preview' })) const preview = await screen.findByRole('dialog', { name: 'handbook.md' }) - expect(within(preview).getByLabelText('handbook.md')).toHaveTextContent('# 让状态可分析') + expect(await within(preview).findByLabelText('handbook.md')).toHaveTextContent('# 让状态可分析') expect(open).not.toHaveBeenCalled() expect(serviceMock.upload).not.toHaveBeenCalled() })