npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-zotero

v0.9.0

Published

Let agents search, read, and cite your local Zotero library: find papers, browse notes and annotations, pull evidence by question, open the source document, generate citations.

Readme

dsh-zotero

dsh-zotero 是面向 Agent 研究工作流的 Zotero 插件。Agent 可以直接从你的文献库中搜索文献、查看元数据和笔记、提取与问题相关的证据段落、打开原文 PDF,并生成引用和参考文献表。

工具

| 工具 | 用途 | | ------------------- | ------------------------------------------------------------------------------------------------------------- | | zotero_search | 按标题/作者/年份搜索(library/collection/savedSearch/publications 作用域),everything 模式连全文索引一起搜 | | zotero_browse | 发现库结构:库、合集树(层级导航)、保存的检索、标签 facet、条目类型及其字段 | | zotero_get | 读取单条文献的元数据,可选返回笔记、批注、附件清单;fields:"all" 保留全部元数据 | | zotero_children | 探索单条文献的子对象图:直连笔记、附件,以及挂在 PDF 下的批注 | | zotero_retrieve | 按查询词返回最相关的证据段落(批注/笔记/摘要/全文),支持多附件检索 | | zotero_changes | 基于本地事务版本的增量感知:哪些条目/合集/全文索引变了、什么被删除 | | zotero_attachment | 将文献 ref 解析为已验证的磁盘路径或链接 URL | | zotero_export | 生成引用、参考文献表、BibTeX/BibLaTeX/RIS/CSL JSON |

完整工具参考 →

安装

dsh plugin --profile <name> add dsh-zotero

从 GitHub 源码安装:

dsh plugin --profile <name> add github:Vncntvx/dsh-zotero

本地 tarball:

cd dsh-zotero && npm pack
dsh plugin --profile <name> add ./dsh-zotero-*.tgz

安装后重启新建会话,Agent 即可使用 Zotero 工具。

插件在 设置 → Zotero 中提供一个配置页(与 General、Models、Plugins 并列的左侧导航项),可调整 API 地址、并发限制、全文检索开关等参数,保存即生效。详见 配置

安装详情 →

前置条件

  • Zotero ≥ 7 桌面版,启用本地 API:设置 → 高级 → "允许其他应用程序与 Zotero 通信"
  • Node.js ≥ 22.19(或 ≥ 24)
  • 宿主 dsh 0.1.6-alpha.2(@deepseek-ai/dsh-* peer 依赖均为 ^0.1.6-alpha.2,兼容范围另见 engines.dsh;上游发布稳定版之前只跟最新预发布线,不向后兼容)
  • 本地 API 地址 http://127.0.0.1:23119/api,无认证,只读

使用示例

Agent 在对话中根据用户需求逐步调用工具,每次调用的结果作为下一步的上下文。

用户:帮我找 Risk 相关的论文
Agent → zotero_search(query: "Risk", itemTypes: ["journalArticle"])
       5 篇匹配结果,用户选择前 3 篇

用户:第一篇的摘要说了什么?
Agent → zotero_get(ref: "zotero://user/0/item/ABCD1234")
       返回摘要全文(标准模型已含 abstract)

用户:这篇里关于方法论的讨论,帮我找出来
Agent → zotero_retrieve(ref: "zotero://user/0/item/ABCD1234", query: "methodology",
                        sources: ["fulltext", "note"])
       返回相关段落,带页码和来源

用户:把这三篇导出为 BibTeX
Agent → zotero_export(refs: ["zotero://user/0/item/ABCD1234",
                             "zotero://user/0/item/EFGH5678",
                             "zotero://user/0/item/IJKL9012"], format: "bibtex")
       生成 BibTeX 条目;界面可下载,模型读到同样的文本

更多示例见 功能概览

限制

  • 只读文献库:所有操作均为读取,不修改条目、笔记、标签或分类
  • 只访问本机:网络请求仅发往 127.0.0.1:23119
  • 证据排序是词项相关性:基于 BM25,按查询词与 passage 的词频匹配度排序
  • 导出是静态文本:工具以文本形式返回,模型读到的就是它;Zotero 面板可以一键复制或下载文件(.bib / .ris / .json 等),不需要手动誊抄
  • 全文证据依赖 Zotero 索引:未索引的 PDF 无法提供全文段落
  • 附件深度取决于宿主zotero_attachment 返回文件位置,继续阅读 PDF 需要宿主具备对应能力

权限与外部副作用

  • 网络:只向 http://127.0.0.1:23119/api 发起 HTTP 请求(不跟随重定向),resolveConfig 强制 loopback 地址
  • 文件:只读,zotero_attachmentexistsSync 校验 Zotero 返回的附件路径,不写文件系统
  • 持久化:唯一写入来自设置页左侧导航的 Zotero 配置页,保存到 $DSH_HOME/settings.yamlzotero: 用户层
  • 无 Shell / native / 后台任务:插件不执行 shell 命令、不加载 native 模块、不启动常驻进程
  • 重启:安装或卸载插件后需要重启 dsh 并新建会话;配置修改保存即热更新,无需重启

文档

| 文档 | 内容 | | ----------------------------------- | ----------------------------------- | | 快速上手 | 安装、前置条件、首次验证 | | 功能概览 | 来源面板、对话集成、证据提取、导出 | | 工具参考 | 全部 8 个工具的参数、返回值、错误码 | | 配置 | 22 个配置字段、默认值、热更新 | | 架构 | 数据流、各层职责、设计边界 | | 开发指南 | 构建、测试、本地开发 | | 问题排查 | 11 个常见问题的症状和处理 |

开发

npm install                  # 本仓库与 ../deepseek-harness 并列;仅嵌套在 harness 内时需加 --no-workspaces
npm test                      # 单元测试(vitest,mock Zotero 服务器)
npm run typecheck             # tsc --noEmit,覆盖 node、test、client 三个项目
npm run build                 # tsc 编译 node 部分到 lib/,esbuild 编译浏览器部分到 lib/client.js
npm run dev                   # tsc --watch,host half 热更新
npm run dev:client            # esbuild --watch,浏览器部分热更新

lib/ 放 Node 侧代码,lib/client.js 放浏览器侧代码(设置页和 Zotero tab)。你用 dev-lib.cordis.yml overlay 跑完整插件流程,见开发指南。本仓库与 ../deepseek-harness 并列,属本地暂存布局。

许可证

MIT:自由使用、修改和分发。