Opr4Mp3r/deepseek-harness-plugin-from-scratch1

deepseek-harness-plugin-from-scratch

A code-audited, progressive guide to building production-grade DeepSeek Harness plugins.

AI 分析

核心用途是作为开发高质量 DSH 插件的教学与实践指南。适合想要学习如何从零构建、配置和调试生产级 DSH 插件的开发者。

パッケージ
deepseek-harness-plugin-from-scratch
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/08/13

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Opr4Mp3r/deepseek-harness-plugin-from-scratch

ドキュメント

README 全文を読む ↗

安装进 Harness profile

当前仓库尚未发布到 npm registry。先从 checkout 生成包含 lib/ 和组合层的 tarball,再安装:

pnpm pack
dsh plugin --profile tutorial add ./deepseek-harness-plugin-from-scratch-0.1.0.tgz
dsh --profile tutorial --dump-config

最后一条命令应出现 # == deepseek-harness-plugin-from-scratch 层和 id: greet-tool。包内的 dsh.bundle.patch 指向 cordis.patch.yml;该 patch 使用裸包名加载已构建入口。缺少这两项时,dsh plugin add 只会安装普通依赖,不会激活插件。

默认配置是 Hello, .。如需修改,在该 profile 的 cordis.patch.yml 中覆盖整行配置;patch 不会深度合并 config,因此两个字段都要重述:

- id: greet-tool
  config:
    greeting: '你好'
    excited: true

仓库用下面的独立检查执行完整安装路径:打包、dsh plugin add、配置层检查、启动 profile、调用 greet。默认使用固定的公开 CLI @deepseek-ai/dsh@0.1.0-rc.6,需要联网但不需要密钥:

pnpm check:profile

维护者审计上游新提交时,可把 DSH_HARNESS_ROOT 指向已安装依赖的 Harness checkout;同一脚本会改用该 checkout 的源码 CLI。也可以直接从 GitHub 安装,把占位符替换为已审计的完整 commit SHA:

dsh plugin --profile tutorial add 'github:Opr4Mp3r/deepseek-harness-plugin-from-scratch#FULL_COMMIT_SHA'

仓库为 GitHub dependency 提供自包含 prepare,但 pnpm 10 及以上会先拒绝执行并打印需要加入该 profile pnpm-workspace.yaml 的确切 allowBuilds 键。只对已审计并锁定到 commit 的源码授权,然后重新执行安装命令;希望避免安装时执行构建时,请使用上面的预构建 tarball。