dify/api/core/sandbox
Harry 65e89520c0 refactor: unify download item types and eliminate extension-based branching
Merge AssetDownloadItem, AssetInlineItem into SandboxDownloadItem with
optional 'content' field. All consumers now follow a clean pipeline:
  get items → accessor.resolve_items() → AppAssetService.to_download_items() → download

Key changes:
- SandboxDownloadItem gains content: bytes | None (entities.py)
- ZipSandbox.download_items() handles both inline (base64 heredoc) and
  remote (curl) via a single pipeline — no structural branching
- AssetDownloadService.build_download_script() takes unified list
- CachedContentAccessor.resolve_items() batch-enriches items from DB
  (extension-agnostic, no 'if md' checks needed)
- AppAssetService.to_download_items() converts AssetItem → SandboxDownloadItem
- DraftAppAssetsInitializer, package_and_upload, export_bundle simplified
- file_upload/node.py switched to SandboxDownloadItem
- Deleted AssetDownloadItem and AssetInlineItem classes
2026-03-10 17:12:15 +08:00
..
bash fix: update files_url to use FILES_API_URL in DifyCliConfig 2026-02-15 17:19:08 +08:00
entities feat: add AWS Code Interpreter sandbox provider and update sandbox type 2026-03-10 17:12:15 +08:00
initializer refactor: unify download item types and eliminate extension-based branching 2026-03-10 17:12:15 +08:00
inspector feat: add DB inline content cache for app asset draft files 2026-03-10 17:12:14 +08:00
services refactor: unify download item types and eliminate extension-based branching 2026-03-10 17:12:15 +08:00
storage feat: enhance file upload process with content type detection and command building 2026-02-05 18:00:45 +08:00
utils feat(sandbox): add AppAssetsInitializer and refactor VMFactory to VMBuilder 2026-01-15 00:13:52 +08:00
__init__.py feat(sandbox-zip-service): using sandbox to zip files 2026-01-27 14:19:27 +08:00
builder.py feat: add AWS Code Interpreter sandbox provider and update sandbox type 2026-03-10 17:12:15 +08:00
manager.py feat(sandbox): refactor sandbox file handling to include app_id 2026-01-30 22:45:28 +08:00
sandbox.py Revert "refactor: replace threading with gevent primitives for cooperative scheduling" 2026-01-28 13:51:48 +08:00