pi-smart-voice-notify 0.5.0 → 0.5.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.1] - 2026-05-26
4
+
5
+ ### Changed
6
+ - Suppressed error notifications when the agent has pending continuation messages.
7
+ - Widened peer dependency ranges to `^0.74.0 || ^0.75.0`.
8
+ - Aligned `@types/node` dev dependency to `25.9.1`.
9
+
3
10
  ## [0.5.0] - 2026-05-22
4
11
 
5
12
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-smart-voice-notify",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Windows-optimized smart voice, sound, and desktop notifications for Pi coding agent.",
5
5
  "type": "module",
6
6
  "main": "./index.ts",
@@ -61,14 +61,14 @@
61
61
  ]
62
62
  },
63
63
  "peerDependencies": {
64
- "@earendil-works/pi-coding-agent": "^0.75.4",
65
- "@earendil-works/pi-tui": "^0.75.4"
64
+ "@earendil-works/pi-coding-agent": "^0.74.0 || ^0.75.0",
65
+ "@earendil-works/pi-tui": "^0.74.0 || ^0.75.0"
66
66
  },
67
67
  "dependencies": {
68
68
  "node-notifier": "^10.0.1",
69
69
  "undici": "^8.3.0"
70
70
  },
71
71
  "devDependencies": {
72
- "@types/node": "20.17.57"
72
+ "@types/node": "25.9.1"
73
73
  }
74
74
  }
package/src/index.ts CHANGED
@@ -167,6 +167,14 @@ function formatAgentErrorNotification(reason: string | undefined): string {
167
167
  return `❌ Agent ended with an error: ${normalizedReason.slice(0, 160)}`;
168
168
  }
169
169
 
170
+ function hasPendingAgentMessages(ctx: ExtensionContext): boolean {
171
+ try {
172
+ return ctx.hasPendingMessages();
173
+ } catch {
174
+ return false;
175
+ }
176
+ }
177
+
170
178
  function statusLine(config: VoiceNotifyConfig): string | undefined {
171
179
  if (!config.enabled) {
172
180
  return "voice:off";
@@ -1312,6 +1320,14 @@ export default function smartVoiceNotifyExtension(
1312
1320
  if (!config.enabled || !config.enableErrorNotification) {
1313
1321
  return;
1314
1322
  }
1323
+ if (hasPendingAgentMessages(ctx)) {
1324
+ logger.debug("agent.error_notification.skipped", {
1325
+ reason: "pending_messages",
1326
+ errorReason: outcome.reason,
1327
+ stage: "schedule",
1328
+ });
1329
+ return;
1330
+ }
1315
1331
 
1316
1332
  const timeoutId = setTimeout(() => {
1317
1333
  if (pendingAgentErrorNotification !== timeoutId) {
@@ -1326,6 +1342,15 @@ export default function smartVoiceNotifyExtension(
1326
1342
  return;
1327
1343
  }
1328
1344
 
1345
+ if (hasPendingAgentMessages(ctx)) {
1346
+ logger.debug("agent.error_notification.skipped", {
1347
+ reason: "pending_messages",
1348
+ errorReason: outcome.reason,
1349
+ stage: "fire",
1350
+ });
1351
+ return;
1352
+ }
1353
+
1329
1354
  logger.debug("agent.error_notification.fired", {
1330
1355
  reason: outcome.reason,
1331
1356
  graceMs: agentErrorNotificationGraceMs,