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-feedluna

v0.0.6

Published

RSS一站式平台,支持RSS,格式化,AI处理,工作流面板。

Readme

koishi-plugin-feedluna

订阅 RSS 更新并合并推送到指定群聊频道。

在群聊中发送:

feedluna.sub https://example.com/feed.xml

默认情况下,插件首次订阅时只记录当前已有文章,不会立即推送。之后检测到新文章时,会将同一轮轮询中的更新合并后发送到订阅群。可通过 pushInitialItems 在首次订阅后推送最新文章,或通过 pushAllInitialItems 推送订阅源当前返回的所有文章。

查看当前群聊的订阅:

feedluna.list

取消当前群聊中的订阅:

feedluna.unsub https://example.com/feed.xml

feedluna.list 和 feedluna.unsub 也分别支持别名 feedluna.ls 和 feedluna.unsubscribe。

WebUI

启用 Koishi Console 后,侧边栏会出现 FeedLuna RSS 图标。页面提供:

  • 所有订阅的查看、搜索、编辑、取消订阅和监听开关。
  • RSS/Atom/RDF 订阅源的文章预览;预览不会写入订阅记录、改变已读文章或发送消息。
  • 手动配置推送目标:平台名称、机器人 ID、频道 ID、可选群组 ID,以及是否在该频道启用监听。
  • 直接在页面编辑请求设置、推送内容和订阅状态,并通过 Koishi 原生配置重载保存。
  • 管理命名工作流,并为每个订阅选择一个工作流。未选择时使用内置的直通流程。
  • 在线拖动添加模板、文本替换和 ChatLuna 节点;每个工作流固定为单一输入节点、单一输出节点和一条线性处理链。
  • 在输出节点选择纯文本输出,或将上游生成的 HTML/XML 安全渲染为 PNG 图片后发送。
  • 在不发送消息的情况下试运行工作流,预览最终文本、图片和模型调用结果。

WebUI 使用选定机器人的 sendMessage(channelId, content, guildId) 推送。因此机器人 ID 必须对应运行中的机器人,频道 ID 与群组 ID 由管理员按目标平台填写。一个 RSS 订阅源推送到多个目标时,为每个目标分别建立订阅。

群聊命令创建的订阅会自动使用当前会话的平台、机器人、频道和群组信息;首次文章仍发送至输入指令的当前会话。

工作流与 ChatLuna

工作流按每次推送的整批 RSS 更新执行一次。输入节点提供 Feed 名称、Feed 地址、文章数量和已格式化的 RSS 文本;中间节点顺序处理文本;输出节点把最终内容发送至订阅目标。

输出节点默认使用纯文本输出。纯文本会作为 Koishi 文本元素发送,RSS 内容或模型输出中的 <img>、<at> 等标签不会被当作消息元素执行。选择“HTML/XML 转图片”后,FeedLuna 会将上游输出按内置样式排版并截图为 PNG;脚本、样式、表单、外部资源和网络请求会被移除或阻止,单张图片限制为 800 × 8000 像素。

模板和 ChatLuna 提示词支持 {{input}}、{{feedTitle}}、{{feedUrl}} 与 {{itemCount}}。文本替换节点可进行普通替换或使用 g、i、m 标志的正则替换。

ChatLuna 为可选依赖。安装并配置 koishi-plugin-chatluna 后,ChatLuna 节点会列出其已配置的模型,并以 平台/模型 标识保存选择。未安装 ChatLuna 时,模板和文本替换工作流仍可使用,但包含 ChatLuna 节点的工作流会在执行时失败。

HTML/XML 图片输出需要安装并启用 koishi-plugin-puppeteer,并确保运行环境中存在兼容的 Chrome 或 Edge。未启用 Puppeteer 时,纯文本输出仍可正常使用;图片工作流会中止本次投递、在原频道提示错误,并按工作流重试上限保留文章供后续重试。

任一模块失败都会中断本次 RSS 正常推送,并向原订阅频道发送错误提示。文章在达到 maxWorkflowRetries 前不会标记为已读;达到上限后,该批文章会标记为已处理,避免故障工作流持续堆积,后续新文章仍可继续处理。同一阶段的错误提示会限频 30 分钟,终止提示会单独发送。首次订阅会先保存订阅记录,首次推送失败不会取消创建,并采用相同的重试上限。

配置

所有配置项都可在 FeedLuna 侧边栏页面的“插件设置”中调整,也可在 Koishi 控制台的插件配置页面调整,无需手动编辑 koishi.yml。

| 配置项 | 默认值 | 说明 | | --- | --- | --- | | pollInterval | 300000 | RSS 检查间隔,单位为毫秒,最短 10 秒。 | | requestTimeout | 30000 | RSS 请求超时时间,单位为毫秒,最短 1 秒。 | | userAgent | 桌面 Chrome User-Agent | 请求 RSS 时使用的 User-Agent,默认模拟桌面 Chrome 浏览器。 | | maxXmlEntityExpansions | 20000 | 单次解析中 XML 实体引用替换最大次数。超过该值的大xml在解析时会被警告。 | | maxItemsPerUpdate | 8 | 单次检查合并推送的最大文章数,范围为 1 至 50。 | | includeSummary | true | 是否在推送中包含文章摘要。 | | maxSummaryLength | 500 | 单篇摘要的最大字符数;设为 0 时不发送摘要。 | | pushInitialItems | false | 是否在首次订阅后立即推送最新的一篇文章。 | | pushAllInitialItems | false | 是否在首次订阅时推送订阅源当前返回的所有历史文章,可能产生大量消息。 | | maxSeenIds | 500 | 每个订阅保留的已推送文章 ID 数量,范围为 50 至 5000。 | | maxWorkflowRetries | 1 | 工作流投递首次失败后的最大重试次数,范围为 0 至 100;设为 0 时首次失败即终止该批更新。 |