dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
DeepSeek Harness 的 AI 与技术快讯看板。0.2.1+ 版本改为官方同款的左侧边栏入口 + 独立页面:不再有右上角浮窗,也不再占用「设置」页;所有内容在 快讯看板 页面内完成浏览、搜索、来源切换、翻译与设置。
当前发布:v2.0.0(DSH 0.2.1+,Web + Desktop)。
v1.2.0是旧的浮窗 + Settings 页面版本,不兼容 0.2.1;从 0.1.x 升级请直接安装v2.0.0。
sidebar.panellist)+ 独立主页面(main key newsboard)。页面为固定页头 / Tab 行 / 页脚,仅中间内容滚动。🌐 Web / 🖥 桌面端 标识,macOS 额外预留 --dsh-frame-top-clearance 顶部安全区。所有接口走带认证的 /api/dsh-plugin-newsboard/... Connection 路由。AI / 科技 / 游戏 / 生活 四个分类,每个分类由「名称 + N 个关键词」组成,可在设置中新增/删除/改名并编辑关键词;Tab 顺序跟随分类顺序。全部 始终显示所有已抓取消息,不会因为关键词不匹配而丢消息。secretSet 告知是否已配置;留空保存表示保持原值。预设分类与默认来源:
| 分类 | 默认来源 |
|---|---|
| AI | HN AI 检索、OpenAI News、Google AI Blog、TechCrunch AI、The Verge AI、arXiv cs.AI、MIT 科技评论 |
| 科技 | Hacker News 首页、Lobsters、Ars Technica、IT之家、Solidot |
| 游戏 | 机核、游研社、GamesIndustry.biz、Rock Paper Shotgun |
| 生活 | 少数派、理想生活实验室、Atlas Obscura |
另外可选 5 个渠道:雷锋网(AI/产业)、36氪(科技商业)、爱范儿(消费电子/数字生活)、Indie Games Plus(独立游戏)、PC Gamer(PC 游戏)。每个渠道在设置页都有中英双语的内容倾向说明。
四个预设分类都自带一组初始关键词和默认勾选的来源渠道;关键词与渠道都可随时改写、清空或增删。关键词留空表示该分类接收其来源的全部消息。
目标运行时:DeepSeek Harness 0.2.1+(Desktop 0.2.1-rc.2 与更新版本、Web 0.2.1+)。本包声明了 dsh.bundle,推荐按 bundle 安装。
# Web
dsh plugin --profile web add "github:c-ling/dsh-plugin-newsboard#v2.0.0"
# 或
npx @deepseek-ai/dsh plugin --profile web add "github:c-ling/dsh-plugin-newsboard#v2.0.0"
# Desktop(退出 App 后使用自带 CLI,或在 Plugins 页面安装该 tag)
dsh plugin --profile desktop add "github:c-ling/dsh-plugin-newsboard#v2.0.0"
dsh plugin add 会把包写入 dsh.profile.bundles,包内 cordis.patch.yml 负责插入 loader 行;不要同时手写同一条 loader 行。Desktop profile 由 App 管理,npx @deepseek-ai/dsh ... --profile desktop 会被拒绝,请使用 App 自带 CLI 或 Plugins 页面。
cd ~/.dsh/profiles/web
corepack pnpm add "github:c-ling/dsh-plugin-newsboard#v2.0.0"
然后在 ~/.dsh/profiles/web/cordis.patch.yml 增加:
- insert:
- id: dsh-plugin-newsboard
name: 'dsh-plugin-newsboard'
bundle 与手动 loader 行不要同时使用,否则会重复激活。安装/更新后必须重启宿主(Web 重启
dsh web,Desktop 退出并重新打开 App),再硬刷新页面;client-modules按进程缓存包裁决。
本地开发验证可用 link: 安装(不会走 GitHub tag):
cd ~/.dsh/profiles/web
corepack pnpm add "link:/absolute/path/to/dsh-plugin-newsboard"
# 然后在 profile 的 cordis.patch.yml 增加本插件的 insert 行;或使用 dsh plugin add "link:..."
$DSH_HOME/storages/dsh-plugin-newsboard/config.json(可用 entry config directory 覆盖目录)。feed-cache.json;日志:logs.json。config.json.migrated 会在首次启动时一次性导入为新的 config.json,备份保留。settings.yaml 命名空间不再使用;如果旧配置只在 settings 文档里,请在新页面重新填写(历史 config.json.migrated 仍可恢复大部分字段)。所有接口都需要浏览器认证,路径包含 /api:
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /api/dsh-plugin-newsboard/config | 脱敏配置 + secretSet + revision + 来源元数据 |
| POST | /api/dsh-plugin-newsboard/config | 部分 patch + expectedRevision revision fence;409 STALE_CONFIG |
| GET | /api/dsh-plugin-newsboard/feed | 当前可见消息;缓存过期时后台刷新 |
| POST | /api/dsh-plugin-newsboard/refresh | 立即刷新 |
| GET | /api/dsh-plugin-newsboard/logs/translation | 翻译调用日志 |
| GET | /api/dsh-plugin-newsboard/logs/fetch | 来源抓取日志 |
配置字段:refreshMinutes、maxItems、maxAgeHours、blockwords、categories、translate、translationProvider、translationBaiduMode、translationAppId、translationSecretKey、translationApiKey。其中 categories 是 { id, name, keywords, sources } 数组;旧配置的 keywords / sources 顶层字段会在首次启动时自动迁移为分类关键词与分类来源。POST 未知顶层字段返回 400 UNKNOWN_CONFIG_KEY——客户端热更新但 Host 仍是旧进程时会看到这个错误,需要重启宿主。
node --check lib/index.js lib/client.js lib/config.js lib/store.js lib/connection-routes.js
node --test
python3 -m json.tool package.json
git diff --check
源码结构:
lib/index.js:宿主插件入口——来源抓取、解析、去重过滤、翻译、缓存与 ctx.connection.fetch.register 路由。lib/config.js:默认值、归一化、secret 脱敏、部分 patch 白名单。lib/store.js:config.json 原子写入、revision fence、旧配置导入。lib/connection-routes.js:0.2.1 Fetch 路由表与错误信封(依赖无关,可直接用 Request 测试)。lib/client.js:手写 factory-CJS bundle,无构建步骤;inject: ["slots", "locale", "layout"],注册 sidebar.panellist 与 keyed main。验证要点:
# 未认证访问只到认证门(401),不能证明路由存在
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:<port>/api/dsh-plugin-newsboard/config
# 旧匿名路由应 404
curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:<port>/dsh-plugin-newsboard/config
静态 UI 核对:node tools/render-ui-harness.mjs /tmp/newsboard-ui 生成与 lib/client.js 同源的 HTML,可用浏览器在浅色/深色与 1440px/1024px 下检查布局。
真正的路由存在性由 test/connection-routes.test.mjs / test/host.test.mjs 断言 registry key 为 /api/...;页面是否生效请在带认证的 GUI 中检查侧边栏入口与页面。
dsh-plugin-notify 使用。