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

@zlt110168/feishu-tool-live

v1.0.0

Published

OpenClaw 插件:将工具调用状态实时推送到飞书卡片,在同一张卡片上持续更新

Readme

feishu-tool-live

OpenClaw 插件:在飞书中用 一张实时更新的卡片 展示 Agent 的工具调用过程。

效果

┌──────────────────────────────────────────────┐
│  🤖 Agent 工作中                               │
│──────────────────────────────────────────────│
│  📋 工具调用状态                                │
│──────────────────────────────────────────────│
│  1. ✅ `web_search`          1.2s             │
│  2. ✅ `read_file`           0.3s             │
│  3. 🔧 `code_edit`          ⏳ 执行中...       │
│──────────────────────────────────────────────│
│  ⏳ 执行中...                                  │
└──────────────────────────────────────────────┘
  • 每次对话只生成 一张卡片
  • 工具调用时 实时追加新行 显示「🔧 执行中...」
  • 工具完成后 原地更新 为「✅ 完成 1.2s」或「❌ 失败」
  • 对话结束后关闭流式模式,显示汇总

安装

# 插件已在 ~/.openclaw/extensions/feishu-tool-live/ 目录下
# 只需在配置中启用即可

配置

~/.openclaw/openclaw.json 中添加:

{
  "plugins": {
    "feishu-tool-live": {
      "enabled": true,
      "showParams": false,
      "showResult": false,
      "ignoredTools": ["think"],
      "cardHeaderTitle": "🤖 Agent 工作中",
      "throttleMs": 150
    }
  }
}

配置项说明

| 配置项 | 类型 | 默认值 | 说明 | |--------|------|--------|------| | enabled | boolean | true | 是否启用 | | accountId | string | - | 飞书账号 ID(多账号时指定) | | showParams | boolean | false | 是否显示工具调用参数 | | showResult | boolean | false | 是否显示工具执行结果 | | ignoredTools | string[] | ["think"] | 不报告的工具列表 | | cardHeaderTitle | string | "🤖 Agent 工作中" | 卡片标题 | | throttleMs | number | 150 | 更新节流间隔(ms) |

前置条件

  1. 飞书扩展已安装且配置好 — 需要 appIdappSecret
  2. 飞书客户端 V7.20+ — Card JSON 2.0 需要此版本
  3. 应用权限 — 需要 im:message:send_as_botcardkit:card:write

工作原理

消息进入 → message_received hook → 记录 chatId
              ↓
首次工具调用 → before_tool_call hook → 创建流式卡片 + 追加「执行中」行
              ↓
工具完成 → after_tool_call hook → 原地更新为「完成/失败」
              ↓
对话结束 → agent_end hook → 关闭流式模式,显示汇总

使用的飞书 API:

| 操作 | API | 说明 | |------|-----|------| | 创建卡片 | POST /cardkit/v1/cards | streaming_mode: true | | 追加行 | POST /cardkit/v1/cards/{id}/elements | insert_before 锚点元素 | | 更新行 | PATCH /cardkit/v1/cards/{id}/elements/{eid} | partial_element | | 关闭卡片 | PATCH /cardkit/v1/cards/{id}/settings | streaming_mode: false |

设计特点

  • 独立插件 — 与飞书扩展完全解耦,飞书扩展升级不受影响
  • 延迟创建 — 只有实际发生工具调用时才创建卡片,无工具调用的对话无开销
  • 队列化 — 所有卡片操作串行执行,保证 sequence 递增
  • 节流 — 默认 150ms 间隔,不超过飞书 10次/秒 限制
  • fire-and-forget — before_tool_call 中的卡片操作不阻塞工具执行
  • 自动清理 — agent_end 时关闭卡片并释放状态

License

MIT