@krishivpb60/aether-ai-cli 1.3.4 → 1.3.5

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/HIGHLIGHTS.md CHANGED
@@ -1,3 +1,10 @@
1
+ # Aether CLI v1.3.5 Highlights
2
+ - **Visual Telemetry Dashboard HUD (`aether dashboard` / `aether telemetry`)**:
3
+ - Adds a local zero-dependency Web Server hosting a cyberpunk observability dashboard HUD.
4
+ - Displays real-time request latencies, query success rates, model token distributions, and active failover mesh topologies.
5
+ - Persistent storage preserves historical metrics across CLI executions in `~/.aether/telemetry.json`.
6
+ - Offline-compatible custom SVG chart engine allows telemetry visualization without an internet connection.
7
+
1
8
  # Aether CLI v1.3.4 Highlights
2
9
  - **AI-Powered Workspace Search & Code Indexer (`/search`)**:
3
10
  - Adds `/search <query>` slash command to scan all workspace text files for keyword matches, showing line numbers and code snippets.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krishivpb60/aether-ai-cli",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "Aether Core AI — A cyberpunk command-line AI assistant with multi-mode reasoning, 12-node failover mesh, file context injection, and offline fallbacks.",
5
5
  "main": "src/cli.js",
6
6
  "bin": {
@@ -3,11 +3,48 @@
3
3
  // Logs request latencies, prompt speeds, and meshes provider logs.
4
4
  // ═══════════════════════════════════════════════════════════
5
5
 
6
+ import { readFileSync, writeFileSync, existsSync, mkdirSync, unlinkSync } from "node:fs";
7
+ import { join } from "node:path";
8
+ import { homedir } from "node:os";
6
9
  import { getSessionTokenStats, getBreakdownByModel } from "./tokens.js";
7
10
  import { getActiveProviders, PROVIDERS } from "./providers.js";
8
11
  import { listSessions } from "../config.js";
9
12
 
10
- const latencyLogs = [];
13
+ const CONFIG_DIR = join(homedir(), ".aether");
14
+ const TELEMETRY_FILE = join(CONFIG_DIR, "telemetry.json");
15
+
16
+ /**
17
+ * Loads telemetry logs from disk.
18
+ * @returns {Array}
19
+ */
20
+ function loadTelemetryFromDisk() {
21
+ try {
22
+ if (existsSync(TELEMETRY_FILE)) {
23
+ const raw = readFileSync(TELEMETRY_FILE, "utf-8");
24
+ return JSON.parse(raw);
25
+ }
26
+ } catch {
27
+ // ignore
28
+ }
29
+ return [];
30
+ }
31
+
32
+ /**
33
+ * Saves telemetry logs to disk.
34
+ * @param {Array} logs
35
+ */
36
+ function saveTelemetryToDisk(logs) {
37
+ try {
38
+ if (!existsSync(CONFIG_DIR)) {
39
+ mkdirSync(CONFIG_DIR, { recursive: true });
40
+ }
41
+ writeFileSync(TELEMETRY_FILE, JSON.stringify(logs, null, 2), "utf-8");
42
+ } catch {
43
+ // ignore
44
+ }
45
+ }
46
+
47
+ const latencyLogs = loadTelemetryFromDisk();
11
48
 
12
49
  /**
13
50
  * Records telemetry metrics for an AI call.
@@ -29,10 +66,12 @@ export function recordLatency(provider, model, latencyMs, promptTokens, completi
29
66
  success: !!success,
30
67
  });
31
68
 
32
- // Limit to last 50 entries
33
- if (latencyLogs.length > 50) {
69
+ // Limit to last 100 entries for historical visualization
70
+ if (latencyLogs.length > 100) {
34
71
  latencyLogs.shift();
35
72
  }
73
+
74
+ saveTelemetryToDisk(latencyLogs);
36
75
  }
37
76
 
38
77
  /**
@@ -43,6 +82,20 @@ export function getLatencyLogs() {
43
82
  return latencyLogs;
44
83
  }
45
84
 
85
+ /**
86
+ * Clears all telemetry logs.
87
+ */
88
+ export function clearTelemetryLogs() {
89
+ latencyLogs.length = 0;
90
+ try {
91
+ if (existsSync(TELEMETRY_FILE)) {
92
+ unlinkSync(TELEMETRY_FILE);
93
+ }
94
+ } catch {
95
+ // ignore
96
+ }
97
+ }
98
+
46
99
  /**
47
100
  * Gathers all metrics needed for the web dashboard visualization.
48
101
  * @param {object} config - Aether configuration object