@krishivpb60/aether-ai-cli 1.3.1 → 1.3.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 CHANGED
@@ -1,3 +1,6 @@
1
+ # Aether CLI v1.3.2 Highlights
2
+ - **Manual Updater `/update`**: Added a new slash command `/update` to manually check the registry and force-upgrade Aether CLI to the latest version immediately, bypassing the 24-hour cache throttle.
3
+
1
4
  # Aether CLI v1.3.1 Highlights
2
5
  - **Codex & Claude Code Fusion**: The powers of OpenAI Codex and Claude Code are now combined directly inside the default **Titan Fusion** (`titan`) mode.
3
6
  - **Streamlined Modes**: Removed the individual `codex` and `cloude-code` modes to reduce clutter, automatically redirecting all lookups of these modes to Titan Fusion.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krishivpb60/aether-ai-cli",
3
- "version": "1.3.1",
3
+ "version": "1.3.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/chat.js CHANGED
@@ -136,7 +136,7 @@ export async function startChat(options = {}) {
136
136
  "/help", "/mode", "/modes", "/attach", "/files", "/clear",
137
137
  "/providers", "/export", "/status", "/copy", "/exit", "/quit",
138
138
  "/theme", "/themes", "/history-clear", "/game", "/abort", "/cmd", "/write",
139
- "/commit", "/run", "/history", "/autopilot", "/tokens"
139
+ "/commit", "/run", "/history", "/autopilot", "/tokens", "/update"
140
140
  ];
141
141
  const customCmds = aiConfig.CUSTOM_COMMANDS || {};
142
142
  const commands = [...builtIn, ...Object.keys(customCmds)];
@@ -423,7 +423,8 @@ export async function startChat(options = {}) {
423
423
  "/", "/help", "/mode", "/modes", "/attach", "/files", "/clear",
424
424
  "/providers", "/export", "/status", "/copy", "/exit", "/quit",
425
425
  "/theme", "/themes", "/history-clear", "/game", "/abort", "/cmd",
426
- "/guess", "/write", "/commit", "/run", "/history", "/autopilot", "/tokens"
426
+ "/guess", "/write", "/commit", "/run", "/history", "/autopilot", "/tokens",
427
+ "/update"
427
428
  ];
428
429
 
429
430
  const customCmds = aiConfig.CUSTOM_COMMANDS || {};
