opencode-notification 0.0.1 → 0.0.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,eAAO,MAAM,wBAAwB,EAAE,MAyHtC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,eAAO,MAAM,wBAAwB,EAAE,MA+HtC,CAAC"}
package/dist/index.js CHANGED
@@ -236,7 +236,11 @@ var SimpleNotificationPlugin = async ({ client }) => {
236
236
  case "message.updated": {
237
237
  const info = event.properties.info;
238
238
  if (info.role === "user") {
239
- cancelForSession(info.sessionID);
239
+ const infoAny = info;
240
+ const isAutomaticMessage = infoAny.agent || infoAny.model;
241
+ if (!isAutomaticMessage) {
242
+ cancelForSession(info.sessionID);
243
+ }
240
244
  } else if (info.role === "assistant") {
241
245
  activeSessions.add(info.sessionID);
242
246
  }
@@ -246,7 +250,7 @@ var SimpleNotificationPlugin = async ({ client }) => {
246
250
  const status = event.properties.status;
247
251
  const sessionId = event.properties.sessionID;
248
252
  if (status.type === "busy") {
249
- cancelForSession(sessionId);
253
+ scheduler.cancelForSession(sessionId);
250
254
  }
251
255
  break;
252
256
  }
@@ -0,0 +1,9 @@
1
+ interface Logger {
2
+ debug: (message: string, extra?: Record<string, unknown>) => void;
3
+ info: (message: string, extra?: Record<string, unknown>) => void;
4
+ warn: (message: string, extra?: Record<string, unknown>) => void;
5
+ error: (message: string, extra?: Record<string, unknown>) => void;
6
+ }
7
+ export declare function createLogger(service: string): Logger;
8
+ export {};
9
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AACA,UAAU,MAAM;IACf,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IAClE,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACjE,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACjE,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CAClE;AAQD,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAsBpD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-notification",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "OpenCode plugin for simple system notifications when permissions are needed, generation completes, or errors occur",
5
5
  "keywords": [
6
6
  "notification",