前言¶
在 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,未列出不確定的鏈接。