pumuki-ast-hooks 5.5.23 → 5.5.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pumuki-ast-hooks",
3
- "version": "5.5.23",
3
+ "version": "5.5.24",
4
4
  "description": "Enterprise-grade AST Intelligence System with multi-platform support (iOS, Android, Backend, Frontend) and Feature-First + DDD + Clean Architecture enforcement. Includes dynamic violations API for intelligent querying.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -391,15 +391,15 @@ function updateAIEvidence(violations, gateResult, tokenUsage) {
391
391
  fs.writeFileSync(evidencePath, JSON.stringify(evidence, null, 2));
392
392
  console.log('[Intelligent Audit] ✅ .AI_EVIDENCE.json updated with complete format (ai_gate, severity_metrics, token_usage, git_flow, watchers)');
393
393
 
394
- try {
395
- const gateStatus = evidence.ai_gate.status;
396
- const violationCount = evidence.severity_metrics.total_violations;
397
- const notifTitle = gateStatus === 'BLOCKED' ? '🚨 AI Gate BLOCKED' : '✅ Evidence Updated';
398
- const notifMsg = `Gate: ${gateStatus} | Violations: ${violationCount} | Tokens: ${tokenPercent}%`;
399
- execSync(`osascript -e 'display notification "${notifMsg}" with title "${notifTitle}" sound name "Glass"'`, { stdio: 'ignore' });
400
- } catch (notifErr) {
401
- // Silent fail for non-macOS
402
- }
394
+ const MacNotificationSender = require('../../application/services/notification/MacNotificationSender');
395
+ const notificationSender = new MacNotificationSender(null);
396
+ const gateStatus = evidence.ai_gate.status;
397
+ const violationCount = evidence.severity_metrics.total_violations;
398
+ const level = gateStatus === 'BLOCKED' ? 'error' : 'info';
399
+ const notifMsg = gateStatus === 'BLOCKED'
400
+ ? `AI Gate BLOCKED - ${violationCount} violations need fixing`
401
+ : `AI Evidence has been refreshed automatically`;
402
+ notificationSender.send({ message: notifMsg, level });
403
403
 
404
404
  } catch (evidenceFileUpdateError) {
405
405
  process.stderr.write(`[Intelligent Audit] ⚠️ Evidence update failed: ${toErrorMessage(evidenceFileUpdateError)}\n`);