Yansong Zhang
e9ee897973
fix: resolve remaining CI failures for style checks and unit tests
...
- Add model_features property and build_execution_context method to
AgentAppRunner to fix mypy attr-defined errors
- Export WorkflowComment, WorkflowCommentReply, WorkflowCommentMention
from models/__init__.py to fix import errors
- Add NestedNodeGraphRequest, NestedNodeGraphResponse,
NestedNodeParameterSchema to services/workflow/entities.py
- Update test_agent_chat_app_runner: tests for invalid LLM mode and
invalid strategy now reflect unified AgentAppRunner behavior
(no longer raises ValueError for these cases)
Made-with: Cursor
2026-04-13 16:07:38 +08:00
zyssyz123
c7a7c73034
Merge branch 'main' into feat/new-agent-node
2026-04-13 13:58:02 +08:00
Statxc
b0079e55b4
refactor(api): type WorkflowAppLog.to_dict with WorkflowAppLogDict TypedDict ( #34682 )
2026-04-13 05:47:44 +00:00
sxxtony
d9f54f8bd7
refactor: migrate WorkflowPause and WorkflowPauseReason to TypeBase ( #34688 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-13 05:46:52 +00:00
zyssyz123
3e0578a1c6
Merge branch 'main' into feat/new-agent-node
2026-04-13 13:43:47 +08:00
sxxtony
7dd507af04
refactor: migrate SegmentAttachmentBinding to TypeBase ( #34810 )
2026-04-13 05:22:43 +00:00
sxxtony
ea9f74b581
refactor: migrate RecommendedApp to TypeBase ( #34808 )
2026-04-13 05:19:49 +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
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
-LAN-
8c4ea5c898
fix: external dataset tenant checks for bound knowledge APIs ( #34734 )
2026-04-13 01:47:57 +00:00
YBoy
095962f13e
refactor(api): type DataSourceApiKeyAuthBinding.to_dict with TypedDict ( #35001 )
2026-04-13 00:50:58 +00:00
BitToby
b3aebb71ff
refactor(api): type Document.to_dict with DocumentDict TypedDict ( #34924 )
...
Co-authored-by: bittoby <bittoby@users.noreply.github.com>
2026-04-10 17:36:50 +00:00
sxxtony
2eb43b1e1f
refactor: make DefaultFieldsMixin compatible with TypeBase (MappedAsDataclass) ( #34686 )
2026-04-10 18:53:27 +08:00
corevibe555
07c573e52f
refactor(api): replace Optional/Union with | syntax, remove dead AnyFunction ( #34894 )
2026-04-10 05:46:05 +00:00
sxxtony
660c7e4a43
refactor: migrate TrialApp and AccountTrialAppRecord to TypeBase ( #34897 )
2026-04-10 05:13:06 +00:00
dataCenter430
1117b6e72d
refactor: convert appmode misc if/elif to match/case ( #30001 ) ( #34869 )
2026-04-10 00:35:12 +00:00
sxxtony
985e71ebf4
refactor: migrate TrialApp and AccountTrialAppRecord to TypeBase ( #34806 )
2026-04-09 15:41:29 +00:00
Jonathan Chang
0a6494abfb
refactor(api): deduplicate EnabledConfig property logic in AppModelConfig ( #34793 )
2026-04-09 14:24:39 +00:00
Jonathan Chang
d5ababfed0
refactor(api): deduplicate json serialization in AppModelConfig.from_model_config_dict ( #34795 )
2026-04-09 06:14:48 +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
3325392cc5
refactor: convert segmentType workflow if/elif to match/case ( #34785 )
2026-04-09 00:51:43 +00:00
dataCenter430
e6715a2dbe
refactor: convert FileTransferMethod if/elif to match/case ( #30001 ) ( #34769 )
2026-04-08 23:27:10 +00:00
Will
e138523123
fix: legacy model_type deserialization regression ( #34717 )
2026-04-08 05:08:12 +00: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
YBoy
485fc2c416
refactor(api): type Tenant custom config with TypedDict and tighten MCP headers type ( #34670 )
2026-04-07 13:18:19 +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
wangxiaolei
993a301468
fix: fix online_drive is not a valid datasource_type ( #34440 )
2026-04-02 04:45:02 +00:00
99
f27d669f87
chore: normalize frozenset literals and myscale typing ( #34327 )
2026-03-31 08:21:22 +00:00
tmimmanuel
1344c3b280
refactor: use EnumText for model_type in provider models ( #34300 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-31 00:31:33 +00:00
tmimmanuel
5897b28355
refactor: use EnumText for Provider.quota_type and consolidate ProviderQuotaType ( #34299 )
2026-03-31 00:29:57 +00:00
tmimmanuel
ec0f20de03
refactor: use EnumText for prompt_type and customize_token_strategy ( #34204 )
2026-03-27 22:29:38 +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
tmimmanuel
66fab8722c
refactor: use EnumText for credential_type in TriggerSubscription ( #34174 )
...
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-27 10:53:51 +00:00
tmimmanuel
2ea85d3ba2
refactor: use EnumText for model_type and WorkflowNodeExecution.status ( #34093 )
...
Co-authored-by: Krishna Chaitanya <krishnabkc15@gmail.com>
2026-03-26 20: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
Krishna Chaitanya
ad3899f864
fix: resolve SADeprecationWarning for callable default in remaining TypeBase models ( #34049 )
2026-03-25 12:51:36 +09:00
tmimmanuel
d87263f7c3
refactor: select in console datasets document controller ( #34029 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-25 12:47:25 +09:00
qianchongyang
e873cea99e
fix: SQLAlchemy deprecation warnings for default parameter ( #33980 )
...
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
2026-03-25 00:18:29 +09:00
tmimmanuel
8b634a9bee
refactor: use EnumText for ApiToolProvider.schema_type_str and Docume… ( #33983 )
2026-03-24 13:27:50 +09:00
tmimmanuel
cc17c8e883
refactor: use EnumText for TidbAuthBinding.status and MessageFile.type ( #33975 )
2026-03-24 05:38:29 +09:00
tmimmanuel
5d2cb3cd80
refactor: use EnumText for DocumentSegment.type ( #33979 )
2026-03-24 05:37:51 +09:00
tmimmanuel
75c3ef82d9
refactor: use EnumText for TenantCreditPool.pool_type ( #33959 )
2026-03-24 02:51:10 +09:00
tmimmanuel
4a2e9633db
refactor: use EnumText for ApiToken.type ( #33961 )
2026-03-24 02:46:06 +09:00
tmimmanuel
20fc69ae7f
refactor: use EnumText for WorkflowAppLog.created_from and WorkflowArchiveLog columns ( #33954 )
2026-03-24 02:44:46 +09:00
Desel72
abda859075
refactor: migrate execution extra content repository tests from mocks to testcontainers ( #33852 )
2026-03-23 17:32:11 +09:00
tmimmanuel
2b6f761dfe
refactor: use EnumText for Conversation/Message invoke_from and from_source ( #33901 )
2026-03-23 16:03:35 +09:00
tmimmanuel
f41d1d0822
refactor: use EnumText for Conversation/Message invoke_from and from_source ( #33832 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
2026-03-21 11:47:48 +09:00