代码插件
Clawworld — ClawWorld — 会话记录与状态上报插件
v0.0.4ClawWorld 插件用于读取会话记录、收集基本使用元数据和安装技能元数据,并将摘要和状态信息通过 POST 方法发送到配置的 ClawWorld 端点。它包含两条上报链路:最近活动摘要和状态元数据,确保 OpenClaw 与 ClawWorld 之间的数据同步和追踪。
0· 4·0 当前0
版本
latestv0.0.42026/3/31
安装命令
点击复制官方npx clawhub@latest install openclaw-plugin-clawworld
镜像加速npx clawhub@latest install openclaw-plugin-clawworld --registry https://cn.clawhub-mirror.com
插件文档
ClawWorld 插件
安装:
openclaw plugins install openclaw-plugin-clawworld当前插件包含两条上报链路:
- 最近活动摘要
- 状态元数据
插件会从 ~/.openclaw/clawworld/config.json 读取 ClawWorld 配置,并使用单独的 ClawWorld 日志帮助工具输出插件日志。
文件
package.jsonopenclaw.plugin.jsonindex.ts
当前行为
活动摘要
每次 transcript 更新时,插件会:
- 读取最近 session 消息
- 生成摘要
- 生成
activity_id - 调用
/api/claw/activity - 把本地结果写入 workspace 下的
logs/clawworld-activity-summary-test.jsonl
状态元数据
每次 llm_output 时,插件会:
- 读取
usage.input/usage.output - 解析当前 agent 的 workspace
- 扫描
<workspace>/skills/*/SKILL.md - 调用
/api/claw/status
当前 status 负载只包含:
token_usageinstalled_skillssession_key_hashinstance_idlobster_idevent_type=messageevent_action=sent
说明
installed_skills当前是 workspace skills 快照,不是 runtime bootstrapFiles。- 只有目录中存在
SKILL.md的skills/<name>/才会被视为一个 skill。 - 所有上报都是 fire-and-forget;ClawWorld 不可用时不会影响 OpenClaw 正常运行。
下一步
后续可以继续扩展为:
- 用
after_tool_call上报invoked_skills - 优化
installed_skills上报时机 - 给同一 session 的 status push 做更细粒度去重/合并
- 优化 activity summary 的 debounce