pumuki-ast-hooks 5.3.8 → 5.3.10
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/README.md +8 -5
- package/docs/{RELEASE_NOTES_5.3.4.md → RELEASE_NOTES.md} +38 -4
- package/package.json +1 -1
- package/scripts/hooks-system/.AI_TOKEN_STATUS.txt +1 -1
- package/scripts/hooks-system/.audit-reports/notifications.log +14 -0
- package/scripts/hooks-system/.audit-reports/token-monitor.log +42 -0
- package/scripts/hooks-system/application/services/installation/InstallService.js +26 -6
- package/scripts/hooks-system/infrastructure/shell/orchestrators/audit-orchestrator.sh +3 -3
package/README.md
CHANGED
|
@@ -307,7 +307,7 @@ This library was conceived to solve this fundamental problem by creating a **per
|
|
|
307
307
|
|
|
308
308
|
### **How** Does It Work?
|
|
309
309
|
|
|
310
|
-
1. **Installation**: `npm install --save-dev
|
|
310
|
+
1. **Installation**: `npm install --save-dev pumuki-ast-hooks && npm run install-hooks`
|
|
311
311
|
2. **Initialization**: Run `ai-start` before coding (or it auto-executes)
|
|
312
312
|
3. **Development**: System monitors and validates automatically
|
|
313
313
|
4. **Commits**: Pre-commit hooks analyze and block if needed
|
|
@@ -565,13 +565,15 @@ hook-status
|
|
|
565
565
|
### Option 1: Installation via npm (Recommended)
|
|
566
566
|
|
|
567
567
|
```bash
|
|
568
|
-
npm install --save-dev
|
|
568
|
+
npm install --save-dev pumuki-ast-hooks
|
|
569
|
+
npm run install-hooks
|
|
569
570
|
```
|
|
570
571
|
|
|
571
572
|
### Option 2: Installation via Git
|
|
572
573
|
|
|
573
574
|
```bash
|
|
574
575
|
npm install --save-dev git+https://github.com/carlos/ast-intelligence-hooks.git
|
|
576
|
+
npm run install-hooks
|
|
575
577
|
```
|
|
576
578
|
|
|
577
579
|
### Option 3: Manual Installation
|
|
@@ -581,6 +583,7 @@ git clone https://github.com/carlos/ast-intelligence-hooks.git
|
|
|
581
583
|
cd ast-intelligence-hooks
|
|
582
584
|
npm install
|
|
583
585
|
npm link
|
|
586
|
+
npm run install-hooks
|
|
584
587
|
```
|
|
585
588
|
|
|
586
589
|
### Configure Git Hooks
|
|
@@ -947,8 +950,8 @@ For more details, see [USAGE.md](./docs/USAGE.md).
|
|
|
947
950
|
### 1. Install Hooks in All Projects
|
|
948
951
|
|
|
949
952
|
```bash
|
|
950
|
-
#
|
|
951
|
-
npm install --save-dev
|
|
953
|
+
# on each new project
|
|
954
|
+
npm install --save-dev pumuki-ast-hooks
|
|
952
955
|
npm run install-hooks
|
|
953
956
|
```
|
|
954
957
|
|
|
@@ -1099,7 +1102,7 @@ Developed by **Pumuki Team®**
|
|
|
1099
1102
|
|
|
1100
1103
|
- **Author**: Juan Carlos Merlos Albarracín (Senior Software Architect - AI-Driven Development)
|
|
1101
1104
|
- **Contact**: freelancemerlos@gmail.com
|
|
1102
|
-
- **Version**: 5.3.
|
|
1105
|
+
- **Version**: 5.3.9
|
|
1103
1106
|
- **Repository**: [GitHub](https://github.com/carlos/ast-intelligence-hooks)
|
|
1104
1107
|
|
|
1105
1108
|
---
|
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
# Release Notes - v5.3.9
|
|
2
|
+
|
|
3
|
+
**Release Date**: December 29, 2025
|
|
4
|
+
**Type**: Patch Release
|
|
5
|
+
**Compatibility**: Fully backward compatible with 5.3.x
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🎯 Overview
|
|
10
|
+
|
|
11
|
+
Version 5.3.9 refines installer version resolution and removes silent `catch` blocks. The installation wizard now shows the correct version even when executed from consuming projects.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 🐛 Bug Fixes
|
|
16
|
+
|
|
17
|
+
### Fixed: Wizard showing `vunknown`
|
|
18
|
+
- **Issue**: The installer showed `vunknown` when it couldn’t find `package.json` in some environments.
|
|
19
|
+
- **Resolution**: Robust search for `package.json` across multiple paths (repo and `node_modules`) with warnings instead of silent catches.
|
|
20
|
+
- **Impact**: Wizard and pre-commit now show the correct version.
|
|
21
|
+
|
|
22
|
+
### Fixed: Hooks showing old version
|
|
23
|
+
- **Issue**: Pre-commit displayed `@pumuki/ast-intelligence-hooks v5.3.1`.
|
|
24
|
+
- **Resolution**: `GitEnvironmentService` receives the resolved version and uses it in the hook.
|
|
25
|
+
- **Impact**: Hook reflects the actual installed version (`pumuki-ast-hooks`).
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 🔧 Improvements
|
|
30
|
+
- Warning logs when `package.json` cannot be read.
|
|
31
|
+
- Version resolution tolerant to both local repos and npm packages.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
1
35
|
# Release Notes - v5.3.4
|
|
2
36
|
|
|
3
37
|
**Release Date**: December 29, 2025
|
|
@@ -70,7 +104,7 @@ npm run audit # Option 2 → All files, correct violation count
|
|
|
70
104
|
|
|
71
105
|
---
|
|
72
106
|
|
|
73
|
-
## 🔧 Improvements
|
|
107
|
+
## 🔧 Improvements (5.3.4)
|
|
74
108
|
|
|
75
109
|
### Enhanced Error Messages
|
|
76
110
|
|
|
@@ -89,14 +123,14 @@ npm run audit # Option 2 → All files, correct violation count
|
|
|
89
123
|
### New Installation
|
|
90
124
|
|
|
91
125
|
```bash
|
|
92
|
-
npm install --save-dev
|
|
126
|
+
npm install --save-dev pumuki-ast-hooks@5.3.9
|
|
93
127
|
npm run install-hooks
|
|
94
128
|
```
|
|
95
129
|
|
|
96
130
|
### Upgrade from 5.3.3
|
|
97
131
|
|
|
98
132
|
```bash
|
|
99
|
-
npm install --save-dev
|
|
133
|
+
npm install --save-dev pumuki-ast-hooks@5.3.4
|
|
100
134
|
npm run install-hooks # Recommended to update orchestrator scripts
|
|
101
135
|
```
|
|
102
136
|
|
|
@@ -167,4 +201,4 @@ Stay tuned for upcoming features in future releases:
|
|
|
167
201
|
|
|
168
202
|
---
|
|
169
203
|
|
|
170
|
-
**Full Changelog**: [5.3.3...5.3.
|
|
204
|
+
**Full Changelog**: [5.3.3...5.3.9](https://github.com/SwiftEnProfundidad/ast-intelligence-hooks/compare/v5.3.3...v5.3.9)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pumuki-ast-hooks",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.10",
|
|
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,17 @@
|
|
|
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":{}}
|
|
542
|
+
{"timestamp":"2025-12-29T16:57:45.857Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"81832bc4-7bf9-4d75-9619-728af1d3f728","type":"token_ok"},"context":{}}
|
|
543
|
+
{"timestamp":"2025-12-29T17:00:45.971Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"4bb4a15b-611a-4e9a-aed8-deeb03998ad9","type":"token_ok"},"context":{}}
|
|
544
|
+
{"timestamp":"2025-12-29T17:03:46.088Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"9a52a928-f15a-49aa-be72-5f88e7a38e55","type":"token_ok"},"context":{}}
|
|
545
|
+
{"timestamp":"2025-12-29T17:06:46.204Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"56280e1c-56c5-41c9-877a-6c948809492d","type":"token_ok"},"context":{}}
|
|
546
|
+
{"timestamp":"2025-12-29T17:09:46.305Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"09adcbae-2738-4cd6-b543-752df2a6700e","type":"token_ok"},"context":{}}
|
|
547
|
+
{"timestamp":"2025-12-29T17:12:46.417Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"bac6ab98-9c98-46c1-baa0-134f4ecb5863","type":"token_ok"},"context":{}}
|
|
548
|
+
{"timestamp":"2025-12-29T17:15:46.531Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"e0e35dea-a5d5-4e0d-8bb0-2cc455020cbd","type":"token_ok"},"context":{}}
|
|
549
|
+
{"timestamp":"2025-12-29T17:18:46.631Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"f6ebcc68-c061-4b78-96a2-967a92c11b16","type":"token_ok"},"context":{}}
|
|
550
|
+
{"timestamp":"2025-12-29T17:21:46.738Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"501a5ba8-b1e3-43a4-ad47-b2e9d8474ef1","type":"token_ok"},"context":{}}
|
|
551
|
+
{"timestamp":"2025-12-29T17:24:46.853Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"6bbce8ca-4d50-4ef4-948d-371abda62cde","type":"token_ok"},"context":{}}
|
|
552
|
+
{"timestamp":"2025-12-29T17:27:46.968Z","level":"debug","component":"NotificationCenter","event":"Notification enqueued","data":{"id":"9a8b1781-449b-4343-992b-6ce25199e1c2","type":"token_ok"},"context":{}}
|
|
@@ -1612,3 +1612,45 @@
|
|
|
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)"}}
|
|
1624
|
+
{"timestamp":"2025-12-29T16:57:45.846Z","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":{}}
|
|
1625
|
+
{"timestamp":"2025-12-29T16:57:45.847Z","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":{}}
|
|
1626
|
+
{"timestamp":"2025-12-29T16:57:45.857Z","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)"}}
|
|
1627
|
+
{"timestamp":"2025-12-29T17:00:45.961Z","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":{}}
|
|
1628
|
+
{"timestamp":"2025-12-29T17:00:45.962Z","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":{}}
|
|
1629
|
+
{"timestamp":"2025-12-29T17:00:45.971Z","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)"}}
|
|
1630
|
+
{"timestamp":"2025-12-29T17:03:46.077Z","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":{}}
|
|
1631
|
+
{"timestamp":"2025-12-29T17:03:46.078Z","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":{}}
|
|
1632
|
+
{"timestamp":"2025-12-29T17:03:46.089Z","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)"}}
|
|
1633
|
+
{"timestamp":"2025-12-29T17:06:46.186Z","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":{}}
|
|
1634
|
+
{"timestamp":"2025-12-29T17:06:46.188Z","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":{}}
|
|
1635
|
+
{"timestamp":"2025-12-29T17:06:46.204Z","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)"}}
|
|
1636
|
+
{"timestamp":"2025-12-29T17:09:46.294Z","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":{}}
|
|
1637
|
+
{"timestamp":"2025-12-29T17:09:46.295Z","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":{}}
|
|
1638
|
+
{"timestamp":"2025-12-29T17:09:46.306Z","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)"}}
|
|
1639
|
+
{"timestamp":"2025-12-29T17:12:46.407Z","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":{}}
|
|
1640
|
+
{"timestamp":"2025-12-29T17:12:46.408Z","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":{}}
|
|
1641
|
+
{"timestamp":"2025-12-29T17:12:46.418Z","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)"}}
|
|
1642
|
+
{"timestamp":"2025-12-29T17:15:46.521Z","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":{}}
|
|
1643
|
+
{"timestamp":"2025-12-29T17:15:46.523Z","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":{}}
|
|
1644
|
+
{"timestamp":"2025-12-29T17:15:46.532Z","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)"}}
|
|
1645
|
+
{"timestamp":"2025-12-29T17:18:46.621Z","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":{}}
|
|
1646
|
+
{"timestamp":"2025-12-29T17:18:46.622Z","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":{}}
|
|
1647
|
+
{"timestamp":"2025-12-29T17:18:46.632Z","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)"}}
|
|
1648
|
+
{"timestamp":"2025-12-29T17:21:46.727Z","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":{}}
|
|
1649
|
+
{"timestamp":"2025-12-29T17:21:46.728Z","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":{}}
|
|
1650
|
+
{"timestamp":"2025-12-29T17:21:46.739Z","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)"}}
|
|
1651
|
+
{"timestamp":"2025-12-29T17:24:46.843Z","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":{}}
|
|
1652
|
+
{"timestamp":"2025-12-29T17:24:46.844Z","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":{}}
|
|
1653
|
+
{"timestamp":"2025-12-29T17:24:46.853Z","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)"}}
|
|
1654
|
+
{"timestamp":"2025-12-29T17:27:46.959Z","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":{}}
|
|
1655
|
+
{"timestamp":"2025-12-29T17:27:46.960Z","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":{}}
|
|
1656
|
+
{"timestamp":"2025-12-29T17:27:46.969Z","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
|
|
@@ -1026,11 +1026,11 @@ run_ast_intelligence() {
|
|
|
1026
1026
|
done
|
|
1027
1027
|
|
|
1028
1028
|
# Execute AST with proper error handling and NODE_PATH
|
|
1029
|
-
#
|
|
1029
|
+
# IMPORTANT: run from ROOT_DIR so git rev-parse resolves project root correctly
|
|
1030
1030
|
if [[ -n "$node_path_value" ]]; then
|
|
1031
|
-
ast_output=$(cd "$
|
|
1031
|
+
ast_output=$(cd "$ROOT_DIR" && export NODE_PATH="$node_path_value" && export AUDIT_TMP="$TMP_DIR" && export AUDIT_LIBRARY="${AUDIT_LIBRARY:-false}" && "$node_bin" "${AST_DIR}/ast-intelligence.js" 2>&1) || ast_exit_code=$?
|
|
1032
1032
|
else
|
|
1033
|
-
ast_output=$(cd "$
|
|
1033
|
+
ast_output=$(cd "$ROOT_DIR" && export AUDIT_TMP="$TMP_DIR" && export AUDIT_LIBRARY="${AUDIT_LIBRARY:-false}" && "$node_bin" "${AST_DIR}/ast-intelligence.js" 2>&1) || ast_exit_code=$?
|
|
1034
1034
|
fi
|
|
1035
1035
|
|
|
1036
1036
|
# Check if AST script failed
|