mirror of
https://github.com/langgenius/dify.git
synced 2026-02-23 08:03:35 -05:00
- Renamed `build_skill_artifact_set` to `build_skill_bundle` for improved clarity in asset management. - Updated references in `SkillManager` to reflect the new method name and ensure consistent handling of skill bundles. - Added `AppAssetsAttrsInitializer` to `SandboxManager` to enhance asset initialization processes. - Implemented output truncation in `SandboxBashTool` to manage long command outputs effectively.
24 lines
1.0 KiB
Python
24 lines
1.0 KiB
Python
class AssetPaths:
|
|
_BASE = "app_assets"
|
|
|
|
@staticmethod
|
|
def draft_file(tenant_id: str, app_id: str, node_id: str) -> str:
|
|
return f"{AssetPaths._BASE}/{tenant_id}/{app_id}/draft/{node_id}"
|
|
|
|
@staticmethod
|
|
def build_zip(tenant_id: str, app_id: str, assets_id: str) -> str:
|
|
return f"{AssetPaths._BASE}/{tenant_id}/{app_id}/artifacts/{assets_id}.zip"
|
|
|
|
@staticmethod
|
|
def build_resolved_file(tenant_id: str, app_id: str, assets_id: str, node_id: str) -> str:
|
|
return f"{AssetPaths._BASE}/{tenant_id}/{app_id}/artifacts/{assets_id}/resolved/{node_id}"
|
|
|
|
@staticmethod
|
|
def build_skill_bundle(tenant_id: str, app_id: str, assets_id: str) -> str:
|
|
return f"{AssetPaths._BASE}/{tenant_id}/{app_id}/artifacts/{assets_id}/skill_artifact_set.json"
|
|
|
|
@staticmethod
|
|
def build_source_zip(tenant_id: str, app_id: str, workflow_id: str) -> str:
|
|
"""Storage key for source assets zip (editable files snapshot at publish time)."""
|
|
return f"{AssetPaths._BASE}/{tenant_id}/{app_id}/sources/{workflow_id}.zip"
|