zyssyz123
3e0578a1c6
Merge branch 'main' into feat/new-agent-node
2026-04-13 13:43:47 +08:00
NVIDIAN
a3170f744c
refactor: migrate app site from marshal_with/api.model to Pydantic BaseModel ( #34933 )
...
Co-authored-by: ai-hpc <ai-hpc@users.noreply.github.com>
2026-04-13 05:18:16 +00:00
NVIDIAN
ced3780787
refactor: migrate mcp_server from marshal_with/api.model to Pydantic BaseModel ( #34935 )
...
Co-authored-by: ai-hpc <ai-hpc@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-13 05:13:53 +00:00
NVIDIAN
6faf26683c
refactor: remove marshal_with and inline api.model from app_import ( #34934 )
...
Co-authored-by: ai-hpc <ai-hpc@users.noreply.github.com>
2026-04-13 05:13:15 +00:00
Yansong Zhang
c03b25a940
merge: resolve conflicts with origin/main
...
Conflicts resolved:
- workflow_app_runner.py: adopt main's DifyGraphInitContext pattern
- token_buffer_memory.py: adopt main's match/case, add AppMode.AGENT
- app_dsl_service.py: adopt main's match/case, add AppMode.AGENT
Made-with: Cursor
2026-04-13 12:52:56 +08:00
wdeveloper16
8436470fcb
refactor: replace bare dict with TypedDicts in annotation_service ( #34998 )
2026-04-13 03:46:33 +00:00
Yansong Zhang
90cce7693f
revert: remove all sandbox and skill related code
...
Remove ~12,900 lines of sandbox/skill code that was ported from
feat/support-agent-sandbox. This reverts to direct tool execution
(the original behavior before sandbox integration).
Removed:
- core/sandbox/ (SandboxBuilder, bash tools, providers, initializers)
- core/skill/ (SkillManager, assembler, entities)
- core/virtual_environment/ (5 provider implementations)
- core/zip_sandbox/ (archive operations)
- core/app_assets/ (asset management)
- core/app_bundle/ (bundle management)
- controllers/cli_api/ (DifyCli callback endpoints)
- services/sandbox/ (provider service)
- services/skill_service, app_asset_service, app_bundle_service
- models/sandbox.py, app_asset.py
- bin/dify-cli-* (3 platform binaries)
- web sandbox-provider-page and service
- SandboxLayer, _resolve_sandbox_context, _invoke_tool_in_sandbox
- CliApiConfig, DIFY_SANDBOX_CONTEXT_KEY
- sandbox-related migrations
Preserved: All Agent V2 core functionality (agent-v2 node, strategy
engine, transparent upgrade, LLM remapping, memory, context, tools
via direct execution).
Made-with: Cursor
2026-04-13 10:42:36 +08:00
YBoy
6bacf7f953
refactor(api): type _serialize_full_content with FullContentDict TypedDict ( #35000 )
2026-04-13 00:51:26 +00:00
NVIDIAN
5ec387b644
refactor: replace inline api.model with Pydantic BaseModel in model_config ( #34930 )
...
Co-authored-by: ai-hpc <ai-hpc@users.noreply.github.com>
2026-04-11 00:53:13 +00:00
aliworksx08
4c05316a7b
refactor(api): deduplicate DSL shared entities into dsl_entities.py ( #34762 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-09 06:04:18 +00:00
Yansong Zhang
44491e427c
feat(api): enable all sandbox/skill controller routes and resolve dependencies (P0)
...
Resolve the full dependency chain to enable all previously disabled controllers:
Enabled routes:
- sandbox_files: sandbox file browser API
- sandbox_providers: sandbox provider management API
- app_asset: app asset management API
- skills: skill extraction API
- CLI API blueprint: DifyCli callback endpoints (/cli/api/*)
Dependencies extracted (64 files, ~8000 lines):
- models/sandbox.py, models/app_asset.py: DB models
- core/zip_sandbox/: zip-based sandbox execution
- core/session/: CLI API session management
- core/memory/: base memory + node token buffer
- core/helper/creators.py: helper utilities
- core/llm_generator/: context models, output models, utils
- core/workflow/nodes/command/: command node type
- core/workflow/nodes/file_upload/: file upload node type
- core/app/entities/: app_asset_entities, app_bundle_entities, llm_generation_entities
- services/: asset_content, skill, workflow_collaboration, workflow_comment
- controllers/console/app/error.py: AppAsset error classes
- core/tools/utils/system_encryption.py
Import fixes:
- dify_graph.enums -> graphon.enums in skill_service.py
- get_signed_file_url_for_plugin -> get_signed_file_url in cli_api.py
All 5 controllers verified: import OK, Flask starts successfully.
46 existing tests still pass.
Made-with: Cursor
2026-04-09 09:36:16 +08:00
dataCenter430
1c7cf44af4
refactor: convert SegmentType controllers if/elif to match/case ( #30001 ) ( #34784 )
2026-04-09 01:11:47 +00:00
dataCenter430
a8fa552b3a
refactor: convert importStatus if/elif to match/case ( #30001 ) ( #34780 )
2026-04-09 00:04:47 +00:00
Jake Armstrong
bd257777a0
refactor(api): deduplicate workflow controller schemas into controller_schemas.py ( #34755 )
2026-04-08 23:49:04 +00:00
Yansong Zhang
0c7e7e0c4e
feat(api): port Sandbox + VirtualEnvironment + Skill system from feat/support-agent-sandbox (Phase 5-6)
...
Port the complete infrastructure for agent sandbox execution and skill system:
Sandbox & Virtual Environment (core/sandbox/, core/virtual_environment/):
- Sandbox entity with lifecycle management (ready/failed/cancelled states)
- SandboxBuilder with fluent API for configuring providers
- 5 VM providers: Local, SSH, Docker, E2B, AWS CodeInterpreter
- VirtualEnvironment base with command execution, file transfer, transport layers
- Channel transport: pipe, queue, socket implementations
- Bash session management and DifyCli binary integration
- Storage: archive storage, file storage, noop storage, presign storage
- Initializers: DifyCli, AppAssets, DraftAppAssets, Skills
- Inspector: file browser, archive/runtime source, script utils
- Security: encryption utils, debug helpers
Skill & App Assets (core/skill/, core/app_assets/, core/app_bundle/):
- Skill entity and manager
- App asset accessor, builder pipeline (file, skill builders)
- App bundle source zip extractor
- Storage and converter utilities
API Endpoints:
- CLI API blueprint (controllers/cli_api/) for sandbox callback
- Sandbox provider management (workspace/sandbox_providers)
- Sandbox file browser (console/sandbox_files)
- App asset management (console/app/app_asset)
- Skill management (console/app/skills)
- Storage file endpoints (controllers/files/storage_files)
Services:
- Sandbox service, provider service, file service
- App asset service, app bundle service
Config:
- CliApiConfig, CreatorsPlatformConfig, CollaborationConfig
- FILES_API_URL for sandbox file access
Note: Controller route registration temporarily commented out (marked TODO)
pending resolution of deep dependency chains (socketio, workflow_comment,
command node, etc.). Core sandbox modules are fully ported and syntax-validated.
110 files changed, 10,549 insertions.
Made-with: Cursor
2026-04-08 17:39:02 +08:00
Yansong Zhang
bebafaa346
fix(api): allow AGENT mode in console chat, message, and debug endpoints
...
Add AppMode.AGENT to mode checks discovered during E2E testing:
- Console chat-messages endpoint (ChatApi)
- Console chat stop endpoint (ChatMessageStopApi)
- Console message list and detail endpoints
- Advanced-chat debug run endpoints (5 in workflow.py)
- Advanced-chat workflow run endpoints (2 in workflow_run.py)
Made-with: Cursor
2026-04-08 13:27:42 +08:00
corevibe555
4d4265f531
refactor(api): deduplicate Pydantic models across fields and controllers ( #34718 )
2026-04-08 05:20:00 +00:00
Yansong Zhang
8f3a3ea03e
feat(api): enable Agent mode in workflow/service APIs and add default config (Phase 7)
...
Ensure new Agent apps (AppMode.AGENT) can access all workflow-related
APIs and Service API chat endpoints:
- Add AppMode.AGENT to 13 workflow controller mode checks
- Add AppMode.AGENT to 4 workflow_run controller mode checks
- Add AppMode.AGENT to workflow_draft_variable controller
- Add AppMode.AGENT to Service API chat, conversation, message endpoints
- Add AgentV2Node.get_default_config() with prompt templates and strategy defaults
- 46 unit tests all passing (8 new Phase 7 tests)
Old agent/agent-chat paths remain completely unchanged.
Made-with: Cursor
2026-04-08 12:41:37 +08:00
Yansong Zhang
96641a93f6
feat(api): add Agent V2 node and new Agent app type (Phase 1-3)
...
Introduce a new unified Agent V2 workflow node that combines LLM capabilities
with agent tool-calling loops, along with a new AppMode.AGENT for standalone
agent apps backed by single-node workflows.
Phase 1 — Agent Patterns:
- Add core/agent/patterns/ module (AgentPattern, FunctionCallStrategy,
ReActStrategy, StrategyFactory) ported from feat/support-agent-sandbox
- Add ExecutionContext, AgentLog, AgentResult entities
- Add Tool.to_prompt_message_tool() for LLM-consumable tool conversion
Phase 2 — Agent V2 Workflow Node:
- Add core/workflow/nodes/agent_v2/ (AgentV2Node, AgentV2NodeData,
AgentV2ToolManager, AgentV2EventAdapter)
- Register agent-v2 node type in DifyNodeFactory
- No-tools path: single LLM call (LLM Node equivalent)
- Tools path: FC/ReAct loop via StrategyFactory
Phase 3 — Agent App Type:
- Add AppMode.AGENT to model enum
- Add WorkflowGraphFactory for auto-generating start->agent_v2->answer graphs
- AppService.create_app() creates workflow draft for AGENT mode
- AppGenerateService.generate() routes AGENT to AdvancedChatAppGenerator
- Console API and DSL import/export support AGENT mode
- Default app template for AGENT mode
Old agent/agent-chat/LLM node paths are fully preserved.
38 unit tests all passing.
Made-with: Cursor
2026-04-08 12:31:23 +08:00
carlos4s
ae9fcc2969
refactor: use sessionmaker in controllers, events, models, and tasks 1 ( #34693 )
2026-04-07 23:47:20 +00:00
corevibe555
624db69f12
refactor(api): remove duplicated RAG entities from services layer ( #34689 )
2026-04-07 23:36:59 +00:00
corevibe555
c2af415450
refactor(api): Extract shared ResponseModel ( #34633 )
2026-04-07 13:05:38 +00:00
aliworksx08
396b39dff9
refactor: migrate session.query to select API in console controllers ( #34607 )
2026-04-07 04:19:30 +00:00
wangxiaolei
4cc5401d7e
fix: fix import dsl failed ( #34492 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-03 02:08:21 +00:00
99
318a3d0308
refactor(api): tighten login and wrapper typing ( #34447 )
2026-04-02 09:36:58 +00:00
99
8f9dbf269e
chore(api): align Python support with 3.12 ( #34419 )
...
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
2026-04-02 05:07:32 +00:00
Dream
c51cd42cb4
refactor(api): replace json.loads with Pydantic validation in controllers and infra layers ( #34277 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-01 05:41:44 +00:00
Desel72
cf50d7c7b5
refactor: use sessionmaker().begin() in console app controllers ( #34282 )
...
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
2026-03-31 13:10:16 +00:00
99
40591a7c50
refactor(api): use standalone graphon package ( #34209 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-27 21:05:32 +00:00
99
fcfc96ca05
chore: remove stale mypy suppressions and align dataset service tests ( #34130 )
2026-03-26 12:34:44 +00:00
99
52e7492cbc
refactor(api): rename dify_graph to graphon ( #34095 )
2026-03-25 21:58:56 +08:00
-LAN-
56593f20b0
refactor(api): continue decoupling dify_graph from API concerns ( #33580 )
...
Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: WH-2099 <wh2099@pm.me>
2026-03-25 20:32:24 +08:00
QuantumGhost
1674f8c2fb
fix: fix omitted app icon_type updates ( #33988 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-24 15:10:05 +08:00
Renzo
dd4f504b39
refactor: select in remaining console app controllers ( #33969 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-24 02:53:05 +09:00
Renzo
02e13e6d05
refactor: select in console app message controller ( #33893 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-23 16:38:04 +09:00
Eric Cao
18e4ec73d6
chore: use selectinload instead of joinedload in conversation query ( #33014 )
...
Co-authored-by: caoergou <caogou123@163.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-22 07:35:32 +09:00
盐粒 Yanli
c8ed584c0e
fix: adding a restore API for version control on workflow draft ( #33582 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-20 14:54:23 +08:00
tmimmanuel
5b9cb55c45
refactor: use EnumText for MessageFeedback and MessageFile columns ( #33738 )
2026-03-20 01:13:26 +09:00
Desel72
7c99c9f3e8
fix: sync workflow description and name to MCP server on update ( #33637 )
2026-03-18 19:04:45 +08:00
非法操作
98e72521f4
chore: change draft var to user scoped ( #33066 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com>
2026-03-16 14:04:41 +08:00
-LAN-
fb41b215c8
refactor(api): move workflow knowledge nodes and trigger nodes ( #33445 )
2026-03-15 15:24:59 +08:00
tmimmanuel
98df8e1d6c
refactor: replace remaining sa.String with EnumText 2 ( #33448 )
2026-03-14 20:20:30 +09:00
-LAN-
4fd6b52808
refactor(api): move model_runtime into dify_graph ( #32858 )
2026-03-02 20:15:32 +08:00
-LAN-
c917838f9c
refactor: move workflow package to dify_graph ( #32844 )
2026-03-02 18:42:30 +08:00
-LAN-
1f0fca89a8
refactor(workflow): move variables package into core.workflow ( #32750 )
2026-03-01 03:15:09 +08:00
-LAN-
eea1cf17ef
refactor(workflow): inject redis into graph engine manager ( #32622 )
2026-02-27 13:29:52 +08:00
edvatar
b48f36a4e5
fix: replace dict() merge with dict unpacking to resolve overload error ( #32653 )
...
Signed-off-by: edvatar <88481784+toroleapinc@users.noreply.github.com>
2026-02-27 06:15:17 +09:00
99
7656d514b9
refactor(workflow-file): move core.file to core.workflow.file ( #32252 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-16 22:38:19 +08:00
Xiyuan Chen
34e09829fb
fix(app-copy): inherit web app permission from original app ( #32323 )
2026-02-13 22:34:45 -08:00
weiguang li
697b57631a
fix(console): keep conversation updated_at unchanged when marking read ( #32133 )
2026-02-10 17:56:38 +08:00