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

@feiertu/dsh-bookmark

v0.1.0

Published

Link/bookmark stash for DeepSeek Harness: save and search links, usable by both the agent and the user.

Readme

dsh-bookmark

一个最小可运行的 DSH 资源整合类插件骨架:把散落的链接/书签/收藏存起来,让 agent 和用户都能用。

它演示了什么

| 机制 | 用途 | |---|---| | ctx.tools.register(defineTool(...)) | 给 agent 暴露 save_link / list_links 两个工具 | | ctx.storageDomain + defineDomain/domainTable + zod | 持久化、schema 校验的键值存储,重启不丢,不污染会话记录 | | dsh.bundle.patch + cordis.patch.yml | 以 patch 层方式注入 profile,不侵入核心 |

本地安装(发布前验证)

本地开发建议用 tarball 方式安装,而不是 add ./dsh-bookmark:

  • add ./dsh-bookmark 会被 pnpm 装成 link:(symlink 到源码目录),此时插件内部的 @deepseek-ai/dsh-tools 等 peer 依赖会从源码物理路径向上解析,找不到 profile 的 fallback,启动时报 ERR_MODULE_NOT_FOUND。
  • tarball / registry 安装是 copy 语义,模块位于 profile 的 node_modules 内,peer 依赖通过 $DSH_HOME/profiles/node_modules 的 flat fallback 正常解析。
# 1. 打包
cd dsh-bookmark
pnpm pack --pack-destination ..

# 2. 安装 tarball
dsh plugin --profile headless add ./dsh-bookmark-0.1.0.tgz
# 注意:Windows 下不要用 `file:` 前缀 + 盘符路径(会被 pnpm 当相对路径)。

# 3. 确认插件进入了配置树
dsh --profile headless --dump-config
# 期望看到 id 为 bookmark、name 为 dsh-bookmark 的行。

# 4. 真实任务验证(需要已配置模型凭证)
dsh --profile headless "帮我把 https://example.com 收藏一下,标题写 Example"
dsh --profile headless "我收藏了哪些链接?"

⚠️ headless profile 默认不含 storage 服务(storage 三件套在 dsh-web-app 里)。要在 headless 里用本插件,需先在其 cordis.patch.yml 里补:

- insert:
    - id: storage
      name: '@deepseek-ai/dsh-storage'
    - id: storage-json
      name: '@deepseek-ai/dsh-storage-json'
      config:
        root: !!js dshHomePath('storages')
    - id: storage-domain
      name: '@deepseek-ai/dsh-storage-domain'
      config:
        backend: json

web profile 自带 storage 栈,无需补。装到 web profile 后需重启 dsh web 才会加载。

发布

npm login
# 建议先改名成你的 scope,例如 @yourname/dsh-bookmark,并同步修改 cordis.patch.yml 里的 name
npm publish --access public

别人安装:

dsh plugin --profile web add @yourname/dsh-bookmark

从骨架扩展成完整插件

  1. 给用户用:加一个 dsh-client-ui-* 前端面板,在 Web 里浏览/管理收藏。
  2. 给 agent 用得更强:把 list_links 的"子串过滤"升级成语义检索(embedding 索引)。
  3. 多数据源聚合:新增表或工具,把 RSS、网页、笔记接进同一个 stash。
  4. 配置化:加 schemastery Config,让用户在设置面板里配后端、每页条数等。

⚠️ 外部资源改动需手动

资源整合类插件要操作外部资源(浏览器书签、第三方账号数据等)时,写操作不能安全地由插件/脚本直接执行,必须手动。以整理浏览器书签为例:

  • checksum 校验:Chrome/Edge 的 Bookmarks 文件带 MD5 checksum,现代 Chromium 改过算法、无法简单重算;校验不通过时浏览器会用 Bookmarks.bak 回滚,直接改文件会丢失改动。
  • 运行中覆盖:浏览器运行时会把内存书签写回磁盘,直接改文件会在退出时被覆盖。

正确做法:先备份原文件 → 生成标准的 Netscape HTML 书签文件(或分类方案)→ 用户手动导入 → 核对后手动清理旧书签。