@@ -514,6 +515,12 @@ async function handleCommand(input, ctx) {
514
515
  showActiveProviders(ctx.aiConfig);
515
516
  break;
516
517
 
518
+ case "/update":
519
+ console.log("\n" + label.system + " " + colors.muted("Checking registry for updates..."));
520
+ await checkForUpdates(true);
521
+ console.log("");
522
+ break;
523
+
517
524
  case "/theme":
518
525
  await handleThemeSwitch(args);
519
526
  break;
@@ -606,6 +613,7 @@ function showHelp(aiConfig) {
606
613
  console.log(keyValue("/history-clear", "Clear saved persistent chat history"));
607
614
  console.log(keyValue("/autopilot <mode>", "View or switch agent autopilot level (off, safe, workspace, machine)"));
608
615
  console.log(keyValue("/tokens", "View detailed session token usage and exchanges telemetry"));
616
+ console.log(keyValue("/update", "Force check for updates and update Aether CLI manually"));
609
617
  console.log(keyValue("/game", "Start the local mainframe hacking mini-game"));
610
618
  console.log(keyValue("/copy", "Copy the last assistant response to clipboard"));
611
619
  console.log(keyValue("/cmd <list|add|remove>", "Manage custom command shortcuts"));
package/src/updater.js CHANGED
@@ -105,16 +105,16 @@ export async function showReleaseHighlights(version) {
105
105
  /**
106
106
  * Checks for updates and runs the automatic updater if configured.
107
107
  */
108
- export async function checkForUpdates() {
108
+ export async function checkForUpdates(force = false) {
109
109
  const autoUpdate = (await getConfigValue("AUTO_UPDATE")) !== "false";
110
110
  const showHighlights = (await getConfigValue("SHOW_HIGHLIGHTS")) !== "false";
111
111
  const lastCheck = parseInt(await getConfigValue("LAST_UPDATE_CHECK") || "0", 10);
112
112
  const now = Date.now();
113
113
  const currentVersion = pkg.version;
114
114
 
115
- // Run update check at most once every 24 hours (86,400,000 ms)
115
+ // Run update check at most once every 24 hours (86,400,000 ms), unless forced
116
116
  const checkInterval = 24 * 60 * 60 * 1000;
117
- if (now - lastCheck < checkInterval) {
117
+ if (!force && (now - lastCheck < checkInterval)) {
118
118
  // Show highlights if we just updated and haven't shown highlights for this version
119
119
  const lastNotified = await getConfigValue("LAST_NOTIFIED_VERSION") || "";
120
120
  if (showHighlights && lastNotified !== currentVersion) {
@@ -136,12 +136,17 @@ export async function checkForUpdates() {
136
136
  });
137
137
  clearTimeout(timeoutId);
138
138
 
139
- if (!res.ok) return;
139
+ if (!res.ok) {
140
+ if (force) {
141
+ console.log(label.system + " " + colors.warning(`⚠ Update check failed: server returned status ${res.status}`));
142
+ }
143
+ return;
144
+ }
140
145
  const data = await res.json();
141
146
  const latestVersion = data.version;
142
147
 
143
148
  if (isNewerVersion(latestVersion, currentVersion)) {
144
- if (autoUpdate) {
149
+ if (autoUpdate || force) {
145
150
  console.log("\n" + label.system + " " + colors.brand(`⚡ New version detected! Auto-updating from v${currentVersion} to v${latestVersion}...`));
146
151
 
147
152
  const isPip = process.env.AETHER_PACKAGER === "pip";
@@ -173,6 +178,9 @@ export async function checkForUpdates() {
173
178
  console.log(label.system + " " + colors.muted(`To update, run: ${updateCmd}`));
174
179
  }
175
180
  } else {
181
+ if (force) {
182
+ console.log(label.system + " " + colors.success(`✓ Aether is already up to date (v${currentVersion}).`));
183
+ }
176
184
  // Already on latest version, check if we need to show highlights
177
185
  const lastNotified = await getConfigValue("LAST_NOTIFIED_VERSION") || "";
178
186
  if (showHighlights && lastNotified !== currentVersion) {
@@ -180,7 +188,9 @@ export async function checkForUpdates() {
180
188
  await setConfigValue("LAST_NOTIFIED_VERSION", currentVersion);
181
189
  }
182
190
  }
183
- } catch {
184
- // Fail silently (offline or registry down)
191
+ } catch (err) {
192
+ if (force) {
193
+ console.log(label.system + " " + colors.warning(`⚠ Update check failed: ${err.message}`));
194
+ }
185
195
  }
186
196
  }
@@ -87,4 +87,23 @@ test("Auto-Updater & Highlights Suite", async (t) => {
87
87
  const updatedCheck = parseInt(await getConfigValue("LAST_UPDATE_CHECK") || "0", 10);
88
88
  assert.ok(updatedCheck > now - 10000);
89
89
  });
90
+
91
+ await t.test("checkForUpdates(true) bypasses 24h throttling when force is true", async () => {
92
+ const now = Date.now();
93
+ // Set last check to 1 hour ago (would normally throttle)
94
+ await setConfigValue("LAST_UPDATE_CHECK", (now - 60 * 60 * 1000).toString());
95
+
96
+ let fetchCalled = false;
97
+ globalThis.fetch = async (url) => {
98
+ fetchCalled = true;
99
+ assert.ok(url.includes("registry.npmjs.org"));
100
+ return {
101
+ ok: true,
102
+ json: async () => ({ version: pkg.version })
103
+ };
104
+ };
105
+
106
+ await checkForUpdates(true); // force = true
107
+ assert.strictEqual(fetchCalled, true);
108
+ });
90
109
  });