@krishivpb60/aether-ai-cli 1.4.1 → 1.4.2
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 +5 -0
- package/package.json +1 -1
- package/src/ai/fallback.js +14 -1
- package/src/ai/router.js +1 -1
- package/src/ui/dashboard.html +1 -1
- package/test/fallback.test.js +6 -0
- package/test/router.test.js +3 -0
package/HIGHLIGHTS.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
# Aether CLI v1.4.2 Highlights
|
|
2
|
+
- **Mesh Error Transparency**:
|
|
3
|
+
- Implements dynamic offline fallback error alerts containing the exact error messages encountered by all failing provider nodes.
|
|
4
|
+
- Ensures Aether only states "No active API keys configured" if no keys are setup at all, rather than outputting it incorrectly upon network or API limit node failures.
|
|
5
|
+
|
|
1
6
|
# Aether CLI v1.4.1 Highlights
|
|
2
7
|
- **Krylo Companion Bot Removal**:
|
|
3
8
|
- Removes the fictional Krylo companion terminal response lines entirely from local failbacks and mesh failures.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krishivpb60/aether-ai-cli",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
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": {
|
package/src/ai/fallback.js
CHANGED
|
@@ -101,9 +101,22 @@ export function runMainframeHack() {
|
|
|
101
101
|
/**
|
|
102
102
|
* Generates a local offline/error reply when no AI keys are configured or fail.
|
|
103
103
|
* @param {string} prompt - The user prompt
|
|
104
|
+
* @param {string[]} [errors] - Optional error messages from failed provider nodes
|
|
104
105
|
* @returns {{ text: string, type: string }}
|
|
105
106
|
*/
|
|
106
|
-
export function generateOfflineReply(prompt) {
|
|
107
|
+
export function generateOfflineReply(prompt, errors = []) {
|
|
108
|
+
if (errors && errors.length > 0) {
|
|
109
|
+
return {
|
|
110
|
+
text: [
|
|
111
|
+
"⚠️ All configured AI provider nodes failed to respond.",
|
|
112
|
+
" Errors encountered:",
|
|
113
|
+
...errors.map((e) => ` • ${e}`),
|
|
114
|
+
"",
|
|
115
|
+
" Please check your API keys, network connection, or rate limits."
|
|
116
|
+
].join("\n"),
|
|
117
|
+
type: "offline-error"
|
|
118
|
+
};
|
|
119
|
+
}
|
|
107
120
|
return {
|
|
108
121
|
text: [
|
|
109
122
|
"⚠️ No active API keys configured. Please set GOOGLE_API_KEY, GROQ_API_KEY, or OPENAI_API_KEY in your config to start chatting.",
|
package/src/ai/router.js
CHANGED
|
@@ -130,7 +130,7 @@ export async function routePrompt(prompt, systemPrompt, config, onToken, history
|
|
|
130
130
|
|
|
131
131
|
// ── Final Fallback: Offline Fallback ────────────────────
|
|
132
132
|
const startTimeOffline = performance.now();
|
|
133
|
-
const offlineReply = generateOfflineReply(prompt);
|
|
133
|
+
const offlineReply = generateOfflineReply(prompt, errors);
|
|
134
134
|
const latencyMsOffline = performance.now() - startTimeOffline;
|
|
135
135
|
const pTokens = estimateTokens(systemPrompt + prompt + history.map(h => h.content).join(""));
|
|
136
136
|
const cTokens = estimateTokens(offlineReply.text);
|
package/src/ui/dashboard.html
CHANGED
package/test/fallback.test.js
CHANGED
|
@@ -54,6 +54,12 @@ test("Offline Math Fallback & Krylo Suite", async (t) => {
|
|
|
54
54
|
const reply = generateOfflineReply("any query");
|
|
55
55
|
assert.strictEqual(reply.type, "offline-error");
|
|
56
56
|
assert.ok(reply.text.includes("No active API keys configured"));
|
|
57
|
+
|
|
58
|
+
const replyWithErrors = generateOfflineReply("any query", ["Timeout error", "Quota exceeded"]);
|
|
59
|
+
assert.strictEqual(replyWithErrors.type, "offline-error");
|
|
60
|
+
assert.ok(replyWithErrors.text.includes("All configured AI provider nodes failed to respond"));
|
|
61
|
+
assert.ok(replyWithErrors.text.includes("Timeout error"));
|
|
62
|
+
assert.ok(replyWithErrors.text.includes("Quota exceeded"));
|
|
57
63
|
});
|
|
58
64
|
|
|
59
65
|
await t.test("detectMathExpression and solveMath support trig, logs, square root and constants", () => {
|
package/test/router.test.js
CHANGED
|
@@ -170,6 +170,9 @@ test("Universal AI Router Suite", async (t) => {
|
|
|
170
170
|
assert.strictEqual(result.errors.length, 2);
|
|
171
171
|
assert.ok(result.errors[0].includes("Node 1 Groq"));
|
|
172
172
|
assert.ok(result.errors[1].includes("Node 2 OpenAI"));
|
|
173
|
+
assert.ok(result.text.includes("All configured AI provider nodes failed to respond"));
|
|
174
|
+
assert.ok(result.text.includes("Node 1 Groq"));
|
|
175
|
+
assert.ok(result.text.includes("Node 2 OpenAI"));
|
|
173
176
|
});
|
|
174
177
|
|
|
175
178
|
await t.test("routePrompt forwards chat history to OpenAI and Google payloads correctly", async () => {
|