dify/api/core
Yansong Zhang 73fd439541 fix(api): resolve sandbox deadlock under gevent and refine integration
- Skip Local sandbox provider under gevent worker (subprocess pipes
  cause cooperative threading deadlock with Celery's gevent pool).
- Add non-blocking sandbox readiness check before tool execution.
- Add gevent timeout wrapper for sandbox bash session.
- Fix CLI binary resolution: add SANDBOX_DIFY_CLI_ROOT config field.
- Fix ExecutionContext.node_id propagation.
- Fix SkillInitializer to gracefully handle missing skill bundles.
- Update _invoke_tool_in_sandbox to use correct `dify execute` CLI
  subcommand format (not `invoke-tool`).

The full sandbox-in-agent pipeline works end-to-end for network-based
providers (Docker, E2B, SSH). Local provider is skipped under gevent
but works in non-gevent contexts.

Made-with: Cursor
2026-04-10 10:51:40 +08:00
..
agent feat(api): integrate Sandbox Provider into Agent V2 execution pipeline 2026-04-10 10:14:42 +08:00
app fix(api): resolve sandbox deadlock under gevent and refine integration 2026-04-10 10:51:40 +08:00
app_assets feat(api): port Sandbox + VirtualEnvironment + Skill system from feat/support-agent-sandbox (Phase 5-6) 2026-04-08 17:39:02 +08:00
app_bundle feat(api): port Sandbox + VirtualEnvironment + Skill system from feat/support-agent-sandbox (Phase 5-6) 2026-04-08 17:39:02 +08:00
base refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
callback_handler refactor(api): tighten types for Tenant.custom_config_dict and MCPToolProvider.headers (#34698) 2026-04-08 01:36:42 +00:00
datasource refactor(api): deduplicate I18nObject in datasource entities (#34701) 2026-04-08 01:36:56 +00:00
db fix(db): parameterize sessionmaker with Session (#30612) 2026-01-06 15:23:50 +08:00
entities refactor(api): tighten types for Tenant.custom_config_dict and MCPToolProvider.headers (#34698) 2026-04-08 01:36:42 +00:00
errors chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
extension change all to httpx (#26119) 2025-10-10 23:41:16 +08:00
external_data_tool chore: add ast-grep rule to convert Optional[T] to T | None (#25560) 2025-09-15 13:06:33 +08:00
helper feat(api): enable all sandbox/skill controller routes and resolve dependencies (P0) 2026-04-09 09:36:16 +08:00
llm_generator feat(api): enable all sandbox/skill controller routes and resolve dependencies (P0) 2026-04-09 09:36:16 +08:00
logging refactor(api): reuse IdentityDict TypedDict in logging filters (#34593) 2026-04-06 11:30:21 +00:00
mcp refactor(api): type MCP tool schema and arguments with TypedDict (#34612) 2026-04-07 01:02:06 +00:00
memory fix(api): resolve multi-turn memory failure in Agent apps 2026-04-09 16:27:38 +08:00
moderation refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
ops refactor(api): type aliyun trace utils with TypedDict and tighten return types (#34642) 2026-04-07 05:57:22 +00:00
plugin refactor(api): tighten types for Tenant.custom_config_dict and MCPToolProvider.headers (#34698) 2026-04-08 01:36:42 +00:00
prompt refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
rag refactor(api): tighten types for Tenant.custom_config_dict and MCPToolProvider.headers (#34698) 2026-04-08 01:36:42 +00:00
repositories chore(api): align Python support with 3.12 (#34419) 2026-04-02 05:07:32 +00:00
sandbox feat(api): integrate Sandbox Provider into Agent V2 execution pipeline 2026-04-10 10:14:42 +08:00
schemas chore(api): align Python support with 3.12 (#34419) 2026-04-02 05:07:32 +00:00
session feat(api): enable all sandbox/skill controller routes and resolve dependencies (P0) 2026-04-09 09:36:16 +08:00
skill feat(api): port Sandbox + VirtualEnvironment + Skill system from feat/support-agent-sandbox (Phase 5-6) 2026-04-08 17:39:02 +08:00
telemetry feat: enterprise otel exporter (#33138) 2026-03-27 07:56:31 +00:00
tools feat(api): enable all sandbox/skill controller routes and resolve dependencies (P0) 2026-04-09 09:36:16 +08:00
trigger refactor(api): tighten types for Tenant.custom_config_dict and MCPToolProvider.headers (#34698) 2026-04-08 01:36:42 +00:00
virtual_environment feat(api): port Sandbox + VirtualEnvironment + Skill system from feat/support-agent-sandbox (Phase 5-6) 2026-04-08 17:39:02 +08:00
workflow fix(api): resolve sandbox deadlock under gevent and refine integration 2026-04-10 10:51:40 +08:00
zip_sandbox feat(api): enable all sandbox/skill controller routes and resolve dependencies (P0) 2026-04-09 09:36:16 +08:00
__init__.py Fix basedpyright type errors (#25435) 2025-09-10 01:54:26 +08:00
hosting_configuration.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
indexing_runner.py refactor: core/app pipeline, core/datasource, and core/indexing_runner (#34359) 2026-04-01 02:20:56 +00:00
model_manager.py refactor(api): tighten types for Tenant.custom_config_dict and MCPToolProvider.headers (#34698) 2026-04-08 01:36:42 +00:00
provider_manager.py refactor(api): replace json.loads with Pydantic validation in security and tools layers (#34380) 2026-04-07 12:11:51 +00:00