mirror of
https://github.com/langgenius/dify.git
synced 2026-02-13 07:01:23 -05:00
- 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.
20 lines
596 B
Python
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"
|