pumuki-ast-hooks 6.1.0 → 6.1.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pumuki-ast-hooks",
3
- "version": "6.1.0",
3
+ "version": "6.1.1",
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": {
@@ -28,3 +28,5 @@
28
28
  {"timestamp":"2026-01-13T13:58:43.218Z","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":{}}
29
29
  {"timestamp":"2026-01-13T17:20:09.962Z","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":{}}
30
30
  {"timestamp":"2026-01-13T17:21:43.217Z","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":{}}
31
+ {"timestamp":"2026-01-13T17:53:22.925Z","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":{}}
32
+ {"timestamp":"2026-01-13T17:54:11.574Z","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":{}}
@@ -122,3 +122,11 @@
122
122
  {"timestamp":"2026-01-13T17:21:43.143Z","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":{}}
123
123
  {"timestamp":"2026-01-13T17:21:43.143Z","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":{}}
124
124
  {"timestamp":"2026-01-13T17:21:43.143Z","level":"info","component":"InstallWizard","event":"INSTALL_WIZARD_COMPLETED","data":{},"context":{}}
125
+ {"timestamp":"2026-01-13T17:53:22.813Z","level":"info","component":"InstallWizard","event":"INSTALL_WIZARD_START","data":{"repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"},"context":{}}
126
+ {"timestamp":"2026-01-13T17:53:22.821Z","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":{}}
127
+ {"timestamp":"2026-01-13T17:53:22.821Z","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":{}}
128
+ {"timestamp":"2026-01-13T17:53:22.821Z","level":"info","component":"InstallWizard","event":"INSTALL_WIZARD_COMPLETED","data":{},"context":{}}
129
+ {"timestamp":"2026-01-13T17:54:11.669Z","level":"info","component":"InstallWizard","event":"INSTALL_WIZARD_START","data":{"repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"},"context":{}}
130
+ {"timestamp":"2026-01-13T17:54:11.678Z","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":{}}
131
+ {"timestamp":"2026-01-13T17:54:11.678Z","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":{}}
132
+ {"timestamp":"2026-01-13T17:54:11.679Z","level":"info","component":"InstallWizard","event":"INSTALL_WIZARD_COMPLETED","data":{},"context":{}}
@@ -986,3 +986,51 @@
986
986
  {"timestamp":1768324903217,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
987
987
  {"timestamp":1768324903217,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
988
988
  {"timestamp":1768324903217,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
989
+ {"timestamp":1768326802923,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
990
+ {"timestamp":1768326802924,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
991
+ {"timestamp":1768326802924,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
992
+ {"timestamp":1768326802924,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
993
+ {"timestamp":1768326802924,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
994
+ {"timestamp":1768326802924,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
995
+ {"timestamp":1768326802924,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
996
+ {"timestamp":1768326802924,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
997
+ {"timestamp":1768326802925,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
998
+ {"timestamp":1768326802925,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
999
+ {"timestamp":1768326802925,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
1000
+ {"timestamp":1768326802925,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1001
+ {"timestamp":1768326802925,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1002
+ {"timestamp":1768326802925,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
1003
+ {"timestamp":1768326802925,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
1004
+ {"timestamp":1768326802925,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1005
+ {"timestamp":1768326802925,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1006
+ {"timestamp":1768326802925,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
1007
+ {"timestamp":1768326802925,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
1008
+ {"timestamp":1768326802925,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1009
+ {"timestamp":1768326802925,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1010
+ {"timestamp":1768326802925,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
1011
+ {"timestamp":1768326802925,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
1012
+ {"timestamp":1768326802925,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1013
+ {"timestamp":1768326851571,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1014
+ {"timestamp":1768326851573,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
1015
+ {"timestamp":1768326851573,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
1016
+ {"timestamp":1768326851573,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1017
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1018
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
1019
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
1020
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1021
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1022
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
1023
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
1024
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1025
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1026
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
1027
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
1028
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1029
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1030
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
1031
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
1032
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1033
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"constructor","status":"started","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
1034
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"ensure_dir","status":"started"}
1035
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"ensure_dir","status":"success"}
1036
+ {"timestamp":1768326851574,"hook":"audit_logger","operation":"constructor","status":"success","repoRoot":"/Users/juancarlosmerlosalbarracin/Developer/Projects/ast-intelligence-hooks/scripts/hooks-system"}
@@ -0,0 +1,93 @@
1
+ const { analyzeGodClasses } = require('../detectors/god-class-detector');
2
+
3
+ describe('god-class-detector', () => {
4
+ const SyntaxKind = {
5
+ ClassDeclaration: 'ClassDeclaration',
6
+ IfStatement: 'IfStatement',
7
+ ForStatement: 'ForStatement',
8
+ ForInStatement: 'ForInStatement',
9
+ ForOfStatement: 'ForOfStatement',
10
+ WhileStatement: 'WhileStatement',
11
+ DoStatement: 'DoStatement',
12
+ SwitchStatement: 'SwitchStatement',
13
+ ConditionalExpression: 'ConditionalExpression',
14
+ TryStatement: 'TryStatement',
15
+ CatchClause: 'CatchClause'
16
+ };
17
+
18
+ function createMockClass({
19
+ name,
20
+ methodsCount = 0,
21
+ propertiesCount = 0,
22
+ startLine = 1,
23
+ endLine = 1,
24
+ fullText = '',
25
+ complexityCounts = {}
26
+ }) {
27
+ return {
28
+ getName: () => name,
29
+ getMethods: () => Array.from({ length: methodsCount }, () => ({ getName: () => 'm' })),
30
+ getProperties: () => Array.from({ length: propertiesCount }, () => ({})),
31
+ getStartLineNumber: () => startLine,
32
+ getEndLineNumber: () => endLine,
33
+ getDescendantsOfKind: (kind) => {
34
+ const count = complexityCounts[kind] ?? 0;
35
+ return Array.from({ length: count }, () => ({}));
36
+ },
37
+ getFullText: () => fullText
38
+ };
39
+ }
40
+
41
+ function createMockSourceFile({ path, classes }) {
42
+ return {
43
+ getFilePath: () => path,
44
+ getDescendantsOfKind: (kind) => {
45
+ if (kind !== SyntaxKind.ClassDeclaration) {
46
+ return [];
47
+ }
48
+ return classes;
49
+ }
50
+ };
51
+ }
52
+
53
+ it('does not stop analyzing when first class is a ValueObject/Dto', () => {
54
+ const dtoClass = createMockClass({
55
+ name: 'UserDto',
56
+ startLine: 1,
57
+ endLine: 10
58
+ });
59
+
60
+ const bigServiceClass = createMockClass({
61
+ name: 'BigService',
62
+ methodsCount: 30,
63
+ propertiesCount: 10,
64
+ startLine: 11,
65
+ endLine: 812,
66
+ complexityCounts: {
67
+ [SyntaxKind.IfStatement]: 30,
68
+ [SyntaxKind.ForStatement]: 10,
69
+ [SyntaxKind.TryStatement]: 5,
70
+ [SyntaxKind.CatchClause]: 5
71
+ }
72
+ });
73
+
74
+ const sourceFile = createMockSourceFile({
75
+ path: '/apps/backend/src/services/auth.service.ts',
76
+ classes: [dtoClass, bigServiceClass]
77
+ });
78
+
79
+ const pushFinding = jest.fn();
80
+
81
+ analyzeGodClasses(sourceFile, [], {
82
+ SyntaxKind,
83
+ pushFinding,
84
+ godClassBaseline: null,
85
+ hardMaxLines: 200,
86
+ softMaxLines: 500,
87
+ absoluteGodLines: 1000,
88
+ underThresholdLines: 300
89
+ });
90
+
91
+ expect(pushFinding).toHaveBeenCalled();
92
+ });
93
+ });
@@ -21,10 +21,12 @@ function analyzeGodClasses(sourceFile, findings, {
21
21
  return;
22
22
  }
23
23
 
24
- sourceFile.getDescendantsOfKind(SyntaxKind.ClassDeclaration).forEach((cls) => {
24
+ const classes = sourceFile.getDescendantsOfKind(SyntaxKind.ClassDeclaration);
25
+
26
+ for (const cls of classes) {
25
27
  const className = cls.getName() || '';
26
28
  const isValueObject = /Metrics|ValueObject|VO$|Dto$|Entity$/.test(className);
27
- if (isValueObject) return;
29
+ if (isValueObject) continue;
28
30
 
29
31
  const methodsCount = cls.getMethods().length;
30
32
  const propertiesCount = cls.getProperties().length;
@@ -70,7 +72,7 @@ function analyzeGodClasses(sourceFile, findings, {
70
72
  `God class detected: ${methodsCount} methods, ${propertiesCount} properties, ${lineCount} lines, complexity ${complexity}, concerns ${concernCount} - VIOLATES SRP`,
71
73
  findings
72
74
  );
73
- return;
75
+ continue;
74
76
  }
75
77
 
76
78
  const isMassiveFile = lineCount > softMax;
@@ -88,7 +90,7 @@ function analyzeGodClasses(sourceFile, findings, {
88
90
  findings
89
91
  );
90
92
  }
91
- return;
93
+ continue;
92
94
  }
93
95
 
94
96
  const methodsZ = godClassBaseline.robustZ(methodsCount, godClassBaseline.med.methodsCount, godClassBaseline.mad.methodsCount);
@@ -110,13 +112,13 @@ function analyzeGodClasses(sourceFile, findings, {
110
112
  if (isMassiveFile) signalCount++;
111
113
 
112
114
  if (!isUnderThreshold && (signalCount >= 2 || isAbsoluteGod)) {
113
- console.error(`[GOD CLASS DEBUG] ${className}: methods=${methodsCount}, props=${propertiesCount}, lines=${lineCount}, complexity=${complexity}, concerns=${concernCount}, isAbsoluteGod=${isAbsoluteGod}, signalCount=${signalCount}`);
115
+ console.error(`[GOD CLASS DEBUG] ${className}: methods=${methodsCount}, props=${propertiesCount}, lines=${lineCount}, complexity ${complexity}, concerns ${concernCount}, isAbsoluteGod=${isAbsoluteGod}, signalCount=${signalCount}`);
114
116
  pushFinding("backend.antipattern.god_classes", "critical", sourceFile, cls,
115
117
  `God class detected: ${methodsCount} methods, ${propertiesCount} properties, ${lineCount} lines, complexity ${complexity}, concerns ${concernCount} - VIOLATES SRP`,
116
118
  findings
117
119
  );
118
120
  }
119
- });
121
+ }
120
122
  }
121
123
 
122
124
  module.exports = {
@@ -88,3 +88,9 @@
88
88
  {"timestamp":"2026-01-13T17:21:44.693Z","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"}}
89
89
  {"timestamp":"2026-01-13T17:21:44.695Z","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"}}
90
90
  {"timestamp":"2026-01-13T17:21:44.695Z","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)"}}
91
+ {"timestamp":"2026-01-13T17:53:24.093Z","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"}}
92
+ {"timestamp":"2026-01-13T17:53:24.094Z","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"}}
93
+ {"timestamp":"2026-01-13T17:53:24.095Z","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)"}}
94
+ {"timestamp":"2026-01-13T17:54:13.230Z","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"}}
95
+ {"timestamp":"2026-01-13T17:54:13.231Z","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"}}
96
+ {"timestamp":"2026-01-13T17:54:13.231Z","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)"}}