tanf1ng/dsh-tool-hackernews ↗★ 0
dsh-tool-hackernews
Hacker News tool suite (hn_top_stories, hn_search, hn_item) for DeepSeek Harness agents
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:tanf1ng/dsh-tool-hackernews说明文档
阅读完整 README ↗dsh-tool-hackernews
English | 中文
面向 DeepSeek Harness(DSH)智能体的 Hacker News 工具套件:hn_top_stories、hn_search、hn_item。基于免费的 Algolia HN 搜索 API 构建 —— 无需任何 API Key。
工具
| 工具 | 参数 | 行为 |
|---|---|---|
hn_top_stories | limit(可选,1–30) | Hacker News 当前热门首页:标题、链接、评分、评论数、作者、相对时间。 |
hn_search | query(必填)、tag(story/comment/poll/ask_hn/show_hn)、since_hours(1–8760)、limit(1–30) | 关键词搜索 HN,可限定标签或最近 N 小时。 |
hn_item | id(必填)、max_comments(0–100) | 单个故事详情 + 有上限的评论树(自动去除 HTML、按层级缩进),保护上下文窗口。 |
三个工具都是只读且并发安全的,DSH 可以并行调度同级的工具调用。每个请求都携带部署方配置的超时预算,并转发调用方的 AbortSignal。
安装
DSH 插件通过 dsh plugin(底层是 pnpm)安装到 profile 中。从本 GitHub 仓库安装:
dsh plugin --profile add "github:tanf1ng/dsh-tool-hackernews"
或从本地源码安装:
pnpm install
pnpm build
# 然后在需要加载它的 profile 里执行:
dsh plugin --profile add "file:../../dsh-tool-hackernews"
在 profile 的 cordis.patch.yml(或产品 bundle)中启用插件:
- id: tool-hackernews
name: dsh-tool-hackernews
配置
所有配置项均可选:
| 配置项 | 默认值 | 含义 |
|---|---|---|
registerTopStories | true | 是否注册 hn_top_stories。 |
registerSearch | true | 是否注册 hn_search。 |
registerItem | true | 是否注册 hn_item。 |
topStoriesLimit |