Skip to content

dsh-bicbot

Verified

@bic-ai/dsh-bicbot · v0.1.1 · MIT · Web UI

BIC Bot integration plugin for DeepSeek Harness

Install

dsh plugin add @bic-ai/dsh-bicbot

Confirm the layer applied with dsh --profile default --dump-config — see the install guide.

Source

Published to npm without a public repository. Inspect the package contents before installing.

Tags

Creators

Readme

BicBot for DeepSeek Harness

@bic-ai/dsh-bicbot 是 BicBot 的 DeepSeek Harness(DSH)插件。安装后,可以在 DSH Web 中直接选择 BicBot 模型,不需要修改 DSH 源码。

功能

  • 文本与图片对话
  • 流式正文、Thinking 和 Token 用量显示
  • DSH Read Only、Workspace Write 与 Full Access 权限控制
  • 工具执行状态和用户确认
  • 原生或紧凑工具卡片
  • 生成文件下载
  • DSH 工作区与 BicBot 会话工作区一致
  • 中文和英文错误提示

环境要求

  • Node.js 20 或更高版本
  • DeepSeek Harness developer preview
  • pnpm 可用;dsh plugin 会使用它管理 Profile 依赖
  • 一个能够被 DSH Host 访问的 bicbot-web 服务

DSH 插件 API 尚未稳定,生产环境建议固定已验证的 DSH 版本。

安装

将插件安装到 DSH Web 默认使用的 web Profile:

dsh plugin --profile web add @bic-ai/dsh-bicbot

插件会安装到 $DSH_HOME/profiles/web 对应的依赖环境中。web 是 Profile 名,不是插件名。其它 Profile 可以这样指定:

dsh plugin --profile my-profile add @bic-ai/dsh-bicbot

安装后重启对应 Profile 的 DSH Web,并强制刷新浏览器页面。

服务端准备

插件默认使用自动模型发现,因此 bicbot-web 必须开启 provider 暴露:

[http]
expose_providers = true

如果没有开启,DSH 会提示“BIC Bot 没有可用模型,请配置插件模型或启用服务端模型发现”。不希望公开模型列表时,也可以保持该选项关闭,并在插件配置中手工填写 models

配置

插件默认连接 http://127.0.0.1:8080。如果 bicbot-web 使用其它端口或路径前缀,只需要在 $DSH_HOME/profiles/web/cordis.patch.yml 中覆盖服务地址:

- id: bicbot
  config:
    baseURL: 'http://127.0.0.1:13801/claw'

id: bicbot 用于定位插件实例。多个插件可以共用同一个 cordis.patch.yml,每个插件使用各自的条目。

安装后 cordis.patch.yml 可能仍然只有注释或为空,这是正常现象:该文件只保存用户覆盖项,插件自带默认值来自独立的 bundle 配置层。可以分别查看插件默认配置和合并后的最终配置:

dsh --profile web --dump-default-config
dsh --profile web --dump-config

服务认证

如果 bicbot-web 启用了 Bearer Token 认证,通过环境变量向 DSH 进程提供 Token:

export BICBOT_TOKEN_DSH='sk-your-production-token'
dsh web --no-open

并在 cordis.patch.yml 的同一个插件条目中指定环境变量名:

- id: bicbot
  config:
    bearerTokenEnv: 'BICBOT_TOKEN_DSH'

bearerTokenEnv 填写环境变量名,不要把 Token 值直接写入 DSH 配置。环境变量不存在或为空时,插件会拒绝启动请求。

模型配置

默认不配置 models,插件会自动读取 BicBot 可用模型,发现结果默认缓存 30 秒。配置了 models 时则完全以手工列表为准,不再请求自动发现:

