Files
dify/api/core/sandbox/entities/config.py
Harry 9ed83a808a refactor: consolidate sandbox management and initialization
- Moved sandbox-related classes and functions into a dedicated module for better organization.
- Updated the sandbox initialization process to streamline asset management and environment setup.
- Removed deprecated constants and refactored related code to utilize new sandbox entities.
- Enhanced the workflow context to support sandbox integration, allowing for improved state management during execution.
- Adjusted various components to utilize the new sandbox structure, ensuring compatibility across the application.
2026-01-21 20:42:44 +08:00

20 lines
596 B
Python

from typing import Final
class DifyCli:
"""Dify CLI constants (absolute path - hidden in /tmp, not in sandbox workdir)"""
ROOT: Final[str] = "/tmp/.dify"
PATH: Final[str] = "/tmp/.dify/bin/dify"
PATH_PATTERN: Final[str] = "dify-cli-{os}-{arch}"
CONFIG_FILENAME: Final[str] = ".dify_cli.json"
TOOLS_ROOT: Final[str] = "/tmp/.dify/tools"
GLOBAL_TOOLS_PATH: Final[str] = "/tmp/.dify/tools/global"
class AppAssets:
"""App Assets constants (relative path - stays in sandbox workdir)"""
PATH: Final[str] = "skills"
ZIP_PATH: Final[str] = "/tmp/assets.zip"