DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-daily-digest

J

dsh-daily-digest

Discovered

Daily tech digest agent demo for DeepSeek Harness (dsh): one Cordis plugin (fetch_feed + save_digest), one patch overlay, one AGENTS.md — RSS → Chinese markdown digest, headless & cron-ready. Chinese READM

dsh-daily-digest

用 DeepSeek Harness 插件体系手搓「每日科技摘要」Agent:5 个 RSS 源 → 归类去重点评 → 一份中文 Markdown 摘要

License: MIT Node.js DeepSeek Harness Third-party dependencies

English: A minimal but complete DeepSeek Harness (dsh) demo outside the coding/finance niche: a custom Cordis plugin with two model-visible tools, an AGENTS.md instruction pipeline, and a one-command headless run that turns five RSS feeds into a Chinese markdown digest. Full English version: README.en.md.

Keywords: DeepSeek Harness demo, dsh plugin example, Cordis plugin tutorial, agent harness custom tools, dsh headless mode, RSS AI digest agent, DeepSeek agent framework, LangGraph alternative demo, AI agent RSS summarizer, dsh AGENTS.md instructions.

demo

这是什么

一个非编码场景的 DeepSeek Harness 实操 demo:每天早上(或任何时候)一条命令,让 agent 自动抓取 5 个中外科技 RSS 源,按主题归类、去重、写点评,产出一份中文 Markdown 摘要存到 digests/。

它被刻意做到极小——一个 200 行的 TypeScript 插件 + 一个 YAML overlay + 一份 AGENTS.md——但完整展示了 dsh 区别于普通「写 prompt 调 API」的四块基石:

dsh 机制在本 demo 里体现为
一切皆插件(Cordis effect)plugins/digest-tools.ts 注册 fetch_feed / save_digest 两个模型可见工具,卸载自动注销
配置即组合(patch overlay)overlays/digest.cordis.yml 把本地插件 + 官方 time-context/schedule 叠加到出厂 profile 上,不改一行 dsh 源码
指令链注入(dsh-agent-instructions)AGENTS.md 定义摘要流水线,agent 开工时自动注入 durable history
无人值守运行(headless profile)dsh --profile headless "生成今日科技摘要" 一把跑完即退出,可直接进 cron

配套深度教程:DeepSeek Harness 保姆级理解教程(架构、事件溯源、能力接缝、与 LangGraph / Claude Agent SDK / Google ADK 的对比)。

五分钟跑起来

前置:Node.js ^22.19 或 >=24;已跑一次 npx @deepseek-ai/dsh web 让它装好运行时(~/.dsh/profiles/node_modules 存在即可)。

git clone https://github.com/JingHao-Leon/dsh-daily-digest.git
cd dsh-daily-digest
./scripts/install.sh        # 生成绝对路径 overlay + 软链 dsh 共享 node_modules

# 方式一:headless 一把梭(适合 cron / CI)
npx @deepseek-ai/dsh --profile headless \
  --patch overlays/digest.cordis.yml "生成今日科技摘要"

# 方式二:Web UI 里边看边聊(http://127.0.0.1:3080)
npx @deepseek-ai/dsh web --patch overlays/digest.cordis.yml

跑完看 digests/YYYY-MM-DD.md。

模型默认走 DeepSeek 官方 provider(~/.dsh/settings.yaml 里的 agent-default-model)。没有配置的话先按 dsh 引导配好 key。

它是怎么工作的

