# dsh-plugins **Repository Path**: chen-16/dsh-plugins ## Basic Information - **Project Name**: dsh-plugins - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-11-12 - **Last Updated**: 2026-11-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 陈十六的 DSH 插件市场 三个 DeepSeek Harness 组合包(bundle)的代码仓库,同时托管一份 **插件市场索引**(`index.json`,格式 1)。 | 包 | 作用 | | --- | --- | | [`@chenshiliu/dsh-documents`](packages/dsh-documents) | 左侧栏列出对话产出的文档,一键预览 | | [`@chenshiliu/dsh-quote`](packages/dsh-quote) | 划词把选中的对话内容引用到新会话 | | [`@chenshiliu/dsh-feishu`](packages/dsh-feishu) | 通过飞书机器人的长连接与 DSH 对话 | ## 安装 不需要市场也能直接装(把 `<包>` 和 `packages/<目录>` 换成你要的那个): ```sh dsh plugin add "git+https://gitee.com/chen-16/dsh-plugins.git#<40位commit>&path:/packages/<目录>" ``` 或者把它加进 DSH 的市场索引源,在**插件 → 发现**里点安装。 **索引地址(索引源填这个):** ``` https://dsh-market-chen16.netlify.app/index.json ``` ### 装飞书插件要多一步 `@chenshiliu/dsh-feishu` 依赖 `@larksuiteoapi/node-sdk`,后者间接依赖 `protobufjs`(带 postinstall 脚本)。pnpm 11 默认不跑依赖的构建脚本,安装会以 `ERR_PNPM_IGNORED_BUILDS` 退出 1。在 profile 的 `pnpm-workspace.yaml` 里加上: ```yaml allowBuilds: protobufjs: true ``` 再安装即可(实测 5.1 秒完成、退出码 0)。`dsh-documents` 和 `dsh-quote` 没有依赖,不受影响。 ## 仓库结构 ``` packages/ 三个包(每个都是独立可安装的 bundle) <包名>/package.json 声明 dsh.bundle 与 dsh.client <包名>/cordis.patch.yml 安装时叠加的配置层 icons/ 市场卡片图标 index.json 市场索引(每个版本钉一个 40 位 commit) market.json 公开配置:仓库地址、分支、三个包的元数据与图标 build-index.mjs 按当前 commit 生成 index.json validate-index.mjs 用 DSH 自己的 parseMarketIndex 校验 index.json sync.ps1 把本地在役插件同步进 packages/ 并脱敏 ``` `market.local.json` 只在作者本机存在(已 gitignore),存放本地源码目录与脱敏规则;没有它 `sync.ps1` 会明确报错。 ## 更新流程(作者) ```powershell # 1. 同步本地插件源码到 packages/,同时把本地路径、个人目录等替换成通用写法 powershell -NoProfile -File .\sync.ps1 # 2. 提交代码(这个 commit 就是插件的版本来源) git add -A git commit -m "feat: 更新 dsh-quote 划词逻辑" # 3. 重新生成索引、校验、并刷新待上传的 site/ powershell -NoProfile -File .\stage-site.ps1 # 4. 提交并推送;然后把 site/ 重新拖到 https://app.netlify.com/drop git add -A git commit -m "market: 指向新版本" git push ``` 改版本号改 `packages/<包>/package.json` 的 `version`。索引里每个版本都钉死 40 位 commit,老版本永远可复现。 ## 注意事项 - **`engines.dsh` 要带预发布号**:`semver.satisfies('0.2.1-rc.5', '>=0.2.0')` 是 `false`(预发布版本不满足不含预发布号的区间),写成 `>=0.2.0` 会让插件被市场判成「不兼容」。这里统一用 `>=0.2.1-rc.5`。 - **索引必须 200 直出、不能有重定向**:DSH 抓索引用的是 `redirect: "error"`。Gitee 的 `raw` 链接会 302 到 `raw.giteeusercontent.com`,所以索引要放在能直出的静态托管上。 - **git 安装不跑 build**:这三个包是纯 JS,所以没事;若以后引入 TypeScript,必须提供自包含的 `prepare` 脚本,否则用户装到的是未构建的源码。 - **索引里 `source.url` 必须是 https 仓库地址**(不能是 tarball),`commit` 是 40 位小写 SHA,`path` 用 `packages/<包>` 这种相对目录。