存档
This commit is contained in:
@@ -86,6 +86,19 @@ def get_toolset_dir() -> "pathlib.Path":
|
||||
return project_root / "data" / "toolset"
|
||||
|
||||
|
||||
def get_plugin_data_dir(plugin_name: str) -> "pathlib.Path":
|
||||
"""返回单个插件的私有数据目录:``<plugin_dir>/<name>/_data/``。
|
||||
|
||||
放 SQLite 文件、安装 marker、本地缓存等运行时状态——跟随插件代码同根目录,
|
||||
用户备份/迁移整个插件文件夹时数据自动跟着走。目录不存在时自动创建。
|
||||
"""
|
||||
import pathlib
|
||||
|
||||
target = get_plugin_dir() / plugin_name / "_data"
|
||||
target.mkdir(parents=True, exist_ok=True)
|
||||
return target
|
||||
|
||||
|
||||
def get_artifact_dir() -> "pathlib.Path":
|
||||
"""返回工作流产物(agent 通过 send_file 推送的文件)存放根目录。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user