omoclaw 2.2.2 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -225,9 +225,11 @@ function handleSessionStatusEvent(event, dedup, state, timers, webhookFn, debugL
|
|
|
225
225
|
state.transition(sessionID, "error");
|
|
226
226
|
timers.clearStaleTimer(sessionID);
|
|
227
227
|
const errorName = event.properties.error?.name ?? "UnknownError";
|
|
228
|
+
const errorMessage = event.properties.error?.data?.message ?? "";
|
|
229
|
+
const errorDetail = errorMessage ? `${errorName}: ${errorMessage.slice(0, 200)}` : errorName;
|
|
228
230
|
const dedupKey = `error:${sessionID}:${errorName}`;
|
|
229
231
|
if (dedup.shouldSend(dedupKey)) {
|
|
230
|
-
webhookFn(`[OpenCode] Error: ${
|
|
232
|
+
webhookFn(`[OpenCode] Error: ${errorDetail} (${shortSessionID2(sessionID)})`);
|
|
231
233
|
}
|
|
232
234
|
}
|
|
233
235
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omoclaw",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "OpenCode session monitor plugin
|
|
3
|
+
"version": "2.3.0",
|
|
4
|
+
"description": "OpenCode session monitor plugin \u2014 native event-driven webhook notifications for session state changes",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
@@ -33,4 +33,4 @@
|
|
|
33
33
|
"bun-types": "^1.3.6",
|
|
34
34
|
"typescript": "^5.7.3"
|
|
35
35
|
}
|
|
36
|
-
}
|
|
36
|
+
}
|