dify/api/controllers/console
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
..
app feat(api): port Sandbox + VirtualEnvironment + Skill system from feat/support-agent-sandbox (Phase 5-6) 2026-04-08 17:39:02 +08:00
auth refactor(api): deduplicate shared auth request payloads into auth_entities.py (#34694) 2026-04-07 22:51:11 +00:00
billing refactor(api): clean redundant type ignore in request query parsing 🤖🤖🤖 (#34350) 2026-03-31 22:52:35 +00:00
datasets refactor: migrate session.query to select API in console controllers (#34607) 2026-04-07 04:19:30 +00:00
explore chore(api): align Python support with 3.12 (#34419) 2026-04-02 05:07:32 +00:00
tag refactor: replace dict params with BaseModel payloads in TagService (#34422) 2026-04-07 04:20:02 +00:00
workspace feat(api): port Sandbox + VirtualEnvironment + Skill system from feat/support-agent-sandbox (Phase 5-6) 2026-04-08 17:39:02 +08:00
__init__.py feat(api): port Sandbox + VirtualEnvironment + Skill system from feat/support-agent-sandbox (Phase 5-6) 2026-04-08 17:39:02 +08:00
admin.py refactor(api): migrate dict returns to TypedDicts in billing service (#34649) 2026-04-07 05:56:02 +00:00
apikey.py refactor: use sessionmaker().begin() in console workspace and misc co… (#34284) 2026-03-31 14:28:05 +00:00
error.py Restructure the File errors in controller (#23801) 2025-08-13 17:06:07 +08:00
extension.py refactor: split changes for api/controllers/console/extension.py (#29888) 2025-12-24 09:41:42 +08:00
feature.py fix: revert "refactor: api/controllers/console/feature.py (test)" (#31850) 2026-02-03 12:26:47 +08:00
files.py refactor: port api/fields/file_fields.py (#30638) 2026-01-06 22:55:58 +08:00
human_input_form.py chore: remove stale mypy suppressions and align dataset service tests (#34130) 2026-03-26 12:34:44 +00:00
init_validate.py refactor: init_validate.py to v3 (#31457) 2026-01-30 22:39:02 +09:00
notification.py refactor(api): type notification response with NotificationResponseDict TypedDict (#34616) 2026-04-07 01:03:18 +00:00
ping.py feat: init fastopenapi (#30453) 2026-01-23 21:07:52 +09:00
remote_files.py refactor(api): use standalone graphon package (#34209) 2026-03-27 21:05:32 +00:00
sandbox_files.py feat(api): port Sandbox + VirtualEnvironment + Skill system from feat/support-agent-sandbox (Phase 5-6) 2026-04-08 17:39:02 +08:00
setup.py refactor: select in console auth, setup and apikey (#33790) 2026-03-21 11:29:29 +09:00
spec.py refactor(router): apply ns.route style (#26339) 2025-09-28 13:37:06 +08:00
version.py refactor: api/controllers/console/version.py to v3 (#31463) 2026-01-26 15:04:25 +08:00
wraps.py chore(api): align Python support with 3.12 (#34419) 2026-04-02 05:07:32 +00:00