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-sleep-send

v1.2.3

Published

DSH Web 定时发送插件:在输入框旁提供定时发送按钮与配置,支持智能时段(12:00–14:00 / 18:00–次日 08:00 内最近时间)、自定义日期时间、多个定时任务,并通过 localStorage 持久化任务。清新天蓝主题。

Readme

DSH Web 的定时发送 Cordis 客户端插件:在输入框右侧提供「定时发送」按钮与配置面板,支持智能时段、自定义日期时间、多个定时任务,并通过 localStorage 持久化任务,刷新页面后自动恢复。

🕐 "sleep-send" —— 把消息"睡"到合适的时刻再发送:默认只在 12:00–14:00 与 18:00–次日 08:00 这类得体时段内自动挑最近的时间发出,也可以完全自定义日期与时刻。

功能

  • 输入框右侧按钮conversation.input.right 槽位,紧挨发送按钮;空草稿禁用、输入后激活。
  • 智能时段(默认):在 12:00 – 14:0018:00 – 次日 08:00 两个时段内自动选取最近的可发送时间(当前时间 + 2 分钟起;不在时段内则取下一时段起点)。
  • 自定义日期时间:时间选择器 + 日期快捷(今天 / 明天 / 后天)+ 原生日期选择器(过去日期不可选);已过时间自动顺延一天;发送时间按具体日期显示(如 8月19日 周三 12:00)。
  • 多个定时任务:确认后追加任务并清空输入框(输入框恢复自由,可连续排队多条);弹窗内可查看 / 逐个删除已设定任务;工具行芯片显示任务数徽标 + 下次发送时间 + 实时倒计时。
  • localStorage 持久化dsh.sched-send.v1):任务与自定义偏好刷新后自动恢复;恢复时未到期任务保留、15 分钟内过期的自动补发、更早的过期任务丢弃。
  • 防误覆盖:到点发送前若输入框内容已被修改,自动取消本次发送而不是覆盖新内容。
  • 无障碍与性能:全部可交互元素带 :focus-visible 焦点环;动画遵循 prefers-reduced-motion;脉冲动画仅使用 transform/opacity。

截图

| 工具行按钮与武装芯片 | 配置弹窗(智能时段) | 配置弹窗(自定义日期时间) | | :---: | :---: | :---: | | 工具行按钮与武装芯片 | 配置弹窗-智能时段 | 配置弹窗-自定义日期时间 |

截图为清新天蓝主题;替换 docs/screenshots/ 下同名文件即可更新。

安装

已发布到 npm,一条命令安装到你的 web profile:

dsh plugin --profile web add dsh-sleep-send
  • 本地开发安装:dsh plugin --profile web add file:D:\projects\github\sleep-send
  • 或直接通过 git:dsh plugin --profile web add github:Awu12277/dsh-sleep-send
  • 安装后重启 dsh web 生效;卸载:dsh plugin --profile web remove dsh-sleep-send

也可以作为普通库安装(源码 / 集成参考):

npm install dsh-sleep-send

包结构(DSH web 插件协议):

dsh-sleep-send/
├── index.js          # host 侧 cordis 插件骨架(纯 client 插件,无 host 逻辑)
├── client.js         # 浏览器端:window.__ModuleLoader__.load({ id, factory })
├── cordis.patch.yml  # bundle patch:注册 dsh-sleep-send 条目
└── package.json      # dsh.bundle.patch + dsh.client.platform: "web"

运行环境

  • DSH Web(DeepSeek Harness 的浏览器界面)。client bundle 运行于浏览器页面:
    • require("react") 获取 React;apply(ctx) 中的 ctx 为 client root context;
    • 通过 ctx.get("slots") 访问 conversation.input.rightconversation.input.overlay 槽位;
    • 调度定时器优先使用 cordis timer 服务,缺失时自动降级为浏览器定时器;
    • 任务与偏好持久化在 localStorage['dsh.sched-send.v1'],刷新页面后自动恢复。
  • 纯 ESM、零运行时依赖、无需构建。

使用

  1. 在输入框输入消息;
  2. 点击输入框右侧的 ⏰ 定时(或 ⚙ 配置)打开配置面板;
  3. 选择 智能时段自定义时间(含日期快捷 / 日期选择器);
  4. 点击 加入 · HH:MM 发送 —— 任务加入列表,输入框自动清空,可继续输入下一条并排队;
  5. 工具行芯片显示最近任务时间与实时倒计时;点击 ✕ 取消全部任务;
  6. 到点后消息自动发送;等待期间若修改了输入框内容,该任务自动取消(不会覆盖新输入)。

持久化与恢复

  • 存储键:localStorage['dsh.sched-send.v1'],内容为 { mode, custom, schedules }
  • 每次任务增删 / 到期发送后即时写回;
  • 页面刷新并重新激活插件后,自动认领本会话的持久化任务:
    • 未到期任务保留并继续倒计时;
    • 15 分钟内过期的任务立即补发;
    • 更早的过期任务丢弃(避免刷新后补发陈旧消息)。

数据与隐私

  • 所有任务仅保存在当前浏览器localStorage 中,不上传任何服务器;
  • 更换浏览器 / 无痕窗口 / 清除站点数据会丢失任务。

开发

npm test          # node --check src/index.js

License

MIT