@gonzih/cc-discord 0.2.21 → 0.2.22

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.
Files changed (2) hide show
  1. package/dist/notifier.js +4 -3
  2. package/package.json +1 -1
package/dist/notifier.js CHANGED
@@ -83,6 +83,9 @@ function shortenModelName(model, driver) {
83
83
  * Appends " cost: $X.XXX" if a numeric cost field is present.
84
84
  */
85
85
  export function parseNotification(raw) {
86
+ // Filter cron-fire noise before any parsing — catches plain-text and JSON-wrapped ⏰ cron notifications
87
+ if (raw.startsWith("⏰") || raw.includes('"⏰'))
88
+ return null;
86
89
  let text = raw;
87
90
  let driver;
88
91
  let model;
@@ -109,10 +112,8 @@ export function parseNotification(raw) {
109
112
  isCron = parsed.is_cron;
110
113
  }
111
114
  catch {
112
- // non-JSON: fall through to text-based check below
115
+ // non-JSON: fall through
113
116
  }
114
- if (text.startsWith("⏰"))
115
- return null;
116
117
  // Parse eval_report if present — this field is non-standard and not in NotificationPayload type
117
118
  const evalReport = parseEvalReport(raw);
118
119
  if (!driver)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gonzih/cc-discord",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "description": "Claude Code Discord bot — chat with Claude Code via Discord",
5
5
  "type": "module",
6
6
  "bin": {