Repository navigation
Install zh CN
English | 简体中文
本页介绍如何从 npm 把 dsh-chatgpt-siwc 安装到 DeepSeek Harness 的 profile 中,这是常规路线。从克隆的源码构建放在最后,仅适用于从源码运行 DSH、或需要测试本地修改的人。
本节列出必须提前就绪的条件,避免安装半途失败。
| 要求 | 取值 | 声明位置 |
|---|---|---|
| Node.js | ^22.19.0 || >=24.0.0 |
package.json 中的 engines.node
|
| DeepSeek Harness | >=0.2.2-rc.1 <0.3.0 |
package.json 中的 engines.dsh 以及 @deepseek-ai/* 对等依赖范围 |
PATH 中有 pnpm |
dsh plugin 需要 |
DSH 把 dsh plugin 转交给 pnpm 执行 |
| 网络 |
auth.openai.com(发现、令牌、JWKS、撤销)和 api.openai.com(模型、Responses) |
登录与模型调用 |
| 浏览器 | 与 DSH 在同一台机器上 | 登录回调监听在 127.0.0.1
|
如果 dsh plugin 报 spawn pnpm ENOENT,先启用 pnpm:
corepack enable pnpm本节是大多数人需要的安装方式:把已发布的包加到你使用的 DSH profile 里。
包名是公共 npm 注册表上的 dsh-chatgpt-siwc。它自带构建好的 lib/,并把私有引擎 siwc-core 打进 tarball,所以不需要在你的机器上编译任何东西。这也是安装后的包里自带 node_modules/siwc-core 的原因:siwc-core 不会单独发布到 npm。实时探针脚本不在包内。
从 DSH Web 客户端安装。 打开侧边栏的 Plugins,选择 Add plugin,输入包名 dsh-chatgpt-siwc,让 DSH 执行安装。按 DSH 的提示重启 profile,然后打开插件卡片,点击 使用 ChatGPT 登录。
从终端安装。 dsh plugin --profile <name> 会在该 profile 的目录里把参数转交给 pnpm,因此这就是把 npm 包安装进 profile。--profile 必须写在 add 之前:
dsh plugin --profile web add dsh-chatgpt-siwc # 从 npm 安装到 web profile
dsh plugin --profile web why dsh-chatgpt-siwc # 查看解析到的版本和链接方式DSH 会读取包里的 dsh.bundle.patch 声明,把插件加入 profile 的 bundle 列表。正在运行的 profile 会保持启动时的 bundle 集合,所以安装、更新或移除插件之后都要重启:
dsh web要固定版本,直接写出版本号:dsh plugin --profile web add dsh-chatgpt-siwc@2.3.0。以后更新:dsh plugin --profile web update dsh-chatgpt-siwc,然后重启。
直接用 npm。 npm install dsh-chatgpt-siwc 会把同一个包(包括 dsh-chatgpt-siwc 命令)安装到你执行命令的项目里。DSH 只从 profile 加载插件,所以插件本身请走上面的 DSH 路线;直接用 npm 适合只想单独使用命令行工具的情况。
本节在登录之前确认 DSH 加载的正是你刚装的构建。
-
确认合成后的配置里有这条提供方配置行:
dsh web --dump-config
找到
id: dsh-chatgpt-siwc、provider: siwc-dsh-core的一行。它来自包里的cordis.patch.yml:- insert: - id: dsh-chatgpt-siwc name: dsh-chatgpt-siwc config: provider: siwc-dsh-core agentNameHint: DSH SIWC
-
查看启动日志。插件加载时会输出一行,写明版本、加载目录和将要使用的账户文件:
dsh-chatgpt-siwc <version> loaded from <path>; accounts file <path>。 -
在 profile 目录(默认
~/.dsh/profiles/web,或$DSH_HOME/profiles/web)运行不含令牌的诊断:cd ~/.dsh/profiles/web npx dsh-chatgpt-siwc doctor
loaded.version应为2.3.0,loaded.root应指向这个 profile 内部。如果版本或路径与你安装的不一致,说明 Node 模块路径上其他位置的旧副本遮蔽了它,见故障排查。
下一步:登录与账户。
本节干净地撤销安装。
dsh plugin --profile web remove dsh-chatgpt-siwc移除包会同时移除 bundle 层;之后重启 profile。账户文件不属于这个包,会保留在原处。如果还想在 OpenAI 端断开连接并删除本地记录,请在移除插件之前运行 dsh-chatgpt-siwc logout --purge(见 CLI 与 doctor)。
本节只适用于从源码运行 DeepSeek Harness、或需要测试未发布修改的人。其他人请从 npm 安装。
仓库是包含两个包的 npm workspace:根目录是插件,packages/siwc-core 是私有引擎。先构建并测试,再打包成 tarball。请安装 tarball,而不是源码目录:tarball 通过 bundleDependencies 把 siwc-core 带在 node_modules/siwc-core 下,源码目录不会。
git clone https://github.com/calisweetleaf/dsh-siwc-native.git
cd dsh-siwc-native
npm ci
npm run typecheck
npm test # 先构建 core、插件和客户端 bundle,再运行 vitest
npm pack # 生成 dsh-chatgpt-siwc-<version>.tgz然后把 tarball 加到你的 profile。使用已安装的 dsh:
dsh plugin --profile web add ./dsh-chatgpt-siwc-2.3.0.tgz如果 DSH 是从它自己的源码仓库运行的,同样的命令通过它的 pnpm dsh 脚本执行(DSH 会以你执行命令的目录解析相对路径):
pnpm dsh plugin --profile web add /path/to/dsh-chatgpt-siwc-2.3.0.tgznpm pack --dry-run 会列出将被打包的内容,其中应包含 node_modules/siwc-core 和 lib/discover.js,且不包含任何探针文件。重启 profile,再按上文运行 doctor,确认加载的是本地构建。
dsh-chatgpt-siwc
English
- Home
- Install
- Sign-in and accounts
- Configuration
- Models and catalog
- Prompt cache
- Route and compliance
- Architecture
- CLI and doctor
- Troubleshooting
- FAQ
- Changelog
- Contributing
简体中文