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

opencode-loamlog

v0.2.3

Published

OpenCode plugin for Loamlog — automatically captures sessions on idle and archives them as structured JSON snapshots via the loam daemon

Readme

opencode-loamlog

适用于 Loamlog 的 OpenCode 插件 —— 在会话空闲时自动捕获会话,并通过 Loamlog 守护进程将其存档为结构化的 JSON 快照。

功能特性

  • 自动捕获 (Automatic Capture):监听 session.idle 事件并转发至本地 Loamlog 守护进程。
  • 本地文件缓冲 (Local File Buffering):当守护进程不可用时,payload 将暂时保存在本地 ~/.loamlog/buffer/ 目录中(最多保留 50 个文件)。
  • 延迟同步 (Late-start Sync):一旦守护进程恢复可用,插件将在下一次成功上报后自动冲刷并同步缓冲区内的旧数据。
  • 鲁棒性 (Robustness):隔离的错误处理确保插件永远不会导致 OpenCode 宿主程序崩溃。

安装

可以通过 OpenCode 插件管理器或手动安装:

npm install opencode-loamlog

配置

插件支持以下环境变量:

  • LOAM_DAEMON_URL: Loamlog 守护进程地址(默认:http://127.0.0.1:37468)。
  • LOAM_DEBUG_LOG: 调试日志路径(默认:/tmp/loamlog-debug.log)。

开发与发布 (Development & Publishing)

构建

pnpm install
pnpm run build

测试

pnpm run test

发布到 NPM

该插件作为 opencode-loamlog 发布到 NPM。

1. 自动发布(推荐)

通过 GitHub Actions 处理发布流程:

  • 通过标签触发:推送符合 opencode-loamlog@v* 格式的标签(例如 [email protected])。
    git tag [email protected]
    git push origin [email protected]
  • 手动触发:前往 GitHub Actions -> "Publish OpenCode Plugin" -> "Run workflow"。选择版本升级类型(patch/minor/major)。

2. 手动发布

如果你拥有相应权限且本地配置了 NPM_TOKEN

cd plugins/opencode
npm publish --access public

注意:必须在 GitHub 仓库的 Secrets 中配置 NPM_TOKEN 才能使自动工作流生效。