Bundle
dsh-ai-brief
每日 AI 资讯 Agent 插件:日报(存70天)/周报/月报 · 结构化生成(合并提示词) · 真实web搜索 · host+client 双半面
- Source
- bozhang1214
- stars
- 2 stars
- License
- MIT
- Updated
- Updated 19 days ago
Readme
# dsh-ai-brief
每日 AI 资讯 Agent 插件(DeepSeek Harness):**日报(保留 70 天)/ 周报 / 月报**,结构化生成(遵循综合提示词),周报/月报支持真实 web 搜索补充,host + client 双半面。
## 功能
- 🗞️ **三档报告**:日报(每天定时,保留 70 天自动清理)、周报(每周)、月报(每月),均以 Markdown 存本地(默认 `~/.dsh-news/`)
- 🧠 **结构化生成**:9 大板块(移动端/前端/AI算法/大模型/Agent/端侧/创业与大厂/自动驾驶/趋势展望),每模块/子模块最少 10 条,每条带原文链接
- 🌐 **真实 web 搜索**:周报/月报生成时用 DSH 的 `ctx.web` 搜索补充 RSS 覆盖不到的素材
- 🔍 **6 个模型工具**:`news_refresh`(日报)、`news_generate`(周/月报)、`today_news`、`news_report`、`news_search`、`news_summarize`
- 🖥️ **侧边栏展示**(需安装 dsh-better-sidebar):📰 资讯日报 tab,日报/周报/月报切换 + 一键生成,Markdown 渲染
- 📚 **26 个内置资讯源**(中英文社区/媒体/AI媒体/官方博客/鸿蒙频道),支持 `kind: 'html'` 静态页源
## 安装
```bash
dsh plugin --profile web add dsh-ai-brief@latest
```
装完重启 `dsh web`(或硬刷新浏览器即可看到侧边栏 tab,host 改动需重启)。
可选:侧边栏展示依赖 [dsh-better-sidebar](https://github.com/omdsh-dev/DSH-better-sidebar)(未安装时插件照常工作,仅无 UI tab)。
## 配置
在 profile 的 `cordis.patch.yml` 里覆盖(全部可留空用默认值):
```yaml
- insert:
- id: ai-brief
name: dsh-ai-brief
config:
outputDir: '/你的/输出目录' # 默认 ~/.dsh-news
promptDir: '' # 自定义提示词目录(默认用内置,留空)
maxItems: 150 # 日报精选上限
maxPerSource: 12 # 每源上限
retention:
dailyDays: 70 # 日报保留天数
weeklyWeeks: 26
monthlyMonths: 24
schedule: { hour: 7, minute: 30 } # 日报定时
weeklySchedule: { dayOfWeek: 0, hour: 20 } # 周报(0=周日)
monthlySchedule: { dayOfMonth: 1, hour: 8 } # 月报
search: { enabled: true, maxResults: 6 } # 周/月报 web 搜索
llm: { reasoningEffort: 'off' } # 关闭思考防烧光输出预算
```
## 使用
对话里说:
- "生成今天的日报" / "生成周报" / "生成月报"
- "读取最新的周报" / "搜索一下 Qwen 相关的资讯" / "总结一下昨天日报"
或侧边栏 tab 里点按钮。
## 报告格式定制
报告生成规范默认**内置于代码**(`src/builtin-spec.js`,由 `prompt/AI综合报告提示词.md` 生成),无需依赖外部文件。
**想自定义提示词**:复制 `prompt/AI综合报告提示词.md` 到任意目录改好后,在配置里指定:
```yaml
config:
promptDir: '/你的/自定义提示词目录' # 该目录下需含 AI综合报告提示词.md
```
未配置 `promptDir` 时始终用内置规范;配置了但文件缺失/不可读时,自动回退内置(不报错)。
> 若想直接修改内置规范本身:编辑 `prompt/AI综合报告提示词.md` 后运行 `pnpm build:spec` 重新生成 `src/builtin-spec.js`。
## 开发
```bash
pnpm install
node build.mjs # 构建 client 半 → lib/client.js
pnpm pack # 打包发布用 tarball
```
## License
MIT
Install
dsh plugin --profile web add github:bozhang1214/dsh-ai-brief
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-ai-brief from the hub
- This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.