DeepSeek Harness plugin

dsh-plugin-console

Browse and manage the community plugin catalog from a first-level DeepSeek Harness Settings page, with verified installs and updates, removal, pause and resume, installed-package state, and sanitized README previews.

Jump to install

Source facts

Repository
AlexYin-Tongji/dsh-plugin-console
Latest update
Aug 19, 2026
Category
Plugin Markets & Managers
GitHub stars
0

Install

Start with a prompt that asks an agent to read the source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to read the page and repository first.

Do not install anything yet. Read this DeepSeek Harness plugin and explain what it does, which files, networks, or credentials it can access, and how to install and remove it.

Plugin page: https://deepseekplugins.org/plugins/AlexYin-Tongji/dsh-plugin-console
GitHub: https://github.com/AlexYin-Tongji/dsh-plugin-console
Plugin: dsh-plugin-console
Author: AlexYin-Tongji
Install command: dsh plugin --profile web add dsh-plugin-console

Do not run the install command until I confirm.

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

DSH Plugin Console

![CI](https://github.com/AlexYin-Tongji/dsh-plugin-console/actions/workflows/ci.yml) ![npm](https://www.npmjs.com/package/dsh-plugin-console) ![license](LICENSE)

dsh-plugin-console 是一个可安装到 DeepSeek Harness Web profile 的插件管理器:它把社区目录、当前 profile 的包清单和 Loader 运行态放在 Settings 的一级“插件管理”页面里,并通过官方 dsh plugin 命令完成安装、更新和删除。

已实现

  • 插件商店:默认同步 awesome-dsh-plugin,支持搜索、分类、分页和本地 last-known-good 缓存。
  • 安装前验证:npm 包检查合法 SemVer、repository、HTTPS tarball、SHA-512 integrity、dsh.bundle.patch 和生命周期脚本;GitHub 包固定到 40 位 commit,并确认 package.json 与声明的 patch 文件存在。
  • 已安装清单:读取当前 profile 的 direct dependencies、bundle 顺序、解析后的 package manifest、Loader entry/Fiber phase 和 Web client 能力。
  • 使用说明:读取 Markdown、MDX、RST、TXT 和无扩展名 README;Markdown 使用 README 专用的 GFM + 安全 HTML renderer,支持常见段落、链接、徽章和相对图片,所有文档都可切换到保留原文的源码视图。
  • 快捷更新:社区目录中的包按已验证 artifact 更新;目录外 npm 包只有在同名、同 repository、合法升级版本和 integrity 都成立时才可更新,并在确认页单独警告。
  • 快捷删除:只允许删除 direct dependency,系统 bundle 受保护;删除包不会擅自删除包创建的数据。
  • 暂停使用:保留已安装依赖,通过 profile 的结构化 Loader patch 持久化 disabled 状态;可随时恢复,管理器自身不会允许自暂停。
  • 变更确认:所有写操作先生成 5 分钟有效的 plan;执行前重新校验 profile 指纹、当前包状态和 artifact integrity,同一时间只允许一个变更。元数据实际变化后才清理 profile node_modules 并按恢复后的 lockfile 做 frozen reinstall,供应链策略在命令开始前拒绝时不会破坏现有依赖。
  • 重启提示:变更由 pnpm/profile manifest 持久化,当前 Loader 不会被伪装成已更新,页面会明确显示重启后生效。

安装

在 DSH 安装所在环境运行:

# npm 发布版
dsh plugin --profile web add dsh-plugin-console

# 本地源码检出目录
dsh plugin --profile web add .

验证 bundle 层:

dsh --profile web --dump-config

安装或更新插件后需要重启 dsh web,因为 Web client module roster 在进程启动时扫描 profile 包。

配置

bundle 默认配置位于 cordis.patch.yml。可在 profile 的 cordis.patch.yml 中覆盖完整行配置,注意 DSH patch 对 config 是整段替换:

- id: plugin-console
  config:
    catalogUrl: https://awesome-dsh-plugin.com/plugins.json
    cacheMaxAgeMs: 172800000
    requestTimeoutMs: 15000
    maxCatalogBytes: 5000000
    maxReadmeBytes: 262144
    operationTimeoutMs: 300000
    dshBin: dsh

也支持环境变量:

  • DSH_PLUGIN_CONSOLE_CATALOG_URL
  • DSH_PLUGIN_CONSOLE_DSH_BIN

目录缓存写入 $DSH_HOME/cache/plugin-console/catalog.json。上游不可用时保留最后一次有效目录,不会用空响应覆盖缓存。catalogUrl 必须是绝对 HTTPS URL。dshBin / DSH_PLUGIN_CONSOLE_DSH_BIN 是管理员级配置,会被作为本机可执行文件启动,不应接受不可信输入。

安全边界

DSH 插件是 Host 进程中的受信任代码,不是隔离的浏览器扩展。这个管理器遵循以下边界:

1. 社区 feed 只用于发现,不执行 feed 中的 install 字符串。 2. 浏览器 API 只有 typed installupdateremovepauseresume,没有任意 pnpm argv 或 shell 接口。 3. 子进程使用参数数组和 shell: false 调用 dsh plugin。 4. 安装、更新固定传 --ignore-scripts;需要构建脚本的包不会被静默放行。 5. GitHub 来源必须固定到 commit;npm 来源使用精确版本,并在安装后核对 lockfile integrity。 6. pnpm 成功后还会运行 dsh --profile <name> --dump-config;版本、bundle、integrity 或 composition 任一不匹配都视为失败并进入恢复。 7. API 仅接受同源 POST;变更请求还必须来自 loopback。profile 路径从 Loader baseUrl 推导并限制在 $DSH_HOME/profiles 下。 8. README 使用独立的不可信内容 renderer;raw HTML 只允许安全标签和协议,事件属性、脚本、iframe、危险 URL 会被清理,非 Markdown 和源码模式只展示纯文本。 9. 删除只改变 package-manager/profile 状态,不清理未知的插件数据目录。

“已验证”只表示 manifest 和 artifact 结构符合 DSH 安装约定,不表示作者或代码经过安全背书。

开发

要求 Node.js 22.19+ 或 24+、pnpm 10+。Host/Client peer contract 固定到已验证的 DSH 0.1.0-rc.6

pnpm install
pnpm run typecheck
pnpm run test
pnpm run build

如果本机 pnpm 因 approve-builds 阻止开发依赖的安装脚本,可以直接运行已安装的工具:

node node_modules/typescript/bin/tsc --noEmit
node node_modules/vitest/vitest.mjs run
node node_modules/tsdown/dist/run.mjs -c tsdown.config.ts

包结构:

src/catalog.ts                         社区 feed、缓存、npm/GitHub 验证
src/profile.ts                         profile manifest、包清单、Loader 运行态
src/operations.ts                      plan、串行 dsh CLI 变更、失败恢复
src/index.ts                           Host API /api/plugin-console
src/client/index.ts                    Web Settings slot 注册
src/client/PluginManageSettingsTab.tsx 商店、已安装、详情和确认 UI
src/client/*.module.css                主题变量和响应式布局
tests/                                 目录、profile、事务、client runtime 与构建契约测试

贡献、安全与发布说明:

  • [CONTRIBUTING.md](CONTRIBUTING.md)
  • [SECURITY.md](SECURITY.md)
  • [CHANGELOG.md](CHANGELOG.md)
  • [docs/RELEASING.md](docs/RELEASING.md)

DSH 插件开发原则

这个包遵循 DSH 官方的 Cordis 方式:插件通过 apply(ctx) 注册能力,依赖通过 inject 声明,外部资源通过 ctx.effect() 回收;持久化 profile 由 dsh plugin / pnpm 负责,Loader 只负责当前进程生命周期。

官方参考:

参考与致谢

本项目的主体业务实现为独立编写,但使用或改写了以下 MIT 项目的接口与实现模式:

  • DeepSeek Harness:bundle/profile、Cordis 生命周期、Loader/Fiber 投影、Web client module 与 Settings slot 契约。
  • DSH Plugin Marketplace:双端外部 bundle、同源私有 API、短时 review plan / recovery 架构,以及 tsdown.config.ts 的 client envelope 与 CSS-module bundler。构建配置是直接改写,不只是产品灵感。

以下项目仅作为产品和交互行为参考,没有直接并入其源码:

完整版权、revision 和 MIT notice 见 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。

关于 AI 摘要

目录同步和 artifact 验证使用结构化 metadata,不把 AI 输出当成安装依据。后续可以增加一个只读的 AI 摘要层,用于从已验证 README 生成“能做什么 / 怎么用 / 注意事项”,但摘要必须标注为模型生成,安装目标、版本和风险仍以 Host 的 manifest 验证为准。

License

MIT