用户一句话 ──▶ dsh headless profile
                  │
                  ├─ AGENTS.md 指令注入(项目根 → cwd 逐级发现)
                  │     「读 feeds.txt → fetch_feed ×5 → 归类 → save_digest → 汇报」
                  │
                  ├─ patch overlay 挂载 3 个插件
                  │     digest-tools.ts ─┬─ fetch_feed(url, limit)   抓取+解析 RSS/Atom
                  │                      └─ save_digest(name, md)     写 digests/*.md
                  │     dsh-time-context / dsh-schedule(可选:会话内定时提醒)
                  │
                  └─ agent loop:模型按指令链自主编排工具调用 ──▶ digests/2026-08-15.md

关键点:插件只是一个 .ts 文件。不需要发包、不需要构建、不需要改 dsh 源码——overlay 里写绝对路径就挂载了。fetch_feed 里连 RSS 解析都是 30 行正则手写的,整个 demo 零第三方依赖。

插件长什么样(核心 30 行)

export const name = 'digest-tools'
export const inject = ['tools']            // 等 tools 服务就绪后激活

export function apply(ctx: Context) {
  ctx.tools.register(defineTool({          // 注册即 effect:卸载自动注销
    name: 'fetch_feed',
    description: 'Fetch an RSS 2.0 or Atom feed ...',
    parameters: { url: { type: 'string', required: true, ... }, ... },
    output: { schema: { type: 'string' },
              render: (_args, v) => [{ type: 'text', text: v }] },
    async execute(args, exec) {
      const res = await fetch(args.url, { signal: exec.signal })  // 尊重取消链
      return JSON.stringify(parseFeed(await res.text(), limit))
    },
  }))
}

完整代码(含 save_digest 和解析器)在 plugins/digest-tools.ts。

进阶玩法

  • 每天自动跑:把方式一的命令挂进 crontab,例如 7 9 * * * cd ~/dsh-daily-digest && node ~/.dsh/profiles/node_modules/@deepseek-ai/dsh/lib/bin.js --profile headless --patch overlays/digest.cordis.yml "生成今日科技摘要"。
  • 换源:直接编辑 feeds.txt,一行一个 RSS/Atom 地址,AGENTS.md 不用动。
  • 会话内提醒:overlay 已挂载官方 schedule 插件,在 Web UI 里对 agent 说「每天上午 9 点提醒我生成摘要」即可(schedule_create 工具)。
  • 换语言/主题:改 AGENTS.md 第 4 步的输出要求(英文摘要、只留 AI 主题等)。

目录结构

dsh-daily-digest/
├── AGENTS.md                          # 摘要流水线指令(自动注入 agent)
├── feeds.txt                          # RSS 源清单(已验证中国大陆可达)
├── plugins/
│   └── digest-tools.ts                # 自定义插件:fetch_feed + save_digest
├── overlays/
│   ├── digest.cordis.yml.template     # overlay 模板(__PROJECT_DIR__ 占位)
│   └── digest.cordis.yml              # install.sh 生成,勿手改
├── scripts/
│   ├── install.sh                     # 一键安装
│   ├── demo.sh                        # assets/demo.gif 录制的真实会话
│   └── render_gif.py                  # 终端 GIF 渲染器(仅需 Pillow,可复用于其他 dsh demo)
├── digests/                           # 输出目录(已提交一份真实样例)
└── assets/demo.gif                    # 真实终端录制

常见问题

  • sh: dsh: command not found(在仓库目录里跑 npx 时):install.sh 建的 node_modules 软链会让 npx 误判包已本地安装。改用 node ~/.dsh/profiles/node_modules/@deepseek-ai/dsh/lib/bin.js ...,或在仓库外执行 npx。
  • 某个源抓取失败:流水线设计上会跳过失败源继续跑;摘要底部会少该源。换一个源即可。
  • 插件改了没生效:保存即热重载(cordis-plugin-hmr);headless 模式每次重新启动自然加载最新代码。

局限与已知问题(Limitations)

  • 依赖 dsh 运行时及其版本:本 demo 不是独立程序,插件依赖 dsh 的 tools 能力接缝与 @deepseek-ai/dsh-tools API;dsh 处于 Developer Preview,后续版本升级可能造成不兼容。overlays/digest.cordis.yml 由 install.sh 按当前目录生成绝对路径,仓库挪动位置后需重新执行安装脚本。
  • RSS 解析是简化实现:fetch_feed 的解析器只有约 30 行正则,仅覆盖标准 RSS 2.0 / Atom 的常见标签,summary 截断到 280 字符;带异常命名空间、畸形 XML 或非 XML 格式(如 JSON Feed)的源可能解析失败或字段缺失。
  • 摘要质量取决于模型:主题归类、去重与一句话点评由 ~/.dsh/settings.yaml 里的 agent-default-model 生成,点评是模型的快速概括而非事实核查,引用前请点开原文链接确认;摘要文件名里的日期依赖 dsh-time-context 提供的当前日期,该插件未生效时可能写错文件名。
  • 源可达性无保障:feeds.txt 中的源可能改版、限流或对部分地区不可达;流水线设计为跳过失败源继续跑,当天摘要可能缺源,且 fetch_feed 没有重试与缓存机制。
  • 同日重跑直接覆盖:save_digest 直接写入 digests/YYYY-MM-DD.md,没有版本化与并发保护,同一天多次生成会互相覆盖;cron 高频场景需自行处理。

License

MIT © JingHao-Leon。本仓库是社区 demo,与 DeepSeek 官方无隶属关系。DeepSeek Harness 本身:deepseek-ai/deepseek-harness(MIT,Developer Preview)。

Comments

Loading…

Similar plugins

dsh-file-shield

by Yazzyk

DeepSeek Harness (dsh) 插件:在 Web GUI 里手动点选文件或目录,屏蔽 agent 对它们的读取、搜索、写入与编辑。A dsh plugin that denies an agent read/search/write/edit access to chosen files and directories, picked from the plugin's own We

Security & AuditManifest valid

★ 0

MIT

JavaScript

Sep 19, 2026

dsh plugin --profile web add dsh-file-shield

by c-ling

DeepSeek Harness 网页端的 AI 与科技快讯看板:内置 RSS/JSON 源驱动的可拖拽浮窗,支持双语翻译、关键词过滤和设置页。

Manifest valid

★ 3

MIT

JavaScript

Aug 21, 2026

dsh plugin --profile web add dsh-plugin-newsboard

by ShineFree7

dsh-daily-log: daily work log plugin for DeepSeek Harness; /daily scaffolds Markdown and theme-aware HTML dashboards plus read/write/merge tools. DeepSeek Harness 每日工作日志插件:/daily 生成 Markdown 和深浅色 HTML

Manifest valid

★ 0

TypeScript

Aug 23, 2026

dsh plugin --profile web add dsh-daily-log

by a1113622001

DeepSeek Harness (cordis) plugin: self-update for the harness launcher - checks npm for a newer @deepseek-ai/dsh, stages it, and applies it on harness exit (or update-and-restart from the web panel).

Development & InfrastructureTerminal & ClientsManifest valid

★ 3

MIT

JavaScript

Aug 22, 2026

dsh plugin --profile web add dsh-auto-update

by KannaKuron

Agent preset for DeepSeek Harness that layers the self-referential Cordis toolset (dynamic plugins, runtime inspection) and preset-authoring skills onto the PTC Code-Mode preset; materialized files ca

Tools & CapabilitiesDevelopment & InfrastructureTerminal & ClientsManifest valid

★ 5

↓ 1.2k/wk

MIT

JavaScript

Sep 28, 2026

dsh plugin --profile web add dsh-ptc-cordis-preset

by 0lidaxiang

DeepSeek Harness is a plugin-based system for building AI agents. Everything, from tools and models to the web UI, can be added or replaced as a plugin.

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 4

↓ 71/wk

MIT

JavaScript

Sep 9, 2026

dsh plugin --profile web add dsh-plugin-greet