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

@astrolimit/opencode-mem

v0.7.0

Published

Thin opencode plugin for the astrolimit central memory service: memory tool (add/search/list) over HTTPS + auto-capture + offline outbox queue.

Readme

@astrolimit/opencode-mem

opencode 瘦插件:接入 astrolimit 中心记忆服务,为 AI 编码代理提供多机持久记忆。

  • memory 工具:add / search / list,经 HTTPS 与中心服务交互
  • auto-capture:会话 idle 后借宿主 LLM 提炼技术摘要自动上送(原始会话不出本机,捕获即删)
  • 记忆注入:会话首条消息自动注入相关项目记忆
  • 用户画像:每 N 次捕获后 LLM 合并偏好/模式/工作流,随注入段下发
  • 离线 outbox:断网时写入本地 libSQL 队列,恢复后自动重传

中心服务(@astrolimit/opencode-mem-server)以 Docker 镜像分发,不在 npm 发布; 部署方式见仓库 README。

安装

opencode.json(或 opencode.jsonc)的 plugin 数组声明 npm 包名,opencode 启动时自动安装:

{
  "plugin": ["@astrolimit/opencode-mem"]
}

配置

~/.config/opencode/astrolimit-mem.jsonc:

{
  "serverUrl": "https://你的中心域名",
  "apiToken": "env://ASTRO_MEM_API_TOKEN",  // 推荐 env:// 间接引用,勿写真值
  // ── auto-capture(默认开启)──
  // "autoCaptureEnabled": true,
  // "autoCaptureModel": "inherit",   // 用会话正在用的模型;也可填具体 modelID
  // "autoCaptureLanguage": "auto",   // 摘要语言随用户消息语种
  // ── 记忆注入(默认开启)──
  // "injectEnabled": true,
  // "injectMaxMemories": 3,
  // "injectMaxAgeDays": 30,
  // ── 用户画像(默认开启)──
  // "profileEnabled": true,
  // "profileUpdateEveryN": 5,        // 0 = 关闭自动刷新
  // "profileRecentMemories": 10
}

ASTRO_MEM_API_TOKEN 的值为该设备的 per-device token,由中心服务 CLI 签发:

docker exec astro-mem-server node dist/cli.mjs token issue --name my-laptop --purpose device

注意:

  • auto-capture 的 LLM 提取在本机借宿主 opencode 的 provider 完成(LLM key 不出设备); 上送的只有提炼摘要。
  • 需常驻宿主(TUI / opencode serve);一次性 opencode run 进程退出会使 idle 捕获来不及触发。

使用

opencode 会话内由模型自主调用,或显式要求:

memory({ mode: "add", content: "项目使用 pnpm monorepo", tags: "tooling" });
memory({ mode: "search", query: "构建流水线" });
memory({ mode: "list", limit: 10 });

许可证

本项目基于 **SFR 许可证(第二版)**开源,见包内 LICENSE 或 http://www.shared-future.ren/licenses/。