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

koishi-plugin-codex-reset

v0.1.5

Published

Monitor AIHOT Codex reset events and notify Koishi channels.

Readme

koishi-plugin-codex-reset

监控 AIHOT Codex 重置 API 的 Koishi 插件。

功能

  • 定时轮询 AIHOT 的 Codex / ChatGPT Work 重置事件快照。
  • 支持推送新的重置预告、已确认的全员重置和重置卡事件。
  • 目标支持平台 + 频道配置,例如 onebot + 123456789。
  • codex.probability / 重置概率:生成精美的概率统计卡片图片;没有 Puppeteer 时回退为纯文本。
  • codex.event / 最近重置:生成最近一次已确认重置的浅色卡片,展示距今时间、类型和来源帖子。
  • codex.calendar / 重置日历:生成本月的 PNG 日历图片,右侧固定展示最近发布的 2 条来源动态。
  • codex.history / 重置历史:生成公开重置事件的历史时间线图片,默认展示最近 1 个月。
  • 日历中的 Tibo 头像作为本地资源随插件发布,不依赖用户访问 X 或运行时下载图片。

命令

命令都可以直接使用;历史时间线支持时间范围参数:

  • codex.probability,别名 重置概率:读取当前 API 快照,生成概率统计卡片,展示未来 24 小时和 7 天概率、样本概览、事件构成和最近确认日期;没有 Puppeteer 时回退为纯文本。
  • codex.event,别名 最近重置:发送最近一次已确认重置的浅色卡片;没有 Puppeteer 时回退为文本。
  • codex.calendar,别名 重置日历:发送本月日历 PNG;右侧固定显示最近发布的 2 条动态。
  • codex.history,别名 重置历史:发送历史时间线 PNG;重置历史 查看最近 1 个月,重置历史 -3 查看最近 3 个月,重置历史 -a 查看全部历史。

概率、最近重置、日历和历史时间线命令始终启用;安装并启用 koishi-plugin-puppeteer 后会发送对应图片,没有 Puppeteer 时概率和最近重置会回退为纯文本,日历和历史时间线会提示安装 Puppeteer。

日历、月度统计及右侧动态仅展示已确认且日期不晚于今天的事件,不展示预告。日期优先使用实际发生日期,缺失时使用北京时间的确认日期;两者均缺失时不展示,不使用预计时间窗口代替实际日期。

首次安装时的第一份快照只建立基线,不会把历史事件全部推送。插件将已见事件状态和待发送通知保存在 Koishi 工作目录的 data/codex-reset/ 中;重启后继续去重并重试未成功的目标。API 暂时漏掉旧事件、随后又补回时,也不会把它再次当作新事件。只有最近 48 小时内发布的预告或确认事件才会新建推送;超过 48 小时仍未送达的通知会放弃。更改 API 地址或推送目标后会建立新的基线。

图片生成最多同时进行 2 项,新的图片任务至少间隔 3 秒;历史图片超过 120 条事件时会提示缩小查询范围。图片中的长篇来源文字会截短。API 响应上限为 4 MiB。

安装

npm install koishi-plugin-codex-reset

如果需要概率卡片、最近重置卡片、日历或历史时间线图片,再安装并启用 koishi-plugin-puppeteer。不安装 Puppeteer 时,监控、最近重置和概率分析仍然可以使用,概率与最近重置命令回退为纯文本,日历和历史命令会给出提示。

配置

  • 监控接口地址:监控 API 地址,默认 https://aihot.news/api/v1/codex-resets。
  • 监控间隔:轮询间隔,单位为秒,默认 300 秒。
  • 请求超时时间:单次 API 请求超时时间,单位为毫秒,默认 15000 毫秒。
  • 推送目标:推送目标表,填写“平台”和“频道或群组 ID”;平台留空会按频道尝试在线 Bot,同一平台/频道只发送一次。
  • 推送重置预告:是否推送预告。
  • 推送已确认重置:是否推送已确认的重置/重置卡事件。
  • 艾特全体:推送通知时是否艾特全体,默认关闭;需要目标平台支持全体艾特。

API 是只读公开接口,不需要 API Key。插件使用 ETag 条件请求,并保留来源链接。请遵守 AIHOT 公开使用规则:公开可访问不等于自动获得对外商业使用、镜像或转售授权。

开发

npm install
npm test