carlos4s
02a9f0abca
refactor(api): use sessionmaker in core app generators & pipelines ( #34771 )
2026-04-08 23:15:58 +00:00
Renzo
289f091bf9
refactor: migrate session.query to select API in delete conversation task ( #34772 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-08 23:15:19 +00:00
tmimmanuel
1a4eb47e1d
refactor(api): tighten types in trivial lint and config fixes ( #34773 )
...
Co-authored-by: tmimmanuel <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>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-08 23:14:44 +00:00
carlos4s
4c70bfa8b8
refactor(api): use sessionmaker in trigger provider service & dataset… ( #34774 )
2026-04-08 23:13:38 +00:00
aliworksx08
3a4756449a
refactor: migrate session.query to select API in schedule cleanup task ( #34775 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-08 23:12:57 +00:00
dependabot[bot]
55b7ea04a7
chore(deps): bump cryptography from 46.0.6 to 46.0.7 in /api ( #34776 )
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-08 23:12:19 +00:00
非法操作
ccfc8c6f15
chore: align prompt editor var checks with use-check-list checks ( #34715 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-08 13:29:07 +00:00
zhangbububu
4fb3fab82d
fix: add backward-compatible query param for decode_plugin_from_ident… ( #34720 )
2026-04-08 13:28:37 +00:00
wangxiaolei
3cea0dfb07
fix: fix import error ( #34728 )
2026-04-08 13:27:53 +00:00
github-actions[bot]
0d6db3a3f3
chore(i18n): sync translations with en-US ( #34745 )
...
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
2026-04-08 12:10:37 +00:00
github-actions[bot]
3d5a81bd30
chore(i18n): sync translations with en-US ( #34742 )
...
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
2026-04-08 11:30:47 +00:00
yyh
208604a3a8
fix(ci): repair i18n bridge and translation workflow ( #34738 )
2026-04-08 11:05:13 +00:00
Stephen Zhou
63bfba0bdb
fix: update how ky handle error ( #34735 )
2026-04-08 10:38:33 +00:00
Yansong Zhang
d3d9f21cdf
feat(api): wire sandbox into Agent V2 node execution pipeline
...
Integrate the ported sandbox system with Agent V2 node:
- Add DIFY_SANDBOX_CONTEXT_KEY to app_invoke_entities for passing
sandbox through run_context without modifying graphon
- DifyNodeFactory._resolve_sandbox() extracts sandbox from run_context
and passes it to AgentV2Node constructor
- AgentV2Node accepts optional sandbox parameter
- AgentV2ToolManager supports dual execution paths:
- _invoke_tool_directly(): standard ToolEngine.generic_invoke (no sandbox)
- _invoke_tool_in_sandbox(): delegates to SandboxBashSession.run_tool()
which uses DifyCli to call back to Dify API from inside the sandbox
- Graceful fallback: if sandbox execution fails, logs warning and returns
error message (does not crash the agent loop)
To enable sandbox for an Agent workflow:
1. Create a Sandbox via SandboxBuilder
2. Add it to run_context under DIFY_SANDBOX_CONTEXT_KEY
3. Agent V2 nodes will automatically use sandbox for tool execution
46 existing tests still pass.
Made-with: Cursor
2026-04-08 17:46:34 +08: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
Coding On Star
9948a51b14
test: add unit tests for access control components to enhance coverage and reliability ( #34722 )
...
Co-authored-by: CodingOnStar <hanxujiang@dify.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-08 08:50:57 +00:00
s-kawamura-upgrade
0e0bb3582f
feat(web): add ALLOW_INLINE_STYLES env var to opt-in inline CSS in Markdown rendering ( #34719 )
...
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 08:38:24 +00:00
Yansong Zhang
d9d1e9b63a
fix(api): resolve Agent V2 node E2E runtime issues
...
Fixes discovered during end-to-end testing of Agent workflow execution:
1. ModelManager instantiation: use ModelManager.for_tenant() instead of
ModelManager() which requires a ProviderManager argument
2. Variable template resolution: use VariableTemplateParser(template).format()
instead of non-existent resolve_template() static method
3. invoke_llm() signature: remove unsupported 'user' keyword argument
4. Event dispatch: remove ModelInvokeCompletedEvent from _run() yield
(graphon base Node._dispatch doesn't support it via singledispatch)
5. NodeRunResult metadata: use WorkflowNodeExecutionMetadataKey enum keys
(TOTAL_TOKENS, TOTAL_PRICE, CURRENCY) instead of arbitrary string keys
6. SSE topic mismatch: use AppMode.AGENT (not ADVANCED_CHAT) in
retrieve_events() so publisher and subscriber share the same channel
7. Celery task routing: add AppMode.AGENT to workflow_execute_task._run_app()
alongside ADVANCED_CHAT
All issues verified fixed: Agent V2 node successfully invokes LLM and
returns "Hello there!" through the full SSE streaming pipeline.
Made-with: Cursor
2026-04-08 16:21:12 +08:00
Stephen Zhou
546062d2cd
chore: remove raw vite deps ( #34726 )
2026-04-08 07:49:53 +00:00
Stephen Zhou
aad0b3c157
build: include vinext in docker build ( #34535 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
2026-04-08 07:26:39 +00: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
1835a1dc5d
fix(api): allow AGENT mode in workflow features validation
...
Add AppMode.AGENT to validate_features_structure() match case
alongside ADVANCED_CHAT, fixing 'Invalid app mode: agent' error
when creating Agent apps (which auto-generate a workflow draft).
Discovered during E2E testing of the full create -> draft -> publish flow.
Made-with: Cursor
2026-04-08 13:19:59 +08:00
Will
e138523123
fix: legacy model_type deserialization regression ( #34717 )
2026-04-08 05:08:12 +00:00
carlos4s
a65e1f71b4
refactor: use sessionmaker in small services 2 ( #34696 )
...
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-08 05:06:50 +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
yyh
909c062ee1
fix(web): avoid prehydration script in slider ( #34676 )
2026-04-08 04:03:19 +00:00
hj24
f5322e45fc
refactor: enhance billing info response handling ( #34340 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-08 03:49:35 +00:00
Stephen Zhou
017f09f1e9
ci: update web changes scope ( #34713 )
2026-04-08 03:24:41 +00:00
corevibe555
0ba66ab155
refactor(api): deduplicate shared controller request schemas into controller_schemas.py ( #34700 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-08 03:10:04 +00:00
corevibe555
5cd267d755
refactor(api): deduplicate RAG index entities and consolidate import paths ( #34690 )
2026-04-08 02:49:40 +00:00
Stephen Zhou
d30946dabf
chore: update deps ( #34704 )
2026-04-08 02:45:30 +00:00
wangxiaolei
b0e524213e
fix: backendModelConfig.chat_prompt_config.prompt is undefined ( #34709 )
2026-04-08 02:29:18 +00:00
corevibe555
b1adb5652e
refactor(api): deduplicate I18nObject in datasource entities ( #34701 )
2026-04-08 01:36:56 +00:00
corevibe555
c825d5dcf6
refactor(api): tighten types for Tenant.custom_config_dict and MCPToolProvider.headers ( #34698 )
2026-04-08 01:36:42 +00:00
Renzo
2127d5850f
refactor: replace untyped dicts with TypedDict in VDB config classes ( #34697 )
2026-04-08 00:57:11 +00: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
80a7843f45
refactor(api): migrate consumers to shared RAG domain entities from core/rag/entities/ ( #34692 )
2026-04-07 23:22:56 +00:00
Renzo
cb55176612
refactor: migrate session.query to select API in small task files batch ( #34684 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-07 22:58:23 +00:00
Statxc
5aa2524d33
refactor(api): type I18nObject.to_dict with I18nObjectDict TypedDict ( #34680 )
2026-04-07 22:57:32 +00:00
Pulakesh
2575a3a3ab
refactor(api): clean up AssistantPromptMessage typing in CotChatAgentRunner ( #34681 )
2026-04-07 22:53:14 +00:00
corevibe555
f8f7b0ec1a
refactor(api): deduplicate shared auth request payloads into auth_entities.py ( #34694 )
2026-04-07 22:51:11 +00:00
corevibe555
d2ee486900
refactor(api): extract shared RAG domain entities into core/rag/entity ( #34685 )
2026-04-07 22:43:37 +00:00
Statxc
c44ddd9831
refactor(api): type Chroma and AnalyticDB config params dicts with TypedDicts ( #34678 )
2026-04-07 13:27:12 +00:00
Statxc
e645cbd8f8
refactor(api): type VDB config params dicts with TypedDicts ( #34677 )
2026-04-07 13:23:42 +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
YBoy
f09be969bb
refactor(api): type single-node graph structure with TypedDicts in workflow_entry ( #34671 )
2026-04-07 13:18:00 +00:00
Statxc
597a0b4d9f
refactor(api): type indexing result with IndexingResultDict TypedDict ( #34672 )
2026-04-07 13:17:39 +00:00