fix: production deployment issues
1. session-monitor: handle timestamp-prefixed transcript filenames
OpenClaw uses {ISO}_{sessionId}.jsonl — glob for *_{sessionId}.jsonl
when direct path doesn't exist.
2. session-monitor: skip stale sessions (>5min since last transcript write)
Prevents creating status boxes for every old session in sessions.json.
3. status-watcher: parse actual OpenClaw JSONL transcript format
Records are {type:'message', message:{role,content:[{type,name,...}]}}
not {type:'tool_call', name}. Now shows live tool calls with arguments
and assistant thinking text.
4. handler.js: fix module.exports for OpenClaw hook loader
Expects default export (function), not {handle: function}.
5. HOOK.md: add YAML frontmatter metadata for hook discovery.
This commit is contained in:
@@ -99,4 +99,6 @@ async function handle(_event) {
|
||||
spawnWatcher();
|
||||
}
|
||||
|
||||
module.exports = { handle };
|
||||
// OpenClaw hook loader expects a default export
|
||||
module.exports = handle;
|
||||
module.exports.default = handle;
|
||||
|
||||
Reference in New Issue
Block a user