bg8lng/dsh-openlist-sync0

dsh-openlist-sync

OpenList 文件同步插件(含设置面板):自动把 DSH 对话交付文件上传到 OpenList 挂载目录,并提供该目录的完整读写工具集。

包名
dsh-openlist-sync
版本
0.2.5
许可证
MIT
最近更新
2026年9月3日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:bg8lng/dsh-openlist-sync

配置

$DSH_HOME/profiles/web/cordis.patch.yml(即 ~/.dsh/profiles/web/cordis.patch.yml)中追加/覆盖:

- id: tool-openlist-sync
  config:
    baseUrl: "https://your-openlist.example.com"   # OpenList 访问地址;挂在子路径则带子路径
    username: admin
    password: 你的密码                      # 建议改用环境变量 DSH_OPENLIST_PASSWORD,见下
    # token: "站点令牌"                    # 二选一:OpenList 后台 设置→其他→站点令牌,优先于账号密码
    targetDir: "/DSH交付"                  # 交付文件自动存放目录(自动创建)
    layout: "date"                         # flat | date(默认)| date-session
    autoSync: true                          # 总开关
    syncChatDeliveries: true                # dsh_im_return_file 聊天交付
    syncProducedFiles: true                 # write/edit/str_replace_editor 产物
    overwrite: false                        # 远端同名是否覆盖
    restrictToRoot: true                    # 目录工具是否锁定在 targetDir 内

环境变量(优先级最高,避免明文密码进 YAML)

变量说明
DSH_OPENLIST_BASE_URLOpenList 地址
DSH_OPENLIST_USERNAME用户名
DSH_OPENLIST_PASSWORD密码(推荐)
DSH_OPENLIST_TOKEN站点令牌(替代账号密码)
DSH_OPENLIST_TARGET_DIR目标目录

完整配置项

配置默认说明
baseUrlOpenList 根地址(含子路径则到子路径)
username / password账号密码登录
token站点令牌(优先)
targetDir/DSH交付交付目录
layoutdateflat / date / date-session
autoSynctrue自动同步总开关
syncChatDeliveriestrue聊天交付文件(dsh_im_return_file)
syncProducedFilestruewrite/edit/str_replace_editor 产物
overwritefalse同名覆盖
dedupeByContentfalse按 sha256 内容全局去重
includes[]文件名白名单(*/?),空=不限
excludes[]文件名黑名单
maxBytes314572800单文件上限(默认 300MB)
restrictToRoottrue目录工具锁在 targetDir
dataDir~/.dsh/dsh-openlist-syncstate.json 存放处
timeoutMs30000API 超时
producedTools见下工具名→路径参数映射(扩展)

默认 producedTools:{ write: file_path, edit: file_path, str_replace_editor: path, dsh_im_return_file: path }。其它插件产出的文件可在配置里追加,例如:

    producedTools:
      excel_task: outPath        # dsh-excel-chat 任务输出也自动同步
      run_code: outputPath       # 假想示例

完整配置项

配置默认说明
baseUrlOpenList 根地址(含子路径则到子路径)
username / password账号密码登录
token站点令牌(优先)
targetDir/DSH交付交付目录
layoutdateflat / date / date-session
autoSynctrue自动同步总开关
syncChatDeliveriestrue聊天交付文件(dsh_im_return_file)
syncProducedFilestruewrite/edit/str_replace_editor 产物
overwritefalse同名覆盖
dedupeByContentfalse按 sha256 内容全局去重
includes[]文件名白名单(*/?),空=不限
excludes[]文件名黑名单
maxBytes314572800单文件上限(默认 300MB)
restrictToRoottrue目录工具锁在 targetDir
dataDir~/.dsh/dsh-openlist-syncstate.json 存放处
timeoutMs30000API 超时
producedTools见下工具名→路径参数映射(扩展)

默认 producedTools:{ write: file_path, edit: file_path, str_replace_editor: path, dsh_im_return_file: path }。其它插件产出的文件可在配置里追加,例如:

    producedTools:
      excel_task: outPath        # dsh-excel-chat 任务输出也自动同步
      run_code: outputPath       # 假想示例