tangzijie716/dsh-info-sources ↗★ 0

dsh-info-sources

信息采集插件 for DeepSeek Harness:采集方式做成适配器 + 接口地址做成独立清单。已实现 api-get(JSON 接口)与 rss(RSS/Atom,零依赖自带解析器)。 适合需要从指定 JSON 接口或 RSS 订阅源批量采集并汇总信息的用户。

패키지
dsh-info-sources
호환성
미검증
Harness peer 범위
*
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 9. 29.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:tangzijie716/dsh-info-sources

使用用户覆盖层

用户覆盖层没有默认路径。每次需要使用时,必须显式传入 sourcesPath:

info_sources(sourcesPath="config/my-sources.json")
info_fetch(id="my-source", sourcesPath="config/my-sources.json")
info_collect(tag="news", sourcesPath="config/my-sources.json")

不传 sourcesPath 时,插件只使用包内的 config/sources.json,不会自动读取环境变量、用户目录或以前调用过的覆盖文件。相对路径以当前 DSH 会话工作区为基准。

配置示例

{
  "version": 1,
  "defaults": {
    "method": "api-get",
    "timeoutMs": 15000,
    "limit": 20,
    "headers": {
      "Accept": "application/json, text/plain, */*"
    }
  },
  "sources": [
    {
      "id": "example-api",
      "label": "示例接口",
      "method": "api-get",
      "enabled": true,
      "tags": ["news", "example"],
      "url": "https://example.com/api/items",
      "query": {
        "language": "zh-CN"
      },
      "headers": {
        "Authorization": "Bearer $ENV:EXAMPLE_TOKEN"
      },
      "select": {
        "items": "data.items[]",
        "itemsFallback": ["items[]"],
        "title": "title",
        "hot": "score",
        "url": "url",
        "originalUrl": "originalUrl",
        "origin": "source.name",
        "publishedAt": "publishedAt",
        "summary": "summary",
        "label": "category"
      },
      "limit": 20,
      "timeoutMs": 15000
    },
    {
      "id": "example-feed",
      "label": "示例订阅",
      "method": "rss",
      "tags": ["news"],
      "url": "https://example.com/feed.xml",
      "limit": 20
    }
  ]
}