pumuki-ast-hooks 5.5.6 → 5.5.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 +2 -2
- package/scripts/hooks-system/.audit-reports/auto-recovery.log +1 -0
- package/scripts/hooks-system/.audit-reports/install-wizard.log +4 -0
- package/scripts/hooks-system/.audit_tmp/hook-metrics.jsonl +24 -0
- package/scripts/hooks-system/bin/cli.js +19 -5
- package/scripts/hooks-system/bin/update-evidence.sh +22 -10
- package/scripts/hooks-system/infrastructure/watchdog/__tests__/.audit-reports/token-monitor.log +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pumuki-ast-hooks",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.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": {
|
|
@@ -123,4 +123,4 @@
|
|
|
123
123
|
"./skills": "./skills/skill-rules.json",
|
|
124
124
|
"./hooks": "./hooks/index.js"
|
|
125
125
|
}
|
|
126
|
-
}
|
|
126
|
+
}
|
|
@@ -5,3 +5,4 @@
|
|
|
5
5
|
{"timestamp":"2026-01-03T13:32:38.778Z","level":"info","component":"AutoRecovery","event":"NotificationCenterService shutdown","data":{"totalEnqueued":0,"totalSent":0,"totalDeduplicated":0,"totalCooldownSkipped":0,"totalFailed":0,"totalRetries":0,"queueSize":0,"deduplication":{"size":0},"cooldowns":{"activeCooldowns":0}},"context":{}}
|
|
6
6
|
{"timestamp":"2026-01-03T13:47:40.470Z","level":"info","component":"AutoRecovery","event":"NotificationCenterService shutdown","data":{"totalEnqueued":0,"totalSent":0,"totalDeduplicated":0,"totalCooldownSkipped":0,"totalFailed":0,"totalRetries":0,"queueSize":0,"deduplication":{"size":0},"cooldowns":{"activeCooldowns":0}},"context":{}}
|
|
7
7
|
{"timestamp":"2026-01-03T13:53:08.976Z","level":"info","component":"AutoRecovery","event":"NotificationCenterService shutdown","data":{"totalEnqueued":0,"totalSent":0,"totalDeduplicated":0,"totalCooldownSkipped":0,"totalFailed":0,"totalRetries":0,"queueSize":0,"deduplication":{"size":0},"cooldowns":{"activeCooldowns":0}},"context":{}}
|
|
8
|
+
{"timestamp":"2026-01-03T14:05:35.588Z","level":"info","component":"AutoRecovery","event":"NotificationCenterService shutdown","data":{"totalEnqueued":0,"totalSent":0,"totalDeduplicated":0,"totalCooldownSkipped":0,"totalFailed":0,"totalRetries":0,"queueSize":0,"deduplication":{"size":0},"cooldowns":{"activeCooldowns":0}},"context":{}}
|
|
@@ -26,3 +26,7 @@
|
|
|
26
26
|
{"timestamp":"2026-01-03T13:53:09.073Z","level":"info","component":"InstallWizard","event":"INSTALL_WIZARD_CONFIG_EXISTS","data":{"configPath":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system/.hook-system/config.json"},"context":{}}
|
|
27
27
|
{"timestamp":"2026-01-03T13:53:09.073Z","level":"error","component":"InstallWizard","event":"INSTALL_WIZARD_SYMLINK_FAILED","data":{"error":"EEXIST: file already exists, symlink '/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system/scripts/hooks-system/bin/guard-supervisor.js' -> '/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system/.git/hooks/guard-supervisor'"},"context":{}}
|
|
28
28
|
{"timestamp":"2026-01-03T13:53:09.073Z","level":"info","component":"InstallWizard","event":"INSTALL_WIZARD_COMPLETED","data":{},"context":{}}
|
|
29
|
+
{"timestamp":"2026-01-03T14:05:35.950Z","level":"info","component":"InstallWizard","event":"INSTALL_WIZARD_START","data":{"repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"},"context":{}}
|
|
30
|
+
{"timestamp":"2026-01-03T14:05:35.955Z","level":"info","component":"InstallWizard","event":"INSTALL_WIZARD_CONFIG_EXISTS","data":{"configPath":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system/.hook-system/config.json"},"context":{}}
|
|
31
|
+
{"timestamp":"2026-01-03T14:05:35.955Z","level":"error","component":"InstallWizard","event":"INSTALL_WIZARD_SYMLINK_FAILED","data":{"error":"EEXIST: file already exists, symlink '/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system/scripts/hooks-system/bin/guard-supervisor.js' -> '/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system/.git/hooks/guard-supervisor'"},"context":{}}
|
|
32
|
+
{"timestamp":"2026-01-03T14:05:35.955Z","level":"info","component":"InstallWizard","event":"INSTALL_WIZARD_COMPLETED","data":{},"context":{}}
|
|
@@ -70,3 +70,27 @@
|
|
|
70
70
|
{"timestamp":1767448388976,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
|
|
71
71
|
{"timestamp":1767448388976,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
|
|
72
72
|
{"timestamp":1767448388976,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
|
|
73
|
+
{"timestamp":1767449135586,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
|
|
74
|
+
{"timestamp":1767449135587,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
|
|
75
|
+
{"timestamp":1767449135587,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
|
|
76
|
+
{"timestamp":1767449135587,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
|
|
77
|
+
{"timestamp":1767449135587,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
|
|
78
|
+
{"timestamp":1767449135587,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
|
|
79
|
+
{"timestamp":1767449135587,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
|
|
80
|
+
{"timestamp":1767449135587,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
|
|
81
|
+
{"timestamp":1767449135587,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
|
|
82
|
+
{"timestamp":1767449135587,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
|
|
83
|
+
{"timestamp":1767449135587,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
|
|
84
|
+
{"timestamp":1767449135587,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
|
|
85
|
+
{"timestamp":1767449135587,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
|
|
86
|
+
{"timestamp":1767449135587,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
|
|
87
|
+
{"timestamp":1767449135587,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
|
|
88
|
+
{"timestamp":1767449135587,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
|
|
89
|
+
{"timestamp":1767449135587,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
|
|
90
|
+
{"timestamp":1767449135587,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
|
|
91
|
+
{"timestamp":1767449135588,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
|
|
92
|
+
{"timestamp":1767449135588,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
|
|
93
|
+
{"timestamp":1767449135588,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
|
|
94
|
+
{"timestamp":1767449135588,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
|
|
95
|
+
{"timestamp":1767449135588,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
|
|
96
|
+
{"timestamp":1767449135588,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
|
|
@@ -125,15 +125,29 @@ const commands = {
|
|
|
125
125
|
const repoRoot = resolveRepoRoot();
|
|
126
126
|
const evidencePath = path.join(repoRoot, '.AI_EVIDENCE.json');
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
let existing = {};
|
|
129
|
+
try {
|
|
130
|
+
if (fs.existsSync(evidencePath)) {
|
|
131
|
+
const raw = fs.readFileSync(evidencePath, 'utf8');
|
|
132
|
+
const parsed = JSON.parse(raw);
|
|
133
|
+
if (parsed && typeof parsed === 'object') {
|
|
134
|
+
existing = parsed;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
} catch (e) {
|
|
138
|
+
existing = {};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const next = {
|
|
142
|
+
...existing,
|
|
129
143
|
timestamp: new Date().toISOString(),
|
|
130
|
-
trigger: process.env.AUTO_EVIDENCE_TRIGGER,
|
|
131
|
-
reason: process.env.AUTO_EVIDENCE_REASON,
|
|
132
|
-
summary: process.env.AUTO_EVIDENCE_SUMMARY,
|
|
144
|
+
trigger: process.env.AUTO_EVIDENCE_TRIGGER ?? existing.trigger,
|
|
145
|
+
reason: process.env.AUTO_EVIDENCE_REASON ?? existing.reason,
|
|
146
|
+
summary: process.env.AUTO_EVIDENCE_SUMMARY ?? existing.summary,
|
|
133
147
|
action: 'evidence:update'
|
|
134
148
|
};
|
|
135
149
|
|
|
136
|
-
fs.writeFileSync(evidencePath, JSON.stringify(
|
|
150
|
+
fs.writeFileSync(evidencePath, JSON.stringify(next, null, 2), 'utf8');
|
|
137
151
|
process.stdout.write(`${evidencePath}\n`);
|
|
138
152
|
},
|
|
139
153
|
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Redirects to the centralized implementation in scripts/hooks-system
|
|
2
|
+
|
|
4
3
|
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo ".")
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
|
|
5
|
+
AUTO_TRIGGER="${AUTO_EVIDENCE_TRIGGER:-}"
|
|
6
|
+
AUTO_REASON="${AUTO_EVIDENCE_REASON:-}"
|
|
7
|
+
AUTO_SUMMARY="${AUTO_EVIDENCE_SUMMARY:-}"
|
|
8
|
+
|
|
9
|
+
for arg in "$@"; do
|
|
10
|
+
if [[ "$arg" == "--auto" ]]; then
|
|
11
|
+
AUTO_TRIGGER="${AUTO_TRIGGER:-auto}"
|
|
12
|
+
AUTO_REASON="${AUTO_REASON:-auto}"
|
|
13
|
+
AUTO_SUMMARY="${AUTO_SUMMARY:-auto}"
|
|
14
|
+
fi
|
|
15
|
+
done
|
|
16
|
+
|
|
17
|
+
CLI="$REPO_ROOT/scripts/hooks-system/bin/cli.js"
|
|
18
|
+
if [[ ! -f "$CLI" ]]; then
|
|
19
|
+
CLI="$REPO_ROOT/node_modules/pumuki-ast-hooks/scripts/hooks-system/bin/cli.js"
|
|
8
20
|
fi
|
|
9
21
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
22
|
+
if [[ ! -f "$CLI" ]]; then
|
|
23
|
+
echo "update-evidence.sh CLI not found. Please reinstall dependencies." >&2
|
|
24
|
+
exit 1
|
|
13
25
|
fi
|
|
14
26
|
|
|
15
|
-
|
|
16
|
-
|
|
27
|
+
AUTO_EVIDENCE_TRIGGER="$AUTO_TRIGGER" AUTO_EVIDENCE_REASON="$AUTO_REASON" AUTO_EVIDENCE_SUMMARY="$AUTO_SUMMARY" \
|
|
28
|
+
node "$CLI" evidence:update
|
package/scripts/hooks-system/infrastructure/watchdog/__tests__/.audit-reports/token-monitor.log
CHANGED
|
@@ -34,3 +34,6 @@
|
|
|
34
34
|
{"timestamp":"2026-01-03T13:53:10.035Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"ok","percentUsed":10,"tokensUsed":100000,"maxTokens":1000000,"source":"realtime","stale":false},"context":{"message":"Result level=ok percent=10% used=100000/1000000 source=realtime"}}
|
|
35
35
|
{"timestamp":"2026-01-03T13:53:10.038Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"warning","percentUsed":91,"tokensUsed":910000,"maxTokens":1000000,"source":"fallback","stale":false},"context":{"message":"Result level=warning percent=91% used=910000/1000000 source=fallback"}}
|
|
36
36
|
{"timestamp":"2026-01-03T13:53:10.038Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"critical","percentUsed":98,"tokensUsed":980000,"maxTokens":1000000,"source":"realtime","stale":true},"context":{"message":"Result level=critical percent=98% used=980000/1000000 source=realtime (stale)"}}
|
|
37
|
+
{"timestamp":"2026-01-03T14:05:38.098Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"ok","percentUsed":10,"tokensUsed":100000,"maxTokens":1000000,"source":"realtime","stale":false},"context":{"message":"Result level=ok percent=10% used=100000/1000000 source=realtime"}}
|
|
38
|
+
{"timestamp":"2026-01-03T14:05:38.102Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"warning","percentUsed":91,"tokensUsed":910000,"maxTokens":1000000,"source":"fallback","stale":false},"context":{"message":"Result level=warning percent=91% used=910000/1000000 source=fallback"}}
|
|
39
|
+
{"timestamp":"2026-01-03T14:05:38.103Z","level":"info","component":"TokenMonitor","event":"TOKEN_MONITOR_RESULT","data":{"level":"critical","percentUsed":98,"tokensUsed":980000,"maxTokens":1000000,"source":"realtime","stale":true},"context":{"message":"Result level=critical percent=98% used=980000/1000000 source=realtime (stale)"}}
|