前言¶
在 DeepSeek Harness(DSH)里接入 DolphinDB,通常需要同时处理三件事:DolphinDB executor、模型可见的 query/write tools,以及 DolphinDB skills。tradercjz/dsh-dolphindb 把这三部分打成一个 installable profile bundle,安装到 profile 后即可统一挂载。
这是什么¶
tradercjz/dsh-dolphindb 是 DolphinDB integration for DeepSeek Harness,定位是 installable profile bundle。它由 tradercjz 维护,许可证为 MIT。
包信息中可见:
- Node engines:
^22.19.0 || >=24.0.0 pnpm@11.7.0- dependencies:
dolphindb ^3.1.54、yaml ^2.4.2
这个 bundle 挂载三部分:
dolphindbexecutortool-dolphindbtoolsdolphin-skills
核心功能¶
dolphindb_query:只读 DolphinDB scripts/SQL。可返回 result tables、vectors、matrices、scalars,并支持 optional chart。dolphindb_execute:write/mutation scripts。该能力 gated behind the approval seam,并提供 code preview。- 23 个 bundled DolphinDB skills:以
SKILL.mdtrees 形式提供,并通过skill工具暴露。 - installable profile bundle:安装后挂载
dolphindbexecutor、tool-dolphindbtools 和dolphin-skills。
安装与启用¶
安装到 profile¶
先执行 DSH 插件安装命令:
dsh plugin --profile <name> add github:tradercjz/dsh-dolphindb
这条命令会把 github:tradercjz/dsh-dolphindb 安装到指定 <name> profile。
授权 build scripts¶
dsh plugin add github:… 安装的是 source。首次安装可能会失败,直到 profile 的 pnpm-workspace.yaml 通过 allowBuilds 授权 build scripts。
优先使用 dsh 报错中打印的 exact commit-pinned allowBuilds key,而不是宽松形式。类似如下:
allowBuilds:
"@tradercjz/dsh-dolphindb@https://codeload.github.com/tradercjz/dsh-dolphindb/tar.gz/<commit-sha>": true
上面的 <commit-sha> 是占位,实际使用 dsh 输出的 commit-pinned key。
也可以在 profile 的 dsh.profile.bundles list 中,把 @tradercjz/dsh-dolphindb 加在 @deepseek-ai/dsh-base 之后:
dsh.profile.bundles:
- @deepseek-ai/dsh-base
- @tradercjz/dsh-dolphindb
配置 executor¶
executor 的唯一必填字段是 passwordRef,默认值为 DOLPHINDB_PASSWORD。host、port、username 默认是 127.0.0.1:8848 / admin。
如果要连接远程 DolphinDB,在 profile 的 cordis.patch.yml 中覆盖这些字段:
- id: dolphindb
config:
host: <host>
port: <port>
username: <username>
passwordRef: DOLPHINDB_PASSWORD
密码应放在 process environment 或仓库 .env 中,不要提交到仓库。
验证 profile 层¶
安装和配置完成后,用下面命令查看 profile 配置:
dsh --profile <name> --dump-config
输出中应能看到 @tradercjz/dsh-dolphindb layer 挂载了 dolphindb executor、tool-dolphindb tools 和 dolphin-skills。启动该 profile 后,会注册 dolphindb_query 和 dolphindb_execute,并通过 skill 工具暴露 23 个 bundled DolphinDB skills。
典型用法¶
- 只读查询:使用
dolphindb_query执行只读 DolphinDB scripts/SQL,适合查看 result tables、vectors、matrices、scalars,或在需要时使用 optional chart。 - 写入或变更:使用
dolphindb_execute执行 write/mutation scripts。该路径受 approval seam 约束,并提供 code preview。 - 技能调用:通过
skill工具访问 23 个 bundled DolphinDB skills(SKILL.mdtrees)。
开发验证¶
在仓库内做本地校验和构建时,可以使用:
pnpm install
pnpm run typecheck
pnpm run build
这三条命令分别用于安装依赖、type-check 和 build。
技能来源¶
bundled skills vendored from dolphindb/DolphinX_Skill。其中一个 source SKILL.md 里存在未加引号的 description,vendored copy 中已加上引号。
适用场景与注意¶
适合 DSH profile 需要接入 DolphinDB 的开发者,尤其是希望同时获得 executor、query/write tools 和 DolphinDB skills 的场景。
使用注意:
- 插件以当前 DSH 进程权限运行。安装前检查源码,并确认 MIT 许可证可接受。
dolphindb_execute涉及 write/mutation scripts。虽然有 approval seam 和 code preview,也应控制数据库账号权限。passwordRef对应的密码放在 process environment 或.env,不要提交到仓库。- 如果首次安装因 build scripts 未授权而失败,请在
pnpm-workspace.yaml的allowBuilds中使用dsh输出的 exact commit-pinned key。
结尾¶
tradercjz/dsh-dolphindb 的价值是把 DolphinDB executor、query/write tools 和 23 个 bundled DolphinDB skills 打包成一个 DSH profile bundle,便于在 profile 中统一挂载和验证。
- GitHub:https://github.com/tradercjz/dsh-dolphindb
- 社区目录:本次已核实材料未提供具体 URL,未列出不确定的链接。