pumuki-ast-hooks 5.4.5 → 5.4.7
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 +2 -2
- package/scripts/hooks-system/application/services/AutonomousOrchestrator.js +2 -0
- package/scripts/hooks-system/application/services/ContextDetectionEngine.js +2 -0
- package/scripts/hooks-system/application/services/DynamicRulesLoader.js +3 -1
- package/scripts/hooks-system/application/services/GitFlowService.js +2 -0
- package/scripts/hooks-system/application/services/GitTreeState.js +1 -0
- package/scripts/hooks-system/application/services/HookSystemScheduler.js +2 -0
- package/scripts/hooks-system/application/services/IntelligentCommitAnalyzer.js +4 -1
- package/scripts/hooks-system/application/services/IntelligentGitTreeMonitor.js +2 -0
- package/scripts/hooks-system/application/services/PlatformAnalysisService.js +2 -0
- package/scripts/hooks-system/application/services/PlatformDetectionService.js +3 -1
- package/scripts/hooks-system/application/services/PlaybookRunner.js +3 -0
- package/scripts/hooks-system/application/services/PredictiveHookAdvisor.js +2 -0
- package/scripts/hooks-system/application/services/RealtimeGuardPlugin.js +2 -0
- package/scripts/hooks-system/application/services/SmartDirtyTreeAnalyzer.js +2 -0
- package/scripts/hooks-system/application/services/commit/CommitMessageGenerator.js +3 -1
- package/scripts/hooks-system/application/services/commit/FeatureDetector.js +5 -1
- package/scripts/hooks-system/application/services/evidence/EvidenceContextManager.js +2 -0
- package/scripts/hooks-system/application/services/guard/GuardAutoManagerService.js +1 -0
- package/scripts/hooks-system/application/services/guard/GuardConfig.js +3 -1
- package/scripts/hooks-system/application/services/guard/GuardEventLogger.js +2 -0
- package/scripts/hooks-system/application/services/guard/GuardHealthReminder.js +5 -1
- package/scripts/hooks-system/application/services/guard/GuardHeartbeatMonitor.js +2 -0
- package/scripts/hooks-system/application/services/guard/GuardLockManager.js +2 -0
- package/scripts/hooks-system/application/services/guard/GuardMonitorLoop.js +3 -1
- package/scripts/hooks-system/application/services/guard/GuardNotificationHandler.js +4 -0
- package/scripts/hooks-system/application/services/guard/GuardNotifier.js +3 -1
- package/scripts/hooks-system/application/services/guard/GuardProcessManager.js +2 -0
- package/scripts/hooks-system/application/services/guard/GuardRecoveryService.js +3 -0
- package/scripts/hooks-system/application/services/installation/ConfigurationGeneratorService.js +4 -0
- package/scripts/hooks-system/application/services/installation/FileSystemInstallerService.js +3 -0
- package/scripts/hooks-system/application/services/installation/GitEnvironmentService.js +3 -0
- package/scripts/hooks-system/application/services/installation/HookInstaller.js +4 -0
- package/scripts/hooks-system/application/services/installation/IdeIntegrationService.js +3 -0
- package/scripts/hooks-system/application/services/installation/InstallService.js +3 -0
- package/scripts/hooks-system/application/services/installation/McpConfigurator.js +1 -0
- package/scripts/hooks-system/application/services/installation/PlatformDetectorService.js +4 -0
- package/scripts/hooks-system/application/services/installation/VSCodeTaskConfigurator.js +4 -0
- package/scripts/hooks-system/application/services/logging/UnifiedLogger.js +2 -0
- package/scripts/hooks-system/application/services/monitoring/ActivityMonitor.js +2 -0
- package/scripts/hooks-system/application/services/monitoring/AstMonitor.js +2 -0
- package/scripts/hooks-system/application/services/monitoring/DevDocsMonitor.js +2 -0
- package/scripts/hooks-system/application/services/monitoring/EvidenceMonitor.js +2 -0
- package/scripts/hooks-system/application/services/monitoring/EvidenceMonitorService.js +1 -0
- package/scripts/hooks-system/application/services/monitoring/GitTreeMonitor.js +2 -0
- package/scripts/hooks-system/application/services/monitoring/GitTreeMonitorService.js +3 -0
- package/scripts/hooks-system/application/services/monitoring/HealthCheckService.js +2 -0
- package/scripts/hooks-system/application/services/monitoring/HeartbeatMonitorService.js +2 -0
- package/scripts/hooks-system/application/services/monitoring/TokenMonitor.js +2 -0
- package/scripts/hooks-system/application/services/notification/MacNotificationSender.js +2 -0
- package/scripts/hooks-system/application/services/notification/NotificationCenterService.js +2 -0
- package/scripts/hooks-system/application/services/notification/NotificationDispatcher.js +3 -0
- package/scripts/hooks-system/application/services/notification/components/NotificationCooldownManager.js +3 -0
- package/scripts/hooks-system/application/services/notification/components/NotificationDeduplicator.js +2 -0
- package/scripts/hooks-system/application/services/notification/components/NotificationQueue.js +3 -0
- package/scripts/hooks-system/application/services/notification/components/NotificationRetryExecutor.js +4 -0
- package/scripts/hooks-system/application/services/platform/PlatformHeuristics.js +2 -0
- package/scripts/hooks-system/application/services/recovery/AutoRecoveryManager.js +2 -0
- package/scripts/hooks-system/application/services/smart-commit/CommitMessageSuggester.js +4 -0
- package/scripts/hooks-system/application/services/smart-commit/FileContextGrouper.js +2 -0
- package/scripts/hooks-system/application/services/smart-commit/SmartCommitSummaryBuilder.js +6 -0
- package/scripts/hooks-system/application/services/token/CursorTokenService.js +3 -0
- package/scripts/hooks-system/application/services/token/TokenMetricsService.js +4 -0
- package/scripts/hooks-system/application/services/token/TokenMonitorService.js +1 -0
- package/scripts/hooks-system/application/services/token/TokenStatusReporter.js +2 -0
- package/scripts/hooks-system/application/state/HookSystemStateMachine.js +2 -0
- package/scripts/hooks-system/application/use-cases/AnalyzeCodebaseUseCase.js +2 -0
- package/scripts/hooks-system/application/use-cases/AnalyzeStagedFilesUseCase.js +2 -0
- package/scripts/hooks-system/application/use-cases/AutoExecuteAIStartUseCase.js +2 -0
- package/scripts/hooks-system/application/use-cases/BlockCommitUseCase.js +2 -0
- package/scripts/hooks-system/application/use-cases/GenerateAuditReportUseCase.js +3 -0
- package/scripts/hooks-system/bin/audit-library.js +5 -4
- package/scripts/hooks-system/bin/auto-fix-violations.js +1 -0
- package/scripts/hooks-system/bin/auto-restart-guards.js +3 -2
- package/scripts/hooks-system/bin/check-doc-drift.js +1 -0
- package/scripts/hooks-system/bin/check-version.js +26 -25
- package/scripts/hooks-system/bin/cli.js +1 -0
- package/scripts/hooks-system/bin/guard-auto-manager.js +1 -0
- package/scripts/hooks-system/bin/guard-supervisor.js +1 -0
- package/scripts/hooks-system/bin/hook-status.js +1 -0
- package/scripts/hooks-system/bin/install.js +1 -0
- package/scripts/hooks-system/bin/nightly-metrics-report.js +1 -0
- package/scripts/hooks-system/bin/plan-review.js +1 -0
- package/scripts/hooks-system/bin/predictive-hooks.js +1 -0
- package/scripts/hooks-system/bin/pumuki-audit.js +1 -0
- package/scripts/hooks-system/bin/pumuki-init.js +1 -0
- package/scripts/hooks-system/bin/pumuki-mcp.js +1 -0
- package/scripts/hooks-system/bin/pumuki-rules.js +1 -0
- package/scripts/hooks-system/bin/run-ast-adapter.js +2 -0
- package/scripts/hooks-system/bin/run-orchestrator.js +1 -0
- package/scripts/hooks-system/bin/run-playbook.js +1 -0
- package/scripts/hooks-system/bin/setup-eslint.js +1 -0
- package/scripts/hooks-system/bin/violations-api.js +1 -0
- package/scripts/hooks-system/bin/watch-hooks.js +1 -0
- package/scripts/hooks-system/domain/errors/index.js +2 -0
- package/scripts/hooks-system/domain/services/AuditAnalyzer.js +2 -0
- package/scripts/hooks-system/domain/services/AuditFilter.js +5 -0
- package/scripts/hooks-system/domain/services/AuditResultSerializer.js +5 -0
- package/scripts/hooks-system/domain/services/AuditScorer.js +6 -0
- package/scripts/hooks-system/infrastructure/adapters/AstAnalyzerAdapter.js +3 -0
- package/scripts/hooks-system/infrastructure/adapters/FileEvidenceAdapter.js +2 -0
- package/scripts/hooks-system/infrastructure/adapters/GitCliAdapter.js +4 -0
- package/scripts/hooks-system/infrastructure/adapters/GitCommandAdapter.js +4 -0
- package/scripts/hooks-system/infrastructure/adapters/GitHubCliAdapter.js +2 -0
- package/scripts/hooks-system/infrastructure/adapters/GitQueryAdapter.js +4 -0
- package/scripts/hooks-system/infrastructure/adapters/LegacyAnalyzerAdapter.js +2 -0
- package/scripts/hooks-system/infrastructure/adapters/MacOSNotificationAdapter.js +4 -0
- package/scripts/hooks-system/infrastructure/adapters/git/GitCommandRunner.js +2 -0
- package/scripts/hooks-system/infrastructure/adapters/git/GitCommandService.js +3 -0
- package/scripts/hooks-system/infrastructure/adapters/git/GitQueryService.js +3 -0
- package/scripts/hooks-system/infrastructure/ast/android/analyzers/AndroidASTIntelligentAnalyzer.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/android/analyzers/AndroidASTParser.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/android/analyzers/AndroidAnalysisOrchestrator.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/android/analyzers/AndroidArchitectureDetector.js +7 -5
- package/scripts/hooks-system/infrastructure/ast/android/analyzers/AndroidClassAnalyzer.js +3 -0
- package/scripts/hooks-system/infrastructure/ast/android/analyzers/AndroidForbiddenLiteralsAnalyzer.js +1 -0
- package/scripts/hooks-system/infrastructure/ast/android/analyzers/AndroidSOLIDAnalyzer.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/archive/ios-rules.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/archive/kotlin-analyzer.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/archive/kotlin-parser.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/archive/swift-analyzer.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/backend/analyzers/BackendArchitectureDetector.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/backend/analyzers/BackendPatternDetector.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/common/BDDTDDWorkflowRules.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/common/rules/BDDRules.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/common/rules/ImplementationRules.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/common/rules/TDDRules.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/common/rules/WorkflowRules.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/frontend/analyzers/FrontendArchitectureDetector.js +16 -14
- package/scripts/hooks-system/infrastructure/ast/frontend/analyzers/FrontendForbiddenLiteralsAnalyzer.js +5 -0
- package/scripts/hooks-system/infrastructure/ast/frontend/analyzers/FrontendSOLIDAnalyzer.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSASTIntelligentAnalyzer.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSArchitectureDetector.js +12 -10
- package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSArchitectureRules.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSCICDRules.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSEnterpriseAnalyzer.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSForbiddenLiteralsAnalyzer.js +1 -0
- package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSNetworkingAdvancedRules.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSPerformanceRules.js +3 -0
- package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSSPMRules.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSSwiftUIAdvancedRules.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSTestingAdvancedRules.js +2 -0
- package/scripts/hooks-system/infrastructure/ast/ios/native-bridge.js +1 -0
- package/scripts/hooks-system/infrastructure/ast/ios/parsers/SourceKittenParser.js +2 -0
- package/scripts/hooks-system/infrastructure/cli/install-wizard.js +1 -0
- package/scripts/hooks-system/infrastructure/mcp/ast-intelligence-automation.js +98 -42
- package/scripts/hooks-system/infrastructure/mcp/evidence-watcher.js +1 -0
- package/scripts/hooks-system/infrastructure/mcp/services/EvidenceService.js +4 -0
- package/scripts/hooks-system/infrastructure/mcp/services/McpProtocolHandler.js +2 -0
- package/scripts/hooks-system/infrastructure/orchestration/intelligent-audit.js +1 -1
- package/scripts/hooks-system/infrastructure/reporting/report-generator.js +4 -0
- package/scripts/hooks-system/infrastructure/reporting/severity-tracker.js +2 -0
- package/scripts/hooks-system/infrastructure/repositories/CursorTokenRepository.js +4 -0
- package/scripts/hooks-system/infrastructure/repositories/FileFindingsRepository.js +2 -0
- package/scripts/hooks-system/infrastructure/repositories/datasources/CursorApiDataSource.js +4 -0
- package/scripts/hooks-system/infrastructure/repositories/datasources/CursorFileDataSource.js +2 -0
- package/scripts/hooks-system/infrastructure/severity/context/context-builder.js +2 -0
- package/scripts/hooks-system/infrastructure/severity/policies/gate-policies.js +1 -0
- package/scripts/hooks-system/infrastructure/severity/severity-evaluator.js +2 -0
- package/scripts/hooks-system/infrastructure/telemetry/TelemetryService.js +2 -0
- package/scripts/hooks-system/infrastructure/telemetry/metrics-logger.js +2 -0
- package/scripts/hooks-system/infrastructure/utils/token-manager.js +2 -0
- package/scripts/hooks-system/infrastructure/validators/detect-commit-language.js +1 -0
- package/scripts/hooks-system/infrastructure/watchdog/auto-recovery.js +2 -1
- package/scripts/hooks-system/infrastructure/watchdog/health-check.js +2 -1
- package/scripts/hooks-system/infrastructure/watchdog/token-monitor.js +3 -1
|
@@ -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 SeverityTracker {
|
|
6
7
|
constructor(historyPath = '.audit_tmp/severity-history.jsonl') {
|
|
7
8
|
this.historyPath = historyPath;
|
|
9
|
+
this.auditLogger = new AuditLogger({ repoRoot: process.cwd() });
|
|
8
10
|
this.ensureHistoryFile();
|
|
9
11
|
}
|
|
10
12
|
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
const env = require('../../config/env');
|
|
2
|
+
const AuditLogger = require('../../application/services/logging/AuditLogger');
|
|
3
|
+
|
|
1
4
|
const path = require('path');
|
|
2
5
|
const ICursorTokenRepository = require('../../domain/repositories/ICursorTokenRepository');
|
|
3
6
|
const CursorApiDataSource = require('./datasources/CursorApiDataSource');
|
|
@@ -17,6 +20,7 @@ class CursorTokenRepository extends ICursorTokenRepository {
|
|
|
17
20
|
this.apiDataSource = new CursorApiDataSource({ apiUrl, apiToken, fetchImpl, logger });
|
|
18
21
|
this.fileDataSource = new CursorFileDataSource({ usageFile, logger });
|
|
19
22
|
this.logger = logger;
|
|
23
|
+
this.auditLogger = new AuditLogger({ repoRoot: process.cwd(), logger });
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
/**
|
|
@@ -4,6 +4,7 @@ const path = require('path');
|
|
|
4
4
|
const IFindingsRepository = require('../../domain/repositories/IFindingsRepository');
|
|
5
5
|
const Finding = require('../../domain/entities/Finding');
|
|
6
6
|
const AuditResult = require('../../domain/entities/AuditResult');
|
|
7
|
+
const AuditLogger = require('../../application/services/logging/AuditLogger');
|
|
7
8
|
|
|
8
9
|
class FileFindingsRepository extends IFindingsRepository {
|
|
9
10
|
constructor(basePath = '.audit_tmp') {
|
|
@@ -11,6 +12,7 @@ class FileFindingsRepository extends IFindingsRepository {
|
|
|
11
12
|
this.basePath = basePath;
|
|
12
13
|
this.findingsFile = path.join(basePath, 'findings.json');
|
|
13
14
|
this.auditResultFile = path.join(basePath, 'audit-result.json');
|
|
15
|
+
this.auditLogger = new AuditLogger({ repoRoot: process.cwd() });
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
async ensureDirectory() {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
const env = require('../../config/env');
|
|
2
|
+
const AuditLogger = require('../../application/services/logging/AuditLogger');
|
|
3
|
+
|
|
1
4
|
const { DomainError } = require('../../../domain/errors');
|
|
2
5
|
|
|
3
6
|
class CursorApiDataSource {
|
|
@@ -11,6 +14,7 @@ class CursorApiDataSource {
|
|
|
11
14
|
this.apiToken = apiToken;
|
|
12
15
|
this.fetch = fetchImpl;
|
|
13
16
|
this.logger = logger;
|
|
17
|
+
this.auditLogger = new AuditLogger({ repoRoot: process.cwd(), logger });
|
|
14
18
|
this.failureCount = 0;
|
|
15
19
|
this.failureThreshold = 5;
|
|
16
20
|
this.circuitOpenUntil = null;
|
package/scripts/hooks-system/infrastructure/repositories/datasources/CursorFileDataSource.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
|
+
const AuditLogger = require('../../application/services/logging/AuditLogger');
|
|
2
3
|
|
|
3
4
|
class CursorFileDataSource {
|
|
4
5
|
constructor({
|
|
@@ -9,6 +10,7 @@ class CursorFileDataSource {
|
|
|
9
10
|
this.usageFile = usageFile;
|
|
10
11
|
this.fs = fsModule;
|
|
11
12
|
this.logger = logger;
|
|
13
|
+
this.auditLogger = new AuditLogger({ repoRoot: process.cwd(), logger });
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
async readUsage() {
|
|
@@ -3,6 +3,7 @@ const { CodeClassificationAnalyzer } = require('./analyzers/CodeClassificationAn
|
|
|
3
3
|
const { ImpactAnalyzer } = require('./analyzers/ImpactAnalyzer');
|
|
4
4
|
const { SafetyAnalyzer } = require('./analyzers/SafetyAnalyzer');
|
|
5
5
|
const { DataAnalyzer } = require('./analyzers/DataAnalyzer');
|
|
6
|
+
const AuditLogger = require('../../../application/services/logging/AuditLogger');
|
|
6
7
|
|
|
7
8
|
class ContextBuilder {
|
|
8
9
|
constructor() {
|
|
@@ -10,6 +11,7 @@ class ContextBuilder {
|
|
|
10
11
|
this.impactAnalyzer = new ImpactAnalyzer();
|
|
11
12
|
this.safetyAnalyzer = new SafetyAnalyzer();
|
|
12
13
|
this.dataAnalyzer = new DataAnalyzer();
|
|
14
|
+
this.auditLogger = new AuditLogger({ repoRoot: process.cwd() });
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
/**
|
|
@@ -8,6 +8,7 @@ const { ContextBuilder } = require('./context/context-builder');
|
|
|
8
8
|
const RecommendationGenerator = require('./generators/RecommendationGenerator');
|
|
9
9
|
const ContextMultiplier = require('./scorers/ContextMultiplier');
|
|
10
10
|
const SeverityMapper = require('./mappers/SeverityMapper');
|
|
11
|
+
const AuditLogger = require('../../application/services/logging/AuditLogger');
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Main severity evaluator
|
|
@@ -22,6 +23,7 @@ class SeverityEvaluator {
|
|
|
22
23
|
this.contextBuilder = new ContextBuilder();
|
|
23
24
|
this.recommendationGenerator = new RecommendationGenerator();
|
|
24
25
|
this.contextMultiplier = new ContextMultiplier();
|
|
26
|
+
this.auditLogger = new AuditLogger({ repoRoot: process.cwd() });
|
|
25
27
|
|
|
26
28
|
this.weights = {
|
|
27
29
|
security: 0.40,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
2
|
const path = require('path');
|
|
3
|
+
const AuditLogger = require('../../application/services/logging/AuditLogger');
|
|
3
4
|
|
|
4
5
|
class TelemetryService {
|
|
5
6
|
constructor(repoRoot) {
|
|
6
7
|
this.repoRoot = repoRoot || process.cwd();
|
|
8
|
+
this.auditLogger = new AuditLogger({ repoRoot: this.repoRoot });
|
|
7
9
|
this.logFile = path.join(this.repoRoot, '.audit_tmp/autonomous-decisions.jsonl');
|
|
8
10
|
this.thresholds = {
|
|
9
11
|
autoExecute: 90,
|
|
@@ -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,12 +1,13 @@
|
|
|
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');
|
|
6
7
|
const NotificationCenterService = require('../../application/services/notification/NotificationCenterService');
|
|
7
8
|
const { AutoRecoveryManager } = require('../../application/services/recovery/AutoRecoveryManager');
|
|
8
9
|
|
|
9
|
-
const repoRoot =
|
|
10
|
+
const repoRoot = env.get('HOOKS_REPO_ROOT') ? path.resolve(env.get('HOOKS_REPO_ROOT')) : process.cwd();
|
|
10
11
|
const logger = createUnifiedLogger({
|
|
11
12
|
repoRoot,
|
|
12
13
|
component: 'AutoRecovery',
|
|
@@ -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');
|
|
@@ -9,7 +10,7 @@ const path = require('path');
|
|
|
9
10
|
|
|
10
11
|
async function runHealthCheck({ repoRoot = null } = {}) {
|
|
11
12
|
const resolvedRepoRoot = repoRoot
|
|
12
|
-
|| (
|
|
13
|
+
|| (env.get('HOOKS_REPO_ROOT') ? path.resolve(env.get('HOOKS_REPO_ROOT')) : null)
|
|
13
14
|
|| process.cwd();
|
|
14
15
|
|
|
15
16
|
const logger = createUnifiedLogger({
|
|
@@ -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');
|
|
@@ -10,7 +12,7 @@ async function runTokenMonitor({
|
|
|
10
12
|
logger = null,
|
|
11
13
|
service = null
|
|
12
14
|
} = {}) {
|
|
13
|
-
const envRoot =
|
|
15
|
+
const envRoot = env.get('HOOKS_REPO_ROOT') ? path.resolve(env.get('HOOKS_REPO_ROOT')) : null;
|
|
14
16
|
const resolvedRepoRoot = repoRoot || envRoot || path.resolve(__dirname, '../..');
|
|
15
17
|
|
|
16
18
|
const resolvedNotificationCenter = notificationCenter || new NotificationCenterService({
|