pumuki-ast-hooks 5.3.7 → 5.3.8
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 +1 -1
- package/scripts/hooks-system/.AI_TOKEN_STATUS.txt +1 -1
- package/scripts/hooks-system/.audit-reports/notifications.log +8 -0
- package/scripts/hooks-system/.audit-reports/token-monitor.log +24 -0
- package/scripts/hooks-system/application/services/installation/GitEnvironmentService.js +80 -79
- package/scripts/hooks-system/application/services/installation/InstallService.js +12 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pumuki-ast-hooks",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.8",
|
|
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": {
|
|
@@ -528,3 +528,11 @@
|
|
|
528
528
|
{"timestamp":"2025-12-29T16:15:44.361Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"b013b103-7ea4-4f60-aebd-e9c0b4f21438","type":"token_ok"},"context":{}}
|
|
529
529
|
{"timestamp":"2025-12-29T16:18:44.475Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"adfff9a0-05b6-495e-ae81-38855a5dca1a","type":"token_ok"},"context":{}}
|
|
530
530
|
{"timestamp":"2025-12-29T16:21:44.578Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"c252550d-1535-4f24-be5f-fe09722460df","type":"token_ok"},"context":{}}
|
|
531
|
+
{"timestamp":"2025-12-29T16:24:44.692Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"06440138-fee0-484f-804c-dee11c93267f","type":"token_ok"},"context":{}}
|
|
532
|
+
{"timestamp":"2025-12-29T16:27:44.777Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"4d383913-396e-47d2-8e63-0fdc1065870c","type":"token_ok"},"context":{}}
|
|
533
|
+
{"timestamp":"2025-12-29T16:30:44.889Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"6107b078-cca4-4c2c-b81e-81ac891c5373","type":"token_ok"},"context":{}}
|
|
534
|
+
{"timestamp":"2025-12-29T16:33:45.003Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"e8722220-25f5-45a3-90ff-5f8d7a288d50","type":"token_ok"},"context":{}}
|
|
535
|
+
{"timestamp":"2025-12-29T16:36:45.100Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"57eedfdf-21d0-4371-970d-4baae6b3a1ce","type":"token_ok"},"context":{}}
|
|
536
|
+
{"timestamp":"2025-12-29T16:39:45.200Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"93142073-89d9-4c17-9152-6bf6ce181423","type":"token_ok"},"context":{}}
|
|
537
|
+
{"timestamp":"2025-12-29T16:42:45.315Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"3eea7b8e-8d7a-41c7-a6a2-a2576ca928d5","type":"token_ok"},"context":{}}
|
|
538
|
+
{"timestamp":"2025-12-29T16:45:45.428Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"4d18abda-f1d8-4f81-aeb5-f9a2d40b240f","type":"token_ok"},"context":{}}
|
|
@@ -1588,3 +1588,27 @@
|
|
|
1588
1588
|
{"timestamp":"2025-12-29T16:21:44.567Z","level":"debug","component":"TokenMonitor","event":"CURSOR_SERVICE_USING_FILE","data":{"usage":{"tokensUsed":0,"maxTokens":1000000,"percentUsed":72.36585,"timestamp":"2025-12-29T15:38:11.174Z","source":"file","untrusted":false}},"context":{}}
|
|
1589
1589
|
{"timestamp":"2025-12-29T16:21:44.568Z","level":"debug","component":"TokenMonitor","event":"TOKEN_MONITOR_METRICS","data":{"timestamp":"2025-12-29T15:38:11.174Z","tokensUsed":0,"maxTokens":1000000,"percentUsed":0,"remainingTokens":1000000,"level":"ok","source":"file","stale":true,"untrusted":false},"context":{}}
|
|
1590
1590
|
{"timestamp":"2025-12-29T16:21:44.579Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"ok","percentUsed":0,"tokensUsed":0,"maxTokens":1000000,"source":"file","stale":true,"untrusted":false},"context":{"message":"Result level=ok percent=0% used=0/1000000 source=file (stale)"}}
|
|
1591
|
+
{"timestamp":"2025-12-29T16:24:44.682Z","level":"debug","component":"TokenMonitor","event":"CURSOR_SERVICE_USING_FILE","data":{"usage":{"tokensUsed":0,"maxTokens":1000000,"percentUsed":72.36585,"timestamp":"2025-12-29T15:38:11.174Z","source":"file","untrusted":false}},"context":{}}
|
|
1592
|
+
{"timestamp":"2025-12-29T16:24:44.683Z","level":"debug","component":"TokenMonitor","event":"TOKEN_MONITOR_METRICS","data":{"timestamp":"2025-12-29T15:38:11.174Z","tokensUsed":0,"maxTokens":1000000,"percentUsed":0,"remainingTokens":1000000,"level":"ok","source":"file","stale":true,"untrusted":false},"context":{}}
|
|
1593
|
+
{"timestamp":"2025-12-29T16:24:44.692Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"ok","percentUsed":0,"tokensUsed":0,"maxTokens":1000000,"source":"file","stale":true,"untrusted":false},"context":{"message":"Result level=ok percent=0% used=0/1000000 source=file (stale)"}}
|
|
1594
|
+
{"timestamp":"2025-12-29T16:27:44.767Z","level":"debug","component":"TokenMonitor","event":"CURSOR_SERVICE_USING_FILE","data":{"usage":{"tokensUsed":0,"maxTokens":1000000,"percentUsed":72.36585,"timestamp":"2025-12-29T15:38:11.174Z","source":"file","untrusted":false}},"context":{}}
|
|
1595
|
+
{"timestamp":"2025-12-29T16:27:44.768Z","level":"debug","component":"TokenMonitor","event":"TOKEN_MONITOR_METRICS","data":{"timestamp":"2025-12-29T15:38:11.174Z","tokensUsed":0,"maxTokens":1000000,"percentUsed":0,"remainingTokens":1000000,"level":"ok","source":"file","stale":true,"untrusted":false},"context":{}}
|
|
1596
|
+
{"timestamp":"2025-12-29T16:27:44.777Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"ok","percentUsed":0,"tokensUsed":0,"maxTokens":1000000,"source":"file","stale":true,"untrusted":false},"context":{"message":"Result level=ok percent=0% used=0/1000000 source=file (stale)"}}
|
|
1597
|
+
{"timestamp":"2025-12-29T16:30:44.879Z","level":"debug","component":"TokenMonitor","event":"CURSOR_SERVICE_USING_FILE","data":{"usage":{"tokensUsed":0,"maxTokens":1000000,"percentUsed":72.36585,"timestamp":"2025-12-29T15:38:11.174Z","source":"file","untrusted":false}},"context":{}}
|
|
1598
|
+
{"timestamp":"2025-12-29T16:30:44.879Z","level":"debug","component":"TokenMonitor","event":"TOKEN_MONITOR_METRICS","data":{"timestamp":"2025-12-29T15:38:11.174Z","tokensUsed":0,"maxTokens":1000000,"percentUsed":0,"remainingTokens":1000000,"level":"ok","source":"file","stale":true,"untrusted":false},"context":{}}
|
|
1599
|
+
{"timestamp":"2025-12-29T16:30:44.890Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"ok","percentUsed":0,"tokensUsed":0,"maxTokens":1000000,"source":"file","stale":true,"untrusted":false},"context":{"message":"Result level=ok percent=0% used=0/1000000 source=file (stale)"}}
|
|
1600
|
+
{"timestamp":"2025-12-29T16:33:44.993Z","level":"debug","component":"TokenMonitor","event":"CURSOR_SERVICE_USING_FILE","data":{"usage":{"tokensUsed":0,"maxTokens":1000000,"percentUsed":72.36585,"timestamp":"2025-12-29T15:38:11.174Z","source":"file","untrusted":false}},"context":{}}
|
|
1601
|
+
{"timestamp":"2025-12-29T16:33:44.994Z","level":"debug","component":"TokenMonitor","event":"TOKEN_MONITOR_METRICS","data":{"timestamp":"2025-12-29T15:38:11.174Z","tokensUsed":0,"maxTokens":1000000,"percentUsed":0,"remainingTokens":1000000,"level":"ok","source":"file","stale":true,"untrusted":false},"context":{}}
|
|
1602
|
+
{"timestamp":"2025-12-29T16:33:45.003Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"ok","percentUsed":0,"tokensUsed":0,"maxTokens":1000000,"source":"file","stale":true,"untrusted":false},"context":{"message":"Result level=ok percent=0% used=0/1000000 source=file (stale)"}}
|
|
1603
|
+
{"timestamp":"2025-12-29T16:36:45.089Z","level":"debug","component":"TokenMonitor","event":"CURSOR_SERVICE_USING_FILE","data":{"usage":{"tokensUsed":0,"maxTokens":1000000,"percentUsed":72.36585,"timestamp":"2025-12-29T15:38:11.174Z","source":"file","untrusted":false}},"context":{}}
|
|
1604
|
+
{"timestamp":"2025-12-29T16:36:45.090Z","level":"debug","component":"TokenMonitor","event":"TOKEN_MONITOR_METRICS","data":{"timestamp":"2025-12-29T15:38:11.174Z","tokensUsed":0,"maxTokens":1000000,"percentUsed":0,"remainingTokens":1000000,"level":"ok","source":"file","stale":true,"untrusted":false},"context":{}}
|
|
1605
|
+
{"timestamp":"2025-12-29T16:36:45.100Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"ok","percentUsed":0,"tokensUsed":0,"maxTokens":1000000,"source":"file","stale":true,"untrusted":false},"context":{"message":"Result level=ok percent=0% used=0/1000000 source=file (stale)"}}
|
|
1606
|
+
{"timestamp":"2025-12-29T16:39:45.188Z","level":"debug","component":"TokenMonitor","event":"CURSOR_SERVICE_USING_FILE","data":{"usage":{"tokensUsed":0,"maxTokens":1000000,"percentUsed":72.36585,"timestamp":"2025-12-29T15:38:11.174Z","source":"file","untrusted":false}},"context":{}}
|
|
1607
|
+
{"timestamp":"2025-12-29T16:39:45.190Z","level":"debug","component":"TokenMonitor","event":"TOKEN_MONITOR_METRICS","data":{"timestamp":"2025-12-29T15:38:11.174Z","tokensUsed":0,"maxTokens":1000000,"percentUsed":0,"remainingTokens":1000000,"level":"ok","source":"file","stale":true,"untrusted":false},"context":{}}
|
|
1608
|
+
{"timestamp":"2025-12-29T16:39:45.200Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"ok","percentUsed":0,"tokensUsed":0,"maxTokens":1000000,"source":"file","stale":true,"untrusted":false},"context":{"message":"Result level=ok percent=0% used=0/1000000 source=file (stale)"}}
|
|
1609
|
+
{"timestamp":"2025-12-29T16:42:45.305Z","level":"debug","component":"TokenMonitor","event":"CURSOR_SERVICE_USING_FILE","data":{"usage":{"tokensUsed":0,"maxTokens":1000000,"percentUsed":72.36585,"timestamp":"2025-12-29T15:38:11.174Z","source":"file","untrusted":false}},"context":{}}
|
|
1610
|
+
{"timestamp":"2025-12-29T16:42:45.306Z","level":"debug","component":"TokenMonitor","event":"TOKEN_MONITOR_METRICS","data":{"timestamp":"2025-12-29T15:38:11.174Z","tokensUsed":0,"maxTokens":1000000,"percentUsed":0,"remainingTokens":1000000,"level":"ok","source":"file","stale":true,"untrusted":false},"context":{}}
|
|
1611
|
+
{"timestamp":"2025-12-29T16:42:45.315Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"ok","percentUsed":0,"tokensUsed":0,"maxTokens":1000000,"source":"file","stale":true,"untrusted":false},"context":{"message":"Result level=ok percent=0% used=0/1000000 source=file (stale)"}}
|
|
1612
|
+
{"timestamp":"2025-12-29T16:45:45.419Z","level":"debug","component":"TokenMonitor","event":"CURSOR_SERVICE_USING_FILE","data":{"usage":{"tokensUsed":0,"maxTokens":1000000,"percentUsed":72.36585,"timestamp":"2025-12-29T15:38:11.174Z","source":"file","untrusted":false}},"context":{}}
|
|
1613
|
+
{"timestamp":"2025-12-29T16:45:45.420Z","level":"debug","component":"TokenMonitor","event":"TOKEN_MONITOR_METRICS","data":{"timestamp":"2025-12-29T15:38:11.174Z","tokensUsed":0,"maxTokens":1000000,"percentUsed":0,"remainingTokens":1000000,"level":"ok","source":"file","stale":true,"untrusted":false},"context":{}}
|
|
1614
|
+
{"timestamp":"2025-12-29T16:45:45.429Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"ok","percentUsed":0,"tokensUsed":0,"maxTokens":1000000,"source":"file","stale":true,"untrusted":false},"context":{"message":"Result level=ok percent=0% used=0/1000000 source=file (stale)"}}
|
|
@@ -3,93 +3,94 @@ const path = require('path');
|
|
|
3
3
|
const { execSync, spawnSync } = require('child_process');
|
|
4
4
|
|
|
5
5
|
const COLORS = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
reset: '\x1b[0m',
|
|
7
|
+
blue: '\x1b[34m',
|
|
8
|
+
green: '\x1b[32m',
|
|
9
|
+
yellow: '\x1b[33m',
|
|
10
|
+
red: '\x1b[31m',
|
|
11
|
+
cyan: '\x1b[36m'
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
class GitEnvironmentService {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
constructor(targetRoot, version = 'unknown') {
|
|
16
|
+
this.targetRoot = targetRoot || process.cwd();
|
|
17
|
+
this.version = version;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
checkGitRepository() {
|
|
21
|
+
const gitDir = path.join(this.targetRoot, '.git');
|
|
22
|
+
if (!fs.existsSync(gitDir)) {
|
|
23
|
+
this.logError('❌ CRITICAL: Git repository not found!');
|
|
24
|
+
this.logWarning(' This library REQUIRES a Git repository to function properly.');
|
|
25
|
+
this.logInfo(' Please run: git init\n');
|
|
26
|
+
this.logWarning('⚠️ Without Git:');
|
|
27
|
+
this.logInfo(' • Pre-commit hooks cannot be installed');
|
|
28
|
+
this.logInfo(' • Git Flow automation will not work');
|
|
29
|
+
this.logInfo(' • Code analysis on commits is disabled\n');
|
|
30
|
+
return false;
|
|
17
31
|
}
|
|
18
32
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
try {
|
|
33
|
-
execSync('git rev-parse --show-toplevel', {
|
|
34
|
-
cwd: this.targetRoot,
|
|
35
|
-
stdio: 'ignore'
|
|
36
|
-
});
|
|
37
|
-
return true;
|
|
38
|
-
} catch (err) {
|
|
39
|
-
this.logError('❌ Git repository is not properly initialized!');
|
|
40
|
-
this.logWarning(' Found .git directory but git commands fail.');
|
|
41
|
-
this.logInfo(' Please ensure Git is installed and working.\n');
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
33
|
+
try {
|
|
34
|
+
execSync('git rev-parse --show-toplevel', {
|
|
35
|
+
cwd: this.targetRoot,
|
|
36
|
+
stdio: 'ignore'
|
|
37
|
+
});
|
|
38
|
+
return true;
|
|
39
|
+
} catch (err) {
|
|
40
|
+
this.logError('❌ Git repository is not properly initialized!');
|
|
41
|
+
this.logWarning(' Found .git directory but git commands fail.');
|
|
42
|
+
this.logInfo(' Please ensure Git is installed and working.\n');
|
|
43
|
+
return false;
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const block = '\n' + header + '\n' + patterns.join('\n') + '\n';
|
|
68
|
-
fs.appendFileSync(excludePath, block);
|
|
69
|
-
this.logSuccess(' ✅ Added artifact patterns to .git/info/exclude');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
ensureGitInfoExclude() {
|
|
48
|
+
const gitDir = path.join(this.targetRoot, '.git');
|
|
49
|
+
if (!fs.existsSync(gitDir)) return;
|
|
50
|
+
|
|
51
|
+
const excludePath = path.join(gitDir, 'info', 'exclude');
|
|
52
|
+
fs.mkdirSync(path.dirname(excludePath), { recursive: true });
|
|
53
|
+
|
|
54
|
+
const header = '# AST Intelligence Hooks (generated artifacts)';
|
|
55
|
+
const patterns = [
|
|
56
|
+
'.AI_TOKEN_STATUS.txt',
|
|
57
|
+
'.audit-reports/*.log',
|
|
58
|
+
'.realtime-guard.pid',
|
|
59
|
+
'.token-monitor-guard.pid'
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
let existing = '';
|
|
63
|
+
if (fs.existsSync(excludePath)) {
|
|
64
|
+
existing = fs.readFileSync(excludePath, 'utf8');
|
|
65
|
+
if (existing.includes(header)) return;
|
|
70
66
|
}
|
|
71
67
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
this.logError('✗ .git/hooks directory not found');
|
|
77
|
-
this.logWarning(' Git hooks cannot be installed without a valid Git repository.');
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
68
|
+
const block = '\n' + header + '\n' + patterns.join('\n') + '\n';
|
|
69
|
+
fs.appendFileSync(excludePath, block);
|
|
70
|
+
this.logSuccess(' ✅ Added artifact patterns to .git/info/exclude');
|
|
71
|
+
}
|
|
80
72
|
|
|
81
|
-
|
|
82
|
-
|
|
73
|
+
installGitHooks() {
|
|
74
|
+
const gitHooksDir = path.join(this.targetRoot, '.git/hooks');
|
|
83
75
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
76
|
+
if (!fs.existsSync(gitHooksDir)) {
|
|
77
|
+
this.logError('✗ .git/hooks directory not found');
|
|
78
|
+
this.logWarning(' Git hooks cannot be installed without a valid Git repository.');
|
|
79
|
+
return;
|
|
87
80
|
}
|
|
88
81
|
|
|
89
|
-
getPreCommitHookContent()
|
|
90
|
-
|
|
82
|
+
const preCommitHook = this.getPreCommitHookContent();
|
|
83
|
+
const preCommitPath = path.join(gitHooksDir, 'pre-commit');
|
|
84
|
+
|
|
85
|
+
fs.writeFileSync(preCommitPath, preCommitHook);
|
|
86
|
+
fs.chmodSync(preCommitPath, '755');
|
|
87
|
+
this.logSuccess(' ✅ Installed pre-commit hook');
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
getPreCommitHookContent() {
|
|
91
|
+
return `#!/bin/bash
|
|
91
92
|
# AST Intelligence Hooks - Pre-commit
|
|
92
|
-
# Auto-generated by
|
|
93
|
+
# Auto-generated by pumuki-ast-hooks v${this.version}
|
|
93
94
|
|
|
94
95
|
# Check for bypass
|
|
95
96
|
if [[ -n "\${GIT_BYPASS_HOOK}" ]]; then
|
|
@@ -155,12 +156,12 @@ fi
|
|
|
155
156
|
echo "⚠️ ast-intelligence-hooks not found"
|
|
156
157
|
exit 0
|
|
157
158
|
`;
|
|
158
|
-
|
|
159
|
+
}
|
|
159
160
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
logInfo(msg) { process.stdout.write(`${COLORS.cyan}${msg}${COLORS.reset}\n`); }
|
|
162
|
+
logSuccess(msg) { process.stdout.write(`${COLORS.green}${msg}${COLORS.reset}\n`); }
|
|
163
|
+
logWarning(msg) { process.stdout.write(`${COLORS.yellow}${msg}${COLORS.reset}\n`); }
|
|
164
|
+
logError(msg) { process.stdout.write(`${COLORS.red}${msg}${COLORS.reset}\n`); }
|
|
164
165
|
}
|
|
165
166
|
|
|
166
167
|
module.exports = GitEnvironmentService;
|
|
@@ -23,6 +23,15 @@ class InstallService {
|
|
|
23
23
|
// Assuming this script is located at scripts/hooks-system/application/services/installation/InstallService.js
|
|
24
24
|
this.hookSystemRoot = path.resolve(__dirname, '../../../');
|
|
25
25
|
|
|
26
|
+
// Read version dynamically from package.json
|
|
27
|
+
const packageJsonPath = path.resolve(this.hookSystemRoot, '../package.json');
|
|
28
|
+
try {
|
|
29
|
+
const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
30
|
+
this.version = pkg.version || 'unknown';
|
|
31
|
+
} catch {
|
|
32
|
+
this.version = 'unknown';
|
|
33
|
+
}
|
|
34
|
+
|
|
26
35
|
// Initialize Audit Logger
|
|
27
36
|
const auditLogPath = path.join(this.targetRoot, '.audit-reports', 'install.log');
|
|
28
37
|
if (!fs.existsSync(path.dirname(auditLogPath))) {
|
|
@@ -39,7 +48,7 @@ class InstallService {
|
|
|
39
48
|
}
|
|
40
49
|
});
|
|
41
50
|
|
|
42
|
-
this.gitService = new GitEnvironmentService(this.targetRoot);
|
|
51
|
+
this.gitService = new GitEnvironmentService(this.targetRoot, this.version);
|
|
43
52
|
this.platformService = new PlatformDetectorService(this.targetRoot);
|
|
44
53
|
this.fsInstaller = new FileSystemInstallerService(this.targetRoot, this.hookSystemRoot, this.logger);
|
|
45
54
|
this.configGenerator = new ConfigurationGeneratorService(this.targetRoot, this.hookSystemRoot);
|
|
@@ -98,10 +107,11 @@ class InstallService {
|
|
|
98
107
|
}
|
|
99
108
|
|
|
100
109
|
printHeader() {
|
|
110
|
+
const versionPadded = `v${this.version}`.padStart(24).padEnd(48);
|
|
101
111
|
process.stdout.write(`${COLORS.blue}
|
|
102
112
|
╔════════════════════════════════════════════════════════════════╗
|
|
103
113
|
║ AST Intelligence Hooks - Installation Wizard ║
|
|
104
|
-
║
|
|
114
|
+
║${versionPadded} ║
|
|
105
115
|
╚════════════════════════════════════════════════════════════════╝
|
|
106
116
|
${COLORS.reset}\n`);
|
|
107
117
|
}
|