pumuki-ast-hooks 5.4.5 → 5.4.6

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 (164) hide show
  1. package/package.json +2 -2
  2. package/scripts/hooks-system/application/services/AutonomousOrchestrator.js +2 -0
  3. package/scripts/hooks-system/application/services/ContextDetectionEngine.js +2 -0
  4. package/scripts/hooks-system/application/services/DynamicRulesLoader.js +3 -1
  5. package/scripts/hooks-system/application/services/GitFlowService.js +2 -0
  6. package/scripts/hooks-system/application/services/GitTreeState.js +1 -0
  7. package/scripts/hooks-system/application/services/HookSystemScheduler.js +2 -0
  8. package/scripts/hooks-system/application/services/IntelligentCommitAnalyzer.js +4 -1
  9. package/scripts/hooks-system/application/services/IntelligentGitTreeMonitor.js +2 -0
  10. package/scripts/hooks-system/application/services/PlatformAnalysisService.js +2 -0
  11. package/scripts/hooks-system/application/services/PlatformDetectionService.js +3 -1
  12. package/scripts/hooks-system/application/services/PlaybookRunner.js +3 -0
  13. package/scripts/hooks-system/application/services/PredictiveHookAdvisor.js +2 -0
  14. package/scripts/hooks-system/application/services/RealtimeGuardPlugin.js +2 -0
  15. package/scripts/hooks-system/application/services/SmartDirtyTreeAnalyzer.js +2 -0
  16. package/scripts/hooks-system/application/services/commit/CommitMessageGenerator.js +3 -1
  17. package/scripts/hooks-system/application/services/commit/FeatureDetector.js +5 -1
  18. package/scripts/hooks-system/application/services/evidence/EvidenceContextManager.js +1 -0
  19. package/scripts/hooks-system/application/services/guard/GuardAutoManagerService.js +1 -0
  20. package/scripts/hooks-system/application/services/guard/GuardConfig.js +3 -1
  21. package/scripts/hooks-system/application/services/guard/GuardEventLogger.js +2 -0
  22. package/scripts/hooks-system/application/services/guard/GuardHealthReminder.js +5 -1
  23. package/scripts/hooks-system/application/services/guard/GuardHeartbeatMonitor.js +2 -0
  24. package/scripts/hooks-system/application/services/guard/GuardLockManager.js +2 -0
  25. package/scripts/hooks-system/application/services/guard/GuardMonitorLoop.js +3 -1
  26. package/scripts/hooks-system/application/services/guard/GuardNotificationHandler.js +4 -0
  27. package/scripts/hooks-system/application/services/guard/GuardNotifier.js +3 -1
  28. package/scripts/hooks-system/application/services/guard/GuardProcessManager.js +2 -0
  29. package/scripts/hooks-system/application/services/guard/GuardRecoveryService.js +3 -0
  30. package/scripts/hooks-system/application/services/installation/ConfigurationGeneratorService.js +4 -0
  31. package/scripts/hooks-system/application/services/installation/FileSystemInstallerService.js +3 -0
  32. package/scripts/hooks-system/application/services/installation/GitEnvironmentService.js +3 -0
  33. package/scripts/hooks-system/application/services/installation/HookInstaller.js +4 -0
  34. package/scripts/hooks-system/application/services/installation/IdeIntegrationService.js +3 -0
  35. package/scripts/hooks-system/application/services/installation/InstallService.js +3 -0
  36. package/scripts/hooks-system/application/services/installation/McpConfigurator.js +1 -0
  37. package/scripts/hooks-system/application/services/installation/PlatformDetectorService.js +4 -0
  38. package/scripts/hooks-system/application/services/installation/VSCodeTaskConfigurator.js +4 -0
  39. package/scripts/hooks-system/application/services/logging/UnifiedLogger.js +2 -0
  40. package/scripts/hooks-system/application/services/monitoring/ActivityMonitor.js +2 -0
  41. package/scripts/hooks-system/application/services/monitoring/AstMonitor.js +2 -0
  42. package/scripts/hooks-system/application/services/monitoring/DevDocsMonitor.js +2 -0
  43. package/scripts/hooks-system/application/services/monitoring/EvidenceMonitor.js +2 -0
  44. package/scripts/hooks-system/application/services/monitoring/EvidenceMonitorService.js +1 -0
  45. package/scripts/hooks-system/application/services/monitoring/GitTreeMonitor.js +2 -0
  46. package/scripts/hooks-system/application/services/monitoring/GitTreeMonitorService.js +3 -0
  47. package/scripts/hooks-system/application/services/monitoring/HealthCheckService.js +2 -0
  48. package/scripts/hooks-system/application/services/monitoring/HeartbeatMonitorService.js +2 -0
  49. package/scripts/hooks-system/application/services/monitoring/TokenMonitor.js +2 -0
  50. package/scripts/hooks-system/application/services/notification/MacNotificationSender.js +2 -0
  51. package/scripts/hooks-system/application/services/notification/NotificationCenterService.js +2 -0
  52. package/scripts/hooks-system/application/services/notification/NotificationDispatcher.js +3 -0
  53. package/scripts/hooks-system/application/services/notification/components/NotificationCooldownManager.js +3 -0
  54. package/scripts/hooks-system/application/services/notification/components/NotificationDeduplicator.js +2 -0
  55. package/scripts/hooks-system/application/services/notification/components/NotificationQueue.js +3 -0
  56. package/scripts/hooks-system/application/services/notification/components/NotificationRetryExecutor.js +4 -0
  57. package/scripts/hooks-system/application/services/platform/PlatformHeuristics.js +2 -0
  58. package/scripts/hooks-system/application/services/recovery/AutoRecoveryManager.js +2 -0
  59. package/scripts/hooks-system/application/services/smart-commit/CommitMessageSuggester.js +4 -0
  60. package/scripts/hooks-system/application/services/smart-commit/FileContextGrouper.js +2 -0
  61. package/scripts/hooks-system/application/services/smart-commit/SmartCommitSummaryBuilder.js +6 -0
  62. package/scripts/hooks-system/application/services/token/CursorTokenService.js +1 -0
  63. package/scripts/hooks-system/application/services/token/TokenMetricsService.js +4 -0
  64. package/scripts/hooks-system/application/services/token/TokenMonitorService.js +1 -0
  65. package/scripts/hooks-system/application/services/token/TokenStatusReporter.js +2 -0
  66. package/scripts/hooks-system/application/state/HookSystemStateMachine.js +2 -0
  67. package/scripts/hooks-system/application/use-cases/AnalyzeCodebaseUseCase.js +2 -0
  68. package/scripts/hooks-system/application/use-cases/AnalyzeStagedFilesUseCase.js +2 -0
  69. package/scripts/hooks-system/application/use-cases/AutoExecuteAIStartUseCase.js +2 -0
  70. package/scripts/hooks-system/application/use-cases/BlockCommitUseCase.js +2 -0
  71. package/scripts/hooks-system/application/use-cases/GenerateAuditReportUseCase.js +3 -0
  72. package/scripts/hooks-system/bin/audit-library.js +5 -4
  73. package/scripts/hooks-system/bin/auto-fix-violations.js +1 -0
  74. package/scripts/hooks-system/bin/auto-restart-guards.js +3 -2
  75. package/scripts/hooks-system/bin/check-doc-drift.js +1 -0
  76. package/scripts/hooks-system/bin/check-version.js +26 -25
  77. package/scripts/hooks-system/bin/cli.js +1 -0
  78. package/scripts/hooks-system/bin/guard-auto-manager.js +1 -0
  79. package/scripts/hooks-system/bin/guard-supervisor.js +1 -0
  80. package/scripts/hooks-system/bin/hook-status.js +1 -0
  81. package/scripts/hooks-system/bin/install.js +1 -0
  82. package/scripts/hooks-system/bin/nightly-metrics-report.js +1 -0
  83. package/scripts/hooks-system/bin/plan-review.js +1 -0
  84. package/scripts/hooks-system/bin/predictive-hooks.js +1 -0
  85. package/scripts/hooks-system/bin/pumuki-audit.js +1 -0
  86. package/scripts/hooks-system/bin/pumuki-init.js +1 -0
  87. package/scripts/hooks-system/bin/pumuki-mcp.js +1 -0
  88. package/scripts/hooks-system/bin/pumuki-rules.js +1 -0
  89. package/scripts/hooks-system/bin/run-ast-adapter.js +2 -0
  90. package/scripts/hooks-system/bin/run-orchestrator.js +1 -0
  91. package/scripts/hooks-system/bin/run-playbook.js +1 -0
  92. package/scripts/hooks-system/bin/setup-eslint.js +1 -0
  93. package/scripts/hooks-system/bin/violations-api.js +1 -0
  94. package/scripts/hooks-system/bin/watch-hooks.js +1 -0
  95. package/scripts/hooks-system/domain/errors/index.js +2 -0
  96. package/scripts/hooks-system/domain/services/AuditAnalyzer.js +2 -0
  97. package/scripts/hooks-system/domain/services/AuditFilter.js +5 -0
  98. package/scripts/hooks-system/domain/services/AuditResultSerializer.js +5 -0
  99. package/scripts/hooks-system/domain/services/AuditScorer.js +6 -0
  100. package/scripts/hooks-system/infrastructure/adapters/AstAnalyzerAdapter.js +3 -0
  101. package/scripts/hooks-system/infrastructure/adapters/FileEvidenceAdapter.js +2 -0
  102. package/scripts/hooks-system/infrastructure/adapters/GitCliAdapter.js +4 -0
  103. package/scripts/hooks-system/infrastructure/adapters/GitCommandAdapter.js +4 -0
  104. package/scripts/hooks-system/infrastructure/adapters/GitHubCliAdapter.js +2 -0
  105. package/scripts/hooks-system/infrastructure/adapters/GitQueryAdapter.js +4 -0
  106. package/scripts/hooks-system/infrastructure/adapters/LegacyAnalyzerAdapter.js +2 -0
  107. package/scripts/hooks-system/infrastructure/adapters/MacOSNotificationAdapter.js +4 -0
  108. package/scripts/hooks-system/infrastructure/adapters/git/GitCommandRunner.js +2 -0
  109. package/scripts/hooks-system/infrastructure/adapters/git/GitCommandService.js +3 -0
  110. package/scripts/hooks-system/infrastructure/adapters/git/GitQueryService.js +3 -0
  111. package/scripts/hooks-system/infrastructure/ast/android/analyzers/AndroidASTIntelligentAnalyzer.js +2 -0
  112. package/scripts/hooks-system/infrastructure/ast/android/analyzers/AndroidASTParser.js +2 -0
  113. package/scripts/hooks-system/infrastructure/ast/android/analyzers/AndroidAnalysisOrchestrator.js +2 -0
  114. package/scripts/hooks-system/infrastructure/ast/android/analyzers/AndroidArchitectureDetector.js +7 -5
  115. package/scripts/hooks-system/infrastructure/ast/android/analyzers/AndroidClassAnalyzer.js +3 -0
  116. package/scripts/hooks-system/infrastructure/ast/android/analyzers/AndroidForbiddenLiteralsAnalyzer.js +1 -0
  117. package/scripts/hooks-system/infrastructure/ast/android/analyzers/AndroidSOLIDAnalyzer.js +2 -0
  118. package/scripts/hooks-system/infrastructure/ast/archive/ios-rules.js +2 -0
  119. package/scripts/hooks-system/infrastructure/ast/archive/kotlin-analyzer.js +2 -0
  120. package/scripts/hooks-system/infrastructure/ast/archive/kotlin-parser.js +2 -0
  121. package/scripts/hooks-system/infrastructure/ast/archive/swift-analyzer.js +2 -0
  122. package/scripts/hooks-system/infrastructure/ast/backend/analyzers/BackendArchitectureDetector.js +2 -0
  123. package/scripts/hooks-system/infrastructure/ast/backend/analyzers/BackendPatternDetector.js +2 -0
  124. package/scripts/hooks-system/infrastructure/ast/common/BDDTDDWorkflowRules.js +2 -0
  125. package/scripts/hooks-system/infrastructure/ast/common/rules/BDDRules.js +2 -0
  126. package/scripts/hooks-system/infrastructure/ast/common/rules/ImplementationRules.js +2 -0
  127. package/scripts/hooks-system/infrastructure/ast/common/rules/TDDRules.js +2 -0
  128. package/scripts/hooks-system/infrastructure/ast/common/rules/WorkflowRules.js +2 -0
  129. package/scripts/hooks-system/infrastructure/ast/frontend/analyzers/FrontendArchitectureDetector.js +16 -14
  130. package/scripts/hooks-system/infrastructure/ast/frontend/analyzers/FrontendForbiddenLiteralsAnalyzer.js +5 -0
  131. package/scripts/hooks-system/infrastructure/ast/frontend/analyzers/FrontendSOLIDAnalyzer.js +2 -0
  132. package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSASTIntelligentAnalyzer.js +2 -0
  133. package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSArchitectureDetector.js +12 -10
  134. package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSArchitectureRules.js +2 -0
  135. package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSCICDRules.js +2 -0
  136. package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSEnterpriseAnalyzer.js +2 -0
  137. package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSForbiddenLiteralsAnalyzer.js +1 -0
  138. package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSNetworkingAdvancedRules.js +2 -0
  139. package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSPerformanceRules.js +3 -0
  140. package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSSPMRules.js +2 -0
  141. package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSSwiftUIAdvancedRules.js +2 -0
  142. package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSTestingAdvancedRules.js +2 -0
  143. package/scripts/hooks-system/infrastructure/ast/ios/native-bridge.js +1 -0
  144. package/scripts/hooks-system/infrastructure/ast/ios/parsers/SourceKittenParser.js +2 -0
  145. package/scripts/hooks-system/infrastructure/cli/install-wizard.js +1 -0
  146. package/scripts/hooks-system/infrastructure/mcp/ast-intelligence-automation.js +96 -41
  147. package/scripts/hooks-system/infrastructure/mcp/evidence-watcher.js +1 -0
  148. package/scripts/hooks-system/infrastructure/mcp/services/EvidenceService.js +4 -0
  149. package/scripts/hooks-system/infrastructure/mcp/services/McpProtocolHandler.js +2 -0
  150. package/scripts/hooks-system/infrastructure/orchestration/intelligent-audit.js +1 -1
  151. package/scripts/hooks-system/infrastructure/reporting/report-generator.js +2 -0
  152. package/scripts/hooks-system/infrastructure/repositories/CursorTokenRepository.js +4 -0
  153. package/scripts/hooks-system/infrastructure/repositories/FileFindingsRepository.js +2 -0
  154. package/scripts/hooks-system/infrastructure/repositories/datasources/CursorApiDataSource.js +4 -0
  155. package/scripts/hooks-system/infrastructure/repositories/datasources/CursorFileDataSource.js +2 -0
  156. package/scripts/hooks-system/infrastructure/severity/policies/gate-policies.js +1 -0
  157. package/scripts/hooks-system/infrastructure/severity/severity-evaluator.js +2 -0
  158. package/scripts/hooks-system/infrastructure/telemetry/TelemetryService.js +2 -0
  159. package/scripts/hooks-system/infrastructure/telemetry/metrics-logger.js +2 -0
  160. package/scripts/hooks-system/infrastructure/utils/token-manager.js +2 -0
  161. package/scripts/hooks-system/infrastructure/validators/detect-commit-language.js +1 -0
  162. package/scripts/hooks-system/infrastructure/watchdog/auto-recovery.js +1 -0
  163. package/scripts/hooks-system/infrastructure/watchdog/health-check.js +1 -0
  164. package/scripts/hooks-system/infrastructure/watchdog/token-monitor.js +2 -0
