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

openclaw-stepfun-service

v0.1.7

Published

OpenClaw plugin: 常驻 HTTP 服务(Express 示例),随 gateway 启停

Readme

下面是一套在本地调试这个插件的实用流程(已给项目加了 npm run dev,用 tsdown 监听源码并自动重新打包)。


1. 让 OpenClaw 加载你本地的包

任选其一:

A. npm link(适合反复改插件)

cd /Users/jyxc-dz-0100248/Desktop/dev/openclaw-stepfun-service
npm link
# 在装 openclaw 的目录(或你的测试项目)里:
npm link openclaw-stepfun-service

B. 配置里写本地路径(不改 node_modules)

在 OpenClaw 配置里增加 plugins.load.paths,指向插件根目录(含 package.json 和构建后的 index.mjs),例如:

{
  "plugins": {
    "load": {
      "paths": ["/Users/jyxc-dz-0100248/Desktop/dev/openclaw-stepfun-service"]
    },
    "entries": {
      "openclaw-stepfun-service": {
        "enabled": true,
        "config": { "port": 18790, "host": "127.0.0.1" }
      }
    }
  }
}

改完配置后执行 openclaw gateway restart(或停再起 gateway)。


2. 一边改代码一边编译

在项目目录开终端:

npm run dev

保存 index.ts / src/*.ts 时会自动重新生成 index.mjs
若你用的是 link 或 paths,gateway 进程会在下次加载时读到新文件;改插件代码后需要重启 gateway 才会重新 import 插件(Node 会缓存模块)。


3. 用断点调试(Node Inspector)

启动 gateway 时挂上调试端口,例如:

NODE_OPTIONS='--inspect=9229' openclaw gateway

在 Cursor / VS Code:Run and Debug → Attach to Node Process,端口填 9229;在 index.ts / src/http/server.tssrc/router/ 里下断点(需有 source map 或映射到 TS;若只停在打包后的 index.mjs 也可)。

也可用 --inspect-brk 在入口就停住,便于看启动路径。


4. 验证 HTTP 与日志

Gateway 起来后:

curl -s http://127.0.0.1:18790/health
curl -s http://127.0.0.1:18790/api/hello

gateway.log(一般在 ~/.openclaw/logs/gateway.log)里是否有 [stepfun-service] 相关日志。


5. 常见问题

| 现象 | 处理 | |------|------| | 改了代码没生效 | 确认 npm run dev 已生成新 index.mjs,并 重启 gateway | | 端口占用 | 改 plugins.entries...config.port 或环境变量 OPENCLAW_STEPFUN_SERVICE_PORT | | 插件未加载 | openclaw doctor 看插件/路径;检查 entriesenabled: trueload.paths |

如果你希望「只重启插件、不整网关」,OpenClaw 默认没有单独热重载插件,重启 gateway 是最稳的调试方式。