dsh-web-search-ddg
aooyoo
Zero-token DuckDuckGo search provider for the DeepSeek Harness (DSH) web seam — local headless browser, no API key, no m…
PROJECT TOPICS
PROJECT README
一款由 AI 全程制作的 dsh(DeepSeek Harness)插件,为 Web 端 设置 → 插件 页面新增一个 插件市场 标签页。
本插件在 dsh 的 Web 设置中增加了一个「插件市场」标签页,用于浏览 GitHub 上带有 dsh-plugin 主题标签的插件仓库、就地阅读每个项目的 README,并支持将 README 交给当前会话的 AI 模型总结安装方法。对于 GitHub 访问困难的网络环境,内置了一个可开关、可自定义地址的镜像代理。
dsh-plugin 主题的仓库,每页 100 个;滚动到列表底部时自动继续加载后续页面,直至全部加载完成(受 GitHub 搜索结果 1000 条上限约束)。。api.sessions.prompt(mode "queue")发送给当前正在使用的 dsh 会话的模型,让对话中的模型直接总结该插件的安装方法,答案出现在当前对话里。预设提示词可在标签页内编辑(「编辑提示词」,持久化于 localStorage 键 dsh-plugin-marketplace.summarize-prompt),支持 {readme} 占位符(会被替换为 README 内容);按钮状态依次为 总结中… → 已发送给模型。dsh.bundle.patch(cordis.patch.yml),向组合后的 Web 配置树插入一条客户端名册记录(ui-plugin-marketplace → dsh-plugin-marketplace)。dsh.client(platform: web),浏览器模块宿主会在 /plugins/dsh-plugin-marketplace/client.js 提供 lib/client.js。settings.plugins.tab 槽位(id: marketplace),由既有的「插件」设置区渲染为标签页。api.github.com 与 raw.githubusercontent.com 都返回 Access-Control-Allow-Origin: *,因此无需宿主端代理或令牌。开启代理时,README 获取按「代理 → 直连 → API readme」的顺序回退。lib/index.js 为空操作)。connection 与 sessions,从 sessions.list.getSnapshot().current 解析当前会话 id,调用 api.sessions.prompt({ sessionId, mode: "queue", content: [{ type: "text", text }] })——与对话输入框同一条 RPC,总结以普通助手回复的形式出现在当前对话中。以下命令中的
web为 Web 配置文件(profile)名;配置文件目录为$DSH_HOME/profiles/web,$DSH_HOME默认为~/.dsh。安装完成后重启dsh web(或刷新已打开的 Web 页面),在 设置 → 插件 中即可看到「插件市场」标签页。
使用 dsh 自带的插件管理命令。该命令会在配置文件目录执行 pnpm add,并自动把带有 dsh.bundle 声明的依赖加入 dsh.profile.bundles 层列表,一次完成:
# ① 从本地路径安装(已克隆/解压好源码)
dsh plugin --profile web add /path/to/dsh-plugin-marketplace
# ② 直接从 GitHub 安装(首次使用会自动初始化配置文件)
dsh plugin --profile web add git+https://github.com/shixiaosia/dsh-plugin-marketplace.git
不依赖 dsh plugin 命令,手工放置插件并编辑配置文件:
# 1. 获取插件代码(克隆或下载 zip 解压均可)
git clone https://github.com/YOUR-GITHUB-USERNAME/dsh-plugin-marketplace ~/dsh-plugin-marketplace
# 2. 编辑配置文件 ~/.dsh/profiles/web/package.json,改动两处:
{
"dependencies": {
// 新增:指向插件代码所在位置(link: 本地路径)
"dsh-plugin-marketplace": "link:~/dsh-plugin-marketplace"
},
"dsh": {
"profile": {
"bundles": [
"@deepseek-ai/dsh-base",
"@deepseek-ai/dsh-web-app",
// 新增:追加到层列表末尾
"dsh-plugin-marketplace"
]
}
}
}
# 3. 在配置文件目录安装依赖(写入 node_modules 并建立链接)
cd ~/.dsh/profiles/web && pnpm install
# 4. 重启 Web 应用
dsh web
提示:手动安装时也可直接把插件目录复制进
~/.dsh/profiles/web/node_modules/dsh-plugin-marketplace/,但 pnpm 重新安装时可能清理该目录,因此更稳妥的做法是上面的link:方案。
dsh plugin --profile web remove dsh-plugin-marketplace
该命令会执行 pnpm remove,并自动把该依赖从 dsh.profile.bundles 层列表中移除。随后重启 dsh web 即可。
# 1. 编辑 ~/.dsh/profiles/web/package.json,删除两处:
# · dependencies 中的 "dsh-plugin-marketplace" 条目
# · dsh.profile.bundles 数组中的 "dsh-plugin-marketplace"
# 2. 在配置文件目录同步依赖
cd ~/.dsh/profiles/web && pnpm install
# 3. 重启 Web 应用
dsh web
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。