@sireai/optimus 0.1.26 → 0.1.28

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.
@@ -32,7 +32,7 @@ import { FeishuUserService } from "../integrations/feishu/feishu-user-service.js
32
32
  import { createFeedbackReport } from "./feedback.js";
33
33
  import { DEFAULT_FEEDBACK_RECIPIENT_EMAIL, FeishuFeedbackDeliveryService, persistFeedbackDeliveryResult, resolveDefaultFeedbackRecipientFallbackOpenId } from "./feedback-delivery.js";
34
34
  import { resolveDefaultConfigPath, resolveDefaultEnvPath } from "../config/optimus-paths.js";
35
- import { checkForSelfUpdate, installSelfUpdate, recordSkippedSelfUpdate, shouldPromptForCachedStartupUpdate } from "./self-update.js";
35
+ import { checkForSelfUpdate, installSelfUpdate, recordSkippedSelfUpdate } from "./self-update.js";
36
36
  const CLI_ROOT_DIR = resolve(dirname(fileURLToPath(import.meta.url)), "..", "..");
37
37
  const PACKAGE_JSON_PATH = join(CLI_ROOT_DIR, "package.json");
38
38
  const execFileAsync = promisify(execFile);
@@ -160,17 +160,17 @@ async function runWithTerminalLoading(message, action) {
160
160
  process.stderr.write(`\r${frames[frameIndex]} ${message}`);
161
161
  const timer = setInterval(() => {
162
162
  frameIndex = (frameIndex + 1) % frames.length;
163
- process.stderr.write(`\r${frames[frameIndex]} ${message}`);
163
+ process.stderr.write(`\r${frames[frameIndex]}`);
164
164
  }, 160);
165
165
  try {
166
166
  const result = await action();
167
167
  clearInterval(timer);
168
- process.stderr.write(`\r[ok ] ${message}\n`);
168
+ process.stderr.write(`\r[ok ] ${message}\u001B[K\n`);
169
169
  return result;
170
170
  }
171
171
  catch (error) {
172
172
  clearInterval(timer);
173
- process.stderr.write(`\r[err] ${message}\n`);
173
+ process.stderr.write(`\r[err] ${message}\u001B[K\n`);
174
174
  throw error;
175
175
  }
176
176
  }
@@ -837,12 +837,6 @@ async function maybeHandleStartupSelfUpdate(input) {
837
837
  packageRoot: CLI_ROOT_DIR
838
838
  });
839
839
  const selfUpdateConfig = input.config.selfUpdate ?? buildDefaultConfig().selfUpdate;
840
- const shouldPromptCachedUpdate = shouldPromptForCachedStartupUpdate({
841
- command: input.command,
842
- config: input.config,
843
- check,
844
- interactivePromptAllowed: isInteractiveSelfUpdatePromptAllowed()
845
- });
846
840
  if (!check.checked) {
847
841
  if (check.reason === "cached") {
848
842
  const intervalHours = Math.max(1, selfUpdateConfig.checkIntervalHours);
@@ -860,16 +854,10 @@ async function maybeHandleStartupSelfUpdate(input) {
860
854
  intervalHours,
861
855
  lastCheckedAt,
862
856
  nextCheckAt,
863
- updateAvailable: check.updateAvailable,
864
- promptPlanned: shouldPromptCachedUpdate
857
+ realtimeCheckSkipped: true
865
858
  });
866
859
  }
867
- if (!shouldPromptCachedUpdate && check.reason === "cached" && check.updateAvailable && check.latestVersion) {
868
- console.log(`[optimus] update available ${check.currentVersion} -> ${check.latestVersion}. Run \`optimus upgrade\`.`);
869
- }
870
- if (!shouldPromptCachedUpdate) {
871
- return { handled: false };
872
- }
860
+ return { handled: false };
873
861
  }
874
862
  if (check.reason === "check_failed") {
875
863
  await input.logger.warn("self_update.check_failed", {