@appkit/llamacpp-cli 1.4.1 → 1.6.0
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/CHANGELOG.md +21 -0
- package/MONITORING-ACCURACY-FIX.md +199 -0
- package/PER-PROCESS-METRICS.md +190 -0
- package/README.md +136 -1
- package/dist/cli.js +21 -4
- package/dist/cli.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +12 -3
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/monitor.d.ts +2 -0
- package/dist/commands/monitor.d.ts.map +1 -0
- package/dist/commands/monitor.js +126 -0
- package/dist/commands/monitor.js.map +1 -0
- package/dist/commands/ps.d.ts +3 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +75 -5
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/server-show.d.ts.map +1 -1
- package/dist/commands/server-show.js +10 -3
- package/dist/commands/server-show.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +14 -2
- package/dist/commands/start.js.map +1 -1
- package/dist/lib/history-manager.d.ts +46 -0
- package/dist/lib/history-manager.d.ts.map +1 -0
- package/dist/lib/history-manager.js +157 -0
- package/dist/lib/history-manager.js.map +1 -0
- package/dist/lib/metrics-aggregator.d.ts +40 -0
- package/dist/lib/metrics-aggregator.d.ts.map +1 -0
- package/dist/lib/metrics-aggregator.js +211 -0
- package/dist/lib/metrics-aggregator.js.map +1 -0
- package/dist/lib/system-collector.d.ts +80 -0
- package/dist/lib/system-collector.d.ts.map +1 -0
- package/dist/lib/system-collector.js +311 -0
- package/dist/lib/system-collector.js.map +1 -0
- package/dist/tui/HistoricalMonitorApp.d.ts +5 -0
- package/dist/tui/HistoricalMonitorApp.d.ts.map +1 -0
- package/dist/tui/HistoricalMonitorApp.js +490 -0
- package/dist/tui/HistoricalMonitorApp.js.map +1 -0
- package/dist/tui/MonitorApp.d.ts +4 -0
- package/dist/tui/MonitorApp.d.ts.map +1 -0
- package/dist/tui/MonitorApp.js +315 -0
- package/dist/tui/MonitorApp.js.map +1 -0
- package/dist/tui/MultiServerMonitorApp.d.ts +4 -0
- package/dist/tui/MultiServerMonitorApp.d.ts.map +1 -0
- package/dist/tui/MultiServerMonitorApp.js +712 -0
- package/dist/tui/MultiServerMonitorApp.js.map +1 -0
- package/dist/types/history-types.d.ts +30 -0
- package/dist/types/history-types.d.ts.map +1 -0
- package/dist/types/history-types.js +11 -0
- package/dist/types/history-types.js.map +1 -0
- package/dist/types/monitor-types.d.ts +123 -0
- package/dist/types/monitor-types.d.ts.map +1 -0
- package/dist/types/monitor-types.js +3 -0
- package/dist/types/monitor-types.js.map +1 -0
- package/dist/types/server-config.d.ts +1 -0
- package/dist/types/server-config.d.ts.map +1 -1
- package/dist/types/server-config.js.map +1 -1
- package/dist/utils/downsample-utils.d.ts +35 -0
- package/dist/utils/downsample-utils.d.ts.map +1 -0
- package/dist/utils/downsample-utils.js +107 -0
- package/dist/utils/downsample-utils.js.map +1 -0
- package/dist/utils/file-utils.d.ts +6 -0
- package/dist/utils/file-utils.d.ts.map +1 -1
- package/dist/utils/file-utils.js +38 -0
- package/dist/utils/file-utils.js.map +1 -1
- package/dist/utils/process-utils.d.ts +35 -2
- package/dist/utils/process-utils.d.ts.map +1 -1
- package/dist/utils/process-utils.js +220 -25
- package/dist/utils/process-utils.js.map +1 -1
- package/docs/images/.gitkeep +1 -0
- package/package.json +5 -1
- package/src/cli.ts +21 -4
- package/src/commands/create.ts +14 -4
- package/src/commands/monitor.ts +110 -0
- package/src/commands/ps.ts +88 -5
- package/src/commands/server-show.ts +10 -3
- package/src/commands/start.ts +15 -2
- package/src/lib/history-manager.ts +172 -0
- package/src/lib/metrics-aggregator.ts +257 -0
- package/src/lib/system-collector.ts +315 -0
- package/src/tui/HistoricalMonitorApp.ts +548 -0
- package/src/tui/MonitorApp.ts +386 -0
- package/src/tui/MultiServerMonitorApp.ts +792 -0
- package/src/types/history-types.ts +39 -0
- package/src/types/monitor-types.ts +162 -0
- package/src/types/server-config.ts +1 -0
- package/src/utils/downsample-utils.ts +128 -0
- package/src/utils/file-utils.ts +40 -0
- package/src/utils/process-utils.ts +243 -25
- package/test-load.sh +100 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.systemCollector = exports.SystemCollector = void 0;
|
|
37
|
+
const process_utils_js_1 = require("../utils/process-utils.js");
|
|
38
|
+
/**
|
|
39
|
+
* System metrics collector using macmon (optional) and vm_stat (fallback)
|
|
40
|
+
* Provides GPU, CPU, ANE, and memory metrics on macOS
|
|
41
|
+
*/
|
|
42
|
+
class SystemCollector {
|
|
43
|
+
constructor(macmonPath = '/opt/homebrew/bin/macmon') {
|
|
44
|
+
this.macmonAvailable = null;
|
|
45
|
+
this.lastSystemMetrics = null;
|
|
46
|
+
this.lastCollectionTime = 0;
|
|
47
|
+
this.CACHE_TTL_MS = 4000; // Cache for 4 seconds (longer than macmon spawn time)
|
|
48
|
+
this.collectingLock = null;
|
|
49
|
+
this.pCoreCount = 0;
|
|
50
|
+
this.eCoreCount = 0;
|
|
51
|
+
this.totalCores = 0;
|
|
52
|
+
this.macmonPath = macmonPath;
|
|
53
|
+
this.initializeCoreCount();
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Get CPU core counts for weighted average calculation
|
|
57
|
+
*/
|
|
58
|
+
async initializeCoreCount() {
|
|
59
|
+
try {
|
|
60
|
+
const { execCommand } = await Promise.resolve().then(() => __importStar(require('../utils/process-utils.js')));
|
|
61
|
+
// Try to get P-core and E-core counts separately (Apple Silicon)
|
|
62
|
+
try {
|
|
63
|
+
const pCores = await execCommand('sysctl -n hw.perflevel0.physicalcpu 2>/dev/null');
|
|
64
|
+
const eCores = await execCommand('sysctl -n hw.perflevel1.physicalcpu 2>/dev/null');
|
|
65
|
+
this.pCoreCount = parseInt(pCores, 10) || 0;
|
|
66
|
+
this.eCoreCount = parseInt(eCores, 10) || 0;
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
// Fall back to total core count if perflevel not available
|
|
70
|
+
const total = await execCommand('sysctl -n hw.ncpu 2>/dev/null');
|
|
71
|
+
this.totalCores = parseInt(total, 10) || 0;
|
|
72
|
+
// Assume equal split if we can't get individual counts
|
|
73
|
+
this.pCoreCount = Math.floor(this.totalCores / 2);
|
|
74
|
+
this.eCoreCount = this.totalCores - this.pCoreCount;
|
|
75
|
+
}
|
|
76
|
+
this.totalCores = this.pCoreCount + this.eCoreCount;
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
// Default to 8 cores if we can't detect
|
|
80
|
+
this.pCoreCount = 4;
|
|
81
|
+
this.eCoreCount = 4;
|
|
82
|
+
this.totalCores = 8;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Check if macmon is available
|
|
87
|
+
*/
|
|
88
|
+
async checkMacmonAvailability() {
|
|
89
|
+
if (this.macmonAvailable !== null) {
|
|
90
|
+
return this.macmonAvailable;
|
|
91
|
+
}
|
|
92
|
+
try {
|
|
93
|
+
const result = await (0, process_utils_js_1.execCommand)(`which ${this.macmonPath} 2>/dev/null`);
|
|
94
|
+
this.macmonAvailable = result.length > 0;
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
this.macmonAvailable = false;
|
|
98
|
+
}
|
|
99
|
+
return this.macmonAvailable;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Parse macmon JSON output
|
|
103
|
+
* Expected format from 'macmon pipe':
|
|
104
|
+
* {
|
|
105
|
+
* "gpu_usage": [count, percentage],
|
|
106
|
+
* "pcpu_usage": [count, percentage],
|
|
107
|
+
* "ecpu_usage": [count, percentage],
|
|
108
|
+
* "ane_power": number,
|
|
109
|
+
* "temp": {"cpu_temp_avg": number, "gpu_temp_avg": number}
|
|
110
|
+
* }
|
|
111
|
+
*/
|
|
112
|
+
parseMacmonJson(jsonLine) {
|
|
113
|
+
try {
|
|
114
|
+
const data = JSON.parse(jsonLine);
|
|
115
|
+
// GPU usage (second element of array, convert decimal to percentage)
|
|
116
|
+
const gpuUsage = data.gpu_usage?.[1] !== undefined
|
|
117
|
+
? data.gpu_usage[1] * 100
|
|
118
|
+
: undefined;
|
|
119
|
+
// CPU usage (weighted average of P-cores and E-cores)
|
|
120
|
+
// Each core type reports 0.0-1.0 utilization
|
|
121
|
+
// Calculate weighted average: (P% * Pcount + E% * Ecount) / totalCores
|
|
122
|
+
const pcpuUsage = data.pcpu_usage?.[1] || 0; // 0.0-1.0
|
|
123
|
+
const ecpuUsage = data.ecpu_usage?.[1] || 0; // 0.0-1.0
|
|
124
|
+
let cpuUsage;
|
|
125
|
+
if (this.totalCores > 0) {
|
|
126
|
+
// Weighted average normalized to 0-100%
|
|
127
|
+
cpuUsage = ((pcpuUsage * this.pCoreCount) + (ecpuUsage * this.eCoreCount)) / this.totalCores * 100;
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
// Fallback: simple average if core counts not available
|
|
131
|
+
cpuUsage = ((pcpuUsage + ecpuUsage) / 2) * 100;
|
|
132
|
+
}
|
|
133
|
+
// ANE usage (estimate from power draw - macmon doesn't provide usage %)
|
|
134
|
+
// If ANE power > 0.1W, consider it active (rough estimate)
|
|
135
|
+
const aneUsage = data.ane_power > 0.1
|
|
136
|
+
? Math.min((data.ane_power / 8.0) * 100, 100) // Assume ~8W max for ANE
|
|
137
|
+
: 0;
|
|
138
|
+
// Temperature (use GPU temp if available, otherwise CPU)
|
|
139
|
+
const temperature = data.temp?.gpu_temp_avg || data.temp?.cpu_temp_avg;
|
|
140
|
+
return {
|
|
141
|
+
gpuUsage,
|
|
142
|
+
cpuUsage: cpuUsage > 0 ? cpuUsage : undefined,
|
|
143
|
+
aneUsage: aneUsage > 1 ? aneUsage : undefined,
|
|
144
|
+
temperature,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
return {};
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Collect macmon metrics (GPU, CPU, ANE)
|
|
153
|
+
* Uses 'macmon pipe' which outputs one JSON line per update
|
|
154
|
+
* Spawns macmon, reads one line, and kills it to prevent process leaks
|
|
155
|
+
*/
|
|
156
|
+
async getMacmonMetrics() {
|
|
157
|
+
const available = await this.checkMacmonAvailability();
|
|
158
|
+
if (!available) {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
try {
|
|
162
|
+
// Spawn macmon pipe, read one line, and kill it
|
|
163
|
+
// This prevents orphaned macmon processes
|
|
164
|
+
// Timeout set to 5s because macmon can take 3-4s to produce first line
|
|
165
|
+
const output = await (0, process_utils_js_1.spawnAndReadOneLine)(this.macmonPath, ['pipe'], 5000);
|
|
166
|
+
if (!output) {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
return this.parseMacmonJson(output);
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Parse vm_stat output for memory metrics
|
|
177
|
+
* Expected format:
|
|
178
|
+
* Pages free: 123456.
|
|
179
|
+
* Pages active: 234567.
|
|
180
|
+
* Pages inactive: 345678.
|
|
181
|
+
* Pages speculative: 45678.
|
|
182
|
+
* Pages throttled: 0.
|
|
183
|
+
* Pages wired down: 123456.
|
|
184
|
+
* Pages purgeable count: 0.
|
|
185
|
+
* "Translation faults": 12345678.
|
|
186
|
+
* Pages copy-on-write: 123456.
|
|
187
|
+
* ...
|
|
188
|
+
*/
|
|
189
|
+
parseVmStatOutput(output) {
|
|
190
|
+
const lines = output.split('\n');
|
|
191
|
+
const pageSize = 16384; // 16KB on Apple Silicon
|
|
192
|
+
let pagesActive = 0;
|
|
193
|
+
let pagesWired = 0;
|
|
194
|
+
let pagesCompressed = 0;
|
|
195
|
+
for (const line of lines) {
|
|
196
|
+
const match = line.match(/Pages (.*?):\s+(\d+)\./);
|
|
197
|
+
if (match) {
|
|
198
|
+
const name = match[1].toLowerCase();
|
|
199
|
+
const value = parseInt(match[2], 10);
|
|
200
|
+
if (name === 'active')
|
|
201
|
+
pagesActive = value;
|
|
202
|
+
else if (name === 'wired down')
|
|
203
|
+
pagesWired = value;
|
|
204
|
+
else if (name === 'compressed')
|
|
205
|
+
pagesCompressed = value;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
// Calculate used memory (active + wired + compressed)
|
|
209
|
+
// This matches what Activity Monitor and macmon report as "used"
|
|
210
|
+
const usedPages = pagesActive + pagesWired + pagesCompressed;
|
|
211
|
+
const memoryUsed = usedPages * pageSize;
|
|
212
|
+
return { memoryUsed };
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Get total system memory from sysctl
|
|
216
|
+
* Returns installed RAM size in bytes
|
|
217
|
+
*/
|
|
218
|
+
async getTotalMemory() {
|
|
219
|
+
try {
|
|
220
|
+
const output = await (0, process_utils_js_1.execCommand)('sysctl -n hw.memsize 2>/dev/null');
|
|
221
|
+
return parseInt(output.trim(), 10) || 0;
|
|
222
|
+
}
|
|
223
|
+
catch {
|
|
224
|
+
return 0;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Collect vm_stat memory metrics + total system memory from sysctl
|
|
229
|
+
*/
|
|
230
|
+
async getMemoryMetrics() {
|
|
231
|
+
try {
|
|
232
|
+
// Get used memory from vm_stat
|
|
233
|
+
const vmStatOutput = await (0, process_utils_js_1.execCommand)('vm_stat 2>/dev/null');
|
|
234
|
+
const { memoryUsed } = this.parseVmStatOutput(vmStatOutput);
|
|
235
|
+
// Get total installed RAM from sysctl (this is accurate)
|
|
236
|
+
const memoryTotal = await this.getTotalMemory();
|
|
237
|
+
return { memoryUsed, memoryTotal };
|
|
238
|
+
}
|
|
239
|
+
catch {
|
|
240
|
+
// Fallback to zeros if commands fail
|
|
241
|
+
return { memoryUsed: 0, memoryTotal: 0 };
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Collect all system metrics
|
|
246
|
+
* Attempts macmon first (GPU/CPU/ANE), always gets memory from vm_stat + sysctl
|
|
247
|
+
* Caches results for 4s to prevent spawning multiple macmon processes
|
|
248
|
+
*/
|
|
249
|
+
async collectSystemMetrics() {
|
|
250
|
+
const now = Date.now();
|
|
251
|
+
// Return cached data if still fresh
|
|
252
|
+
if (this.lastSystemMetrics && (now - this.lastCollectionTime) < this.CACHE_TTL_MS) {
|
|
253
|
+
return this.lastSystemMetrics;
|
|
254
|
+
}
|
|
255
|
+
// If already collecting, wait for that to finish
|
|
256
|
+
if (this.collectingLock) {
|
|
257
|
+
return this.collectingLock;
|
|
258
|
+
}
|
|
259
|
+
// Start fresh collection
|
|
260
|
+
this.collectingLock = this.doCollectSystemMetrics();
|
|
261
|
+
try {
|
|
262
|
+
const metrics = await this.collectingLock;
|
|
263
|
+
this.lastSystemMetrics = metrics;
|
|
264
|
+
this.lastCollectionTime = now;
|
|
265
|
+
return metrics;
|
|
266
|
+
}
|
|
267
|
+
finally {
|
|
268
|
+
this.collectingLock = null;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Internal method to actually collect system metrics
|
|
273
|
+
* Called by collectSystemMetrics with caching/locking
|
|
274
|
+
*/
|
|
275
|
+
async doCollectSystemMetrics() {
|
|
276
|
+
const warnings = [];
|
|
277
|
+
const now = Date.now();
|
|
278
|
+
// Try macmon first for GPU/CPU/ANE
|
|
279
|
+
const macmonMetrics = await this.getMacmonMetrics();
|
|
280
|
+
// Always get memory from vm_stat + sysctl (accurate total from sysctl)
|
|
281
|
+
const memoryMetrics = await this.getMemoryMetrics();
|
|
282
|
+
// Determine source and add warnings
|
|
283
|
+
let source;
|
|
284
|
+
if (macmonMetrics) {
|
|
285
|
+
source = 'macmon';
|
|
286
|
+
}
|
|
287
|
+
else if (memoryMetrics.memoryTotal > 0) {
|
|
288
|
+
source = 'vm_stat';
|
|
289
|
+
warnings.push('macmon not available - showing memory metrics only');
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
source = 'none';
|
|
293
|
+
warnings.push('Unable to collect system metrics');
|
|
294
|
+
}
|
|
295
|
+
return {
|
|
296
|
+
gpuUsage: macmonMetrics?.gpuUsage,
|
|
297
|
+
cpuUsage: macmonMetrics?.cpuUsage,
|
|
298
|
+
aneUsage: macmonMetrics?.aneUsage,
|
|
299
|
+
temperature: macmonMetrics?.temperature,
|
|
300
|
+
memoryUsed: memoryMetrics.memoryUsed,
|
|
301
|
+
memoryTotal: memoryMetrics.memoryTotal,
|
|
302
|
+
timestamp: now,
|
|
303
|
+
source,
|
|
304
|
+
warnings: warnings.length > 0 ? warnings : undefined,
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
exports.SystemCollector = SystemCollector;
|
|
309
|
+
// Export singleton instance
|
|
310
|
+
exports.systemCollector = new SystemCollector();
|
|
311
|
+
//# sourceMappingURL=system-collector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-collector.js","sourceRoot":"","sources":["../../src/lib/system-collector.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAA6E;AAG7E;;;GAGG;AACH,MAAa,eAAe;IAW1B,YAAY,aAAqB,0BAA0B;QATnD,oBAAe,GAAmB,IAAI,CAAC;QACvC,sBAAiB,GAAyB,IAAI,CAAC;QAC/C,uBAAkB,GAAW,CAAC,CAAC;QACtB,iBAAY,GAAG,IAAI,CAAC,CAAC,sDAAsD;QACpF,mBAAc,GAAkC,IAAI,CAAC;QACrD,eAAU,GAAW,CAAC,CAAC;QACvB,eAAU,GAAW,CAAC,CAAC;QACvB,eAAU,GAAW,CAAC,CAAC;QAG7B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC7B,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,mBAAmB;QAC/B,IAAI,CAAC;YACH,MAAM,EAAE,WAAW,EAAE,GAAG,wDAAa,2BAA2B,GAA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AAC,sBAAsB;QAClC,MAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAEvB,mCAAmC;QACnC,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAEpD,uEAAuE;QACvE,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAEpD,oCAAoC;QACpC,IAAI,MAAqC,CAAC;QAC1C,IAAI,aAAa,EAAE,CAAC;YAClB,MAAM,GAAG,QAAQ,CAAC;QACpB,CAAC;aAAM,IAAI,aAAa,CAAC,WAAW,GAAG,CAAC,EAAE,CAAC;YACzC,MAAM,GAAG,SAAS,CAAC;YACnB,QAAQ,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;QACtE,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,MAAM,CAAC;YAChB,QAAQ,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;QACpD,CAAC;QAED,OAAO;YACL,QAAQ,EAAE,aAAa,EAAE,QAAQ;YACjC,QAAQ,EAAE,aAAa,EAAE,QAAQ;YACjC,QAAQ,EAAE,aAAa,EAAE,QAAQ;YACjC,WAAW,EAAE,aAAa,EAAE,WAAW;YACvC,UAAU,EAAE,aAAa,CAAC,UAAU;YACpC,WAAW,EAAE,aAAa,CAAC,WAAW;YACtC,SAAS,EAAE,GAAG;YACd,MAAM;YACN,QAAQ,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;SACrD,CAAC;IACJ,CAAC;CACF;AAhTD,0CAgTC;AAED,4BAA4B;AACf,QAAA,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import blessed from 'blessed';
|
|
2
|
+
import { ServerConfig } from '../types/server-config.js';
|
|
3
|
+
export declare function createHistoricalUI(screen: blessed.Widgets.Screen, server: ServerConfig, onBack: () => void): Promise<void>;
|
|
4
|
+
export declare function createMultiServerHistoricalUI(screen: blessed.Widgets.Screen, servers: ServerConfig[], _selectedIndex: number, onBack: () => void): Promise<void>;
|
|
5
|
+
//# sourceMappingURL=HistoricalMonitorApp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HistoricalMonitorApp.d.ts","sourceRoot":"","sources":["../../src/tui/HistoricalMonitorApp.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAiJzD,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,EAC9B,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,MAAM,IAAI,GACjB,OAAO,CAAC,IAAI,CAAC,CAiLf;AAGD,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,EAC9B,OAAO,EAAE,YAAY,EAAE,EACvB,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,IAAI,GACjB,OAAO,CAAC,IAAI,CAAC,CAmNf"}
|