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

@co-engram/opencode

v0.1.0

Published

Co-Engram adapter for OpenCode (native plugin).

Downloads

87

Readme

@co-engram/opencode

English | 中文

Co-Engram 团队记忆的 OpenCode 原生插件。

  • 38+ 个记忆工具原生注册(engram_search、engram_create……)——与 Claude Code / OpenClaw / DeepSeek Harness 宿主同一套 core 工具,以 OpenCode 原生工具形态暴露。
  • instructions.md prompt 注入:core prompt-builder 的记忆注入段落渲染到 $XDG_CONFIG_HOME/opencode/co-engram/instructions.md(XDG_CONFIG_HOME 未设时回退 ~/.config,与 opencode 自身的配置查找一致),随会话与维护周期刷新——topTags、技能清单、目录概览、待审候选数进入每一次系统提示。
  • 会话捕获 → 提案:message.part.updated / message.updated 事件按 session 缓冲,session.idle 时批量喂给提案引擎——反复出现的主题成为候选记忆,交由审批。捕获失败一律吞掉,插件绝不破坏宿主会话。
  • 后台维护:与 OpenClaw 宿主同一套强化 / 遗忘 / 巩固运行时,跑在当选的 dataRoot holder 上。
  • 进程锁共存:与 Claude Code(MCP)、OpenClaw、DeepSeek Harness 宿主共享同一 dataRoot。

安装

# 1. 幂等注册插件与 instructions 条目到 opencode.json
npx @co-engram/opencode setup

# 2. 首次使用需把 co-engram 指向数据仓(与其他宿主共享)
npm install -g @co-engram/claude-code   # 提供 `co-engram` CLI
co-engram config data-root $HOME/team-memory

# 3. 重启 opencode

setup CLI 会编辑 $XDG_CONFIG_HOME/opencode/opencode.json(XDG_CONFIG_HOME 未设时回退 ~/.config)(容忍 JSONC,不动既有字段):向 plugin 数组追加 "@co-engram/opencode"、向 instructions 数组追加生成的 instructions.md 路径,并写出首版 instructions 文件。重复执行安全——已存在的条目保持不变。可用 --config <path> 指定自定义配置路径。

pnpm add @co-engram/opencode

然后自行编辑 opencode 配置($XDG_CONFIG_HOME/opencode/opencode.json,XDG_CONFIG_HOME 未设时回退 ~/.config):

{
  "plugin": ["@co-engram/opencode"],
  "instructions": ["~/.config/opencode/co-engram/instructions.md"]
}

配置

没有插件私有配置文件——行为跟随 Co-Engram 共享配置面:

| 配置面 | 控制内容 | | --- | --- | | ~/.co-engram/config.json | dataRoot、维护与自进化参数(用 viewer 配置 tab 或 co-engram CLI 修改);全宿主共享 | | CO_ENGRAM_DATAROOT | 数据根目录的环境变量覆盖(优先于配置文件) | | CO_ENGRAM_LLM_BASE_URL / CO_ENGRAM_LLM_API_KEY / CO_ENGRAM_LLM_MODEL | 提案必要性评估与 REM 反思的 LLM 端点(兜底顺序:~/.co-engram/llm-config.json,再兜底规则版) | | CO_ENGRAM_VIEWER_PORT | viewer 端口覆盖(默认 18899) |

Viewer:网页 viewer 加载器已导出(startViewerForOpenCode,默认端口 18899,holder 门控),但尚未接入 startViewer 配置开关——待配置面引入该开关后激活。

能力矩阵

| 能力 | 状态 | | --- | --- | | 记忆工具(38+) | core registry 上的原生 tool() 桥,带 error boundary + signal sink 包装 | | 会话捕获 | message.part.updated / message.updated 缓冲,session.idle 时刷入提案引擎 | | prompt 注入 | 生成式 instructions.md,自动刷新 | | 维护周期 | 强化 / 遗忘 / 巩固,跑在当选 holder 上 | | 网页 viewer | 加载器已内置,待配置开关 |

与其他宿主的关系

@co-engram/opencode 是第四个宿主适配器,与 @co-engram/claude-code(MCP)、@co-engram/openclaw(插件 SDK)、@co-engram/dsh(Cordis)并列。四者共享同一 @co-engram/core 引擎与同一数据仓——任意组合使用,记忆通过进程锁保持同步。

许可证

MIT