- id: bicbot
  config:
    models:
      - id: 'bic-ds-v4-flash'
        name: 'bic-ds-v4-flash'
        bicbotModel: 'deepseek-v4-flash'
        inputModalities: ['text']
      - id: 'bic-ds-v4-flash-vision-exp'
        name: 'bic-ds-v4-flash-vision-exp'
        bicbotModel: 'deepseek-v4-flash-vision-exp'
        inputModalities: ['text', 'image']

id 是 DSH 中显示和选择的模型,bicbotModel 是发送给 BicBot 的模型名。省略 inputModalities 时安全地默认为 ['text'];只有明确声明 image 才允许图片输入。

常用选项

配置项 默认值 说明
baseURL http://127.0.0.1:8080 bicbot-web 服务地址
displayName BicBot DSH 中显示的名称
defaultContextWindow 200000 模型未声明上下文窗口时采用的值
modelCacheSeconds 30 自动发现模型的缓存时间
maxImageFiles 5 单条消息最多图片数
maxImageBytes 5242880 单张及总图片字节限制
connectTimeoutSeconds 30 建立上游连接的超时时间;0 表示关闭
streamIdleTimeoutSeconds 600 流连续无数据的超时时间;0 表示关闭
maxSseEventBytes 1048576 单个流事件大小上限
toolPresentation native nativecompact 工具展示方式
maxDownloadBytes 33554432 单个下载文件大小上限
downloadTicketSeconds 30 下载链接有效时间

使用

  1. 启动 bicbot-web。
  2. 启动 DSH Web。
  3. 创建新会话,建议选择 DSH 的“极简模式”。
  4. 在模型列表中选择 BicBot 文本或视觉模型。
  5. 根据任务需要选择 Read Only、Workspace Write 或 Full Access。

权限模式会限制 BicBot 本轮可以使用的能力:Read Only 不允许写操作,Workspace Write 允许受控的工作区写入,Full Access 提供完整能力。BicBot 自己的权限规则仍可进一步收紧访问。

图片只能发送给声明了 inputModalities: ['text', 'image'] 的模型,BicBot 服务端对应的实际模型也必须支持图片。

toolPresentation: 'native' 使用 DSH 原生工具卡;compact 会把工具和文件显示为更紧凑的可展开项目。该选项只影响新产生的消息。

升级和回滚

升级到 npm 最新版本:

dsh plugin --profile web add @bic-ai/dsh-bicbot@latest

回滚到指定版本:

dsh plugin --profile web add @bic-ai/[email protected]

升级或回滚不会覆盖现有 cordis.patch.yml。操作后需要重启 DSH Web,并强制刷新浏览器。

卸载插件:

dsh plugin --profile web remove @bic-ai/dsh-bicbot

卸载后还应删除 cordis.patch.ymlid: bicbot 对应的配置条目。

常见问题

页面没有出现 BicBot

确认插件安装在启动 DSH Web 所使用的同一个 Profile 中,然后重启 DSH 并强制刷新浏览器。

cordis.patch.yml 为什么是空的

这是 DSH 的正常配置分层。插件默认配置不会复制到用户 patch 文件;只有用户自行设置的覆盖项才写在这里。使用 dsh --profile web --dump-config 查看最终生效配置。

启动时报 EADDRINUSE

DSH Web 使用的端口已被其它进程占用,通常是旧的 DSH 进程仍在运行。停止旧进程后重新启动。

图片无法发送

确认所选模型声明了图片输入能力,并确认 BicBot 服务端最终使用的模型支持图片。

文件下载失败

确认当前 DSH 会话工作区仍然存在、bicbot-web 可访问,并检查 maxDownloadBytes 限制。

安全建议

  • DSH 与 bicbot-web 跨主机部署时,应由可信网络、反向代理或 TLS 保护传输。
  • 为每个客户端分配独立 Bearer Token,便于轮换和撤销。
  • 不要把 Token、内部凭据或生产地址提交到公开仓库。
  • 按任务需要选择最低权限模式,并继续使用 BicBot 权限规则限制高风险工具。

License

MIT