pumuki-ast-hooks 5.3.8 → 5.3.9
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 +3 -0
- package/scripts/hooks-system/.audit-reports/token-monitor.log +9 -0
- package/scripts/hooks-system/application/services/installation/InstallService.js +26 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pumuki-ast-hooks",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.9",
|
|
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": {
|
|
@@ -536,3 +536,6 @@
|
|
|
536
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
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
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":{}}
|
|
539
|
+
{"timestamp":"2025-12-29T16:48:45.542Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"315a9c24-5286-4c13-90fb-1829cdbd7c1e","type":"token_ok"},"context":{}}
|
|
540
|
+
{"timestamp":"2025-12-29T16:51:45.639Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"ea1c7893-f0fc-44ef-9eae-8fac90c0d799","type":"token_ok"},"context":{}}
|
|
541
|
+
{"timestamp":"2025-12-29T16:54:45.753Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"21b34efc-bec0-4a61-9aeb-8cd5c0fa8697","type":"token_ok"},"context":{}}
|
|
@@ -1612,3 +1612,12 @@
|
|
|
1612
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
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
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)"}}
|
|
1615
|
+
{"timestamp":"2025-12-29T16:48:45.531Z","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":{}}
|
|
1616
|
+
{"timestamp":"2025-12-29T16:48:45.533Z","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":{}}
|
|
1617
|
+
{"timestamp":"2025-12-29T16:48:45.542Z","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)"}}
|
|
1618
|
+
{"timestamp":"2025-12-29T16:51:45.629Z","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":{}}
|
|
1619
|
+
{"timestamp":"2025-12-29T16:51:45.630Z","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":{}}
|
|
1620
|
+
{"timestamp":"2025-12-29T16:51:45.639Z","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)"}}
|
|
1621
|
+
{"timestamp":"2025-12-29T16:54:45.742Z","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":{}}
|
|
1622
|
+
{"timestamp":"2025-12-29T16:54:45.743Z","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":{}}
|
|
1623
|
+
{"timestamp":"2025-12-29T16:54:45.754Z","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)"}}
|
|
@@ -24,12 +24,32 @@ class InstallService {
|
|
|
24
24
|
this.hookSystemRoot = path.resolve(__dirname, '../../../');
|
|
25
25
|
|
|
26
26
|
// Read version dynamically from package.json
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
this.
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
// Resolve package.json reliably both in repo and in node_modules
|
|
28
|
+
const candidates = [
|
|
29
|
+
path.resolve(this.hookSystemRoot, 'package.json'),
|
|
30
|
+
path.resolve(this.hookSystemRoot, '../package.json'),
|
|
31
|
+
path.resolve(this.hookSystemRoot, '../../package.json'),
|
|
32
|
+
(() => {
|
|
33
|
+
try { return require.resolve('pumuki-ast-hooks/package.json'); } catch { return null; }
|
|
34
|
+
})()
|
|
35
|
+
].filter(Boolean);
|
|
36
|
+
|
|
37
|
+
this.version = 'unknown';
|
|
38
|
+
const versionWarnings = [];
|
|
39
|
+
for (const pkgPath of candidates) {
|
|
40
|
+
try {
|
|
41
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
42
|
+
if (pkg.version) {
|
|
43
|
+
this.version = pkg.version;
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
} catch (err) {
|
|
47
|
+
versionWarnings.push({ pkgPath, error: err && err.message ? err.message : String(err) });
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (this.version === 'unknown' && versionWarnings.length > 0) {
|
|
51
|
+
// Log a single warning to avoid empty catch and give visibility
|
|
52
|
+
console.warn('[InstallService] Unable to read version from package.json', versionWarnings);
|
|
33
53
|
}
|
|
34
54
|
|
|
35
55
|
// Initialize Audit Logger
|