@@ -1,10 +1,12 @@
1
1
 
2
2
  const fs = require('fs');
3
3
  const path = require('path');
4
+ const AuditLogger = require('../../application/services/logging/AuditLogger');
4
5
 
5
6
  class TokenManager {
6
7
  constructor() {
7
8
  this.limit = 1000000;
9
+ this.auditLogger = new AuditLogger({ repoRoot: process.cwd() });
8
10
  this.warningThresholds = [
9
11
  { percent: 75, level: 'INFO' },
10
12
  { percent: 85, level: 'WARNING' },
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
 
4
+ const env = require('../../config/env');
4
5
  const fs = require('fs');
5
6
 
6
7
  const COMMON_ENGLISH_WORDS = new Set([
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ const env = require('../../config/env');
3
4
  const path = require('path');
4
5
 
5
6
  const { createUnifiedLogger } = require('../logging/UnifiedLoggerFactory');
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ const env = require('../../config/env');
3
4
  const { createUnifiedLogger } = require('../logging/UnifiedLoggerFactory');
4
5
  const NotificationCenterService = require('../../application/services/notification/NotificationCenterService');
5
6
  const { HealthCheckService } = require('../../application/services/monitoring/HealthCheckService');
@@ -1,3 +1,5 @@
1
+ const env = require('../../config/env');
2
+
1
3
  const path = require('path');
2
4
 
3
5
  const NotificationCenterService = require('../../application/services/notification/NotificationCenterService');