open-agents-ai 0.104.26 → 0.104.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.
- package/dist/index.js +19 -22
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -365,7 +365,7 @@ var init_updater = __esm({
|
|
|
365
365
|
"packages/cli/dist/updater.js"() {
|
|
366
366
|
"use strict";
|
|
367
367
|
PACKAGE_NAME = "open-agents-ai";
|
|
368
|
-
CHECK_INTERVAL_MS = 60 *
|
|
368
|
+
CHECK_INTERVAL_MS = 60 * 1e3;
|
|
369
369
|
CACHE_DIR = join2(homedir2(), ".open-agents");
|
|
370
370
|
CACHE_FILE = join2(CACHE_DIR, "update-check.json");
|
|
371
371
|
}
|
|
@@ -39893,7 +39893,12 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
39893
39893
|
}
|
|
39894
39894
|
};
|
|
39895
39895
|
}
|
|
39896
|
-
|
|
39896
|
+
process.stdout.write("\x1B[?1049h\x1B[H\x1B[2J");
|
|
39897
|
+
process.stdout.write(`
|
|
39898
|
+
${c2.bold("Open Agents Update")}
|
|
39899
|
+
${c2.dim("\u2500".repeat(40))}
|
|
39900
|
+
|
|
39901
|
+
`);
|
|
39897
39902
|
const checkSpinner = startInlineSpinner(`Checking for updates ${c2.dim(`(current: v${currentVersion})`)}`);
|
|
39898
39903
|
const info = await checkForUpdate(currentVersion, true);
|
|
39899
39904
|
const { exec: exec4, execSync: es2 } = await import("node:child_process");
|
|
@@ -39918,6 +39923,7 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
39918
39923
|
child.stdout?.resume();
|
|
39919
39924
|
});
|
|
39920
39925
|
if (needsSudo) {
|
|
39926
|
+
process.stdout.write("\x1B[?1049l");
|
|
39921
39927
|
renderInfo("Global npm directory requires elevated permissions.");
|
|
39922
39928
|
renderInfo("You'll be asked for your password once \u2014 it covers all update steps.");
|
|
39923
39929
|
safeWrite("\n");
|
|
@@ -39927,6 +39933,12 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
39927
39933
|
renderWarning("Could not acquire sudo credentials. Try: sudo npm i -g open-agents-ai");
|
|
39928
39934
|
return;
|
|
39929
39935
|
}
|
|
39936
|
+
process.stdout.write("\x1B[?1049h\x1B[H\x1B[2J");
|
|
39937
|
+
process.stdout.write(`
|
|
39938
|
+
${c2.bold("Open Agents Update")}
|
|
39939
|
+
${c2.dim("\u2500".repeat(40))}
|
|
39940
|
+
|
|
39941
|
+
`);
|
|
39930
39942
|
}
|
|
39931
39943
|
const sudoPrefix = needsSudo ? "sudo " : "";
|
|
39932
39944
|
let primaryUpdated = false;
|
|
@@ -39963,6 +39975,7 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
39963
39975
|
renderWarning(`Error:
|
|
39964
39976
|
${errPreview}`);
|
|
39965
39977
|
renderWarning(`Try manually: ${sudoPrefix}npm i -g open-agents-ai`);
|
|
39978
|
+
process.stdout.write("\x1B[?1049l");
|
|
39966
39979
|
return;
|
|
39967
39980
|
}
|
|
39968
39981
|
installSpinner.stop(`Update installed (v${info.latestVersion}).`);
|
|
@@ -39993,6 +40006,8 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
39993
40006
|
if (!primaryUpdated && !depsUpdated) {
|
|
39994
40007
|
renderInfo("Everything is up to date \u2014 no changes needed.");
|
|
39995
40008
|
safeWrite("\n");
|
|
40009
|
+
await new Promise((r) => setTimeout(r, 1e3));
|
|
40010
|
+
process.stdout.write("\x1B[?1049l");
|
|
39996
40011
|
return;
|
|
39997
40012
|
}
|
|
39998
40013
|
const rebuildSpinner = startInlineSpinner("Rebuilding native modules");
|
|
@@ -40065,6 +40080,7 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
40065
40080
|
const hadActiveTask = ctx.savePendingTaskState?.() ?? false;
|
|
40066
40081
|
const resumeFlag = hadActiveTask ? "1" : "update-only";
|
|
40067
40082
|
reloadSpinner.stop("Reloading\u2026");
|
|
40083
|
+
process.stdout.write("\x1B[?1049l");
|
|
40068
40084
|
const { execPath, argv } = process;
|
|
40069
40085
|
try {
|
|
40070
40086
|
const { execFileSync } = await import("node:child_process");
|
|
@@ -40074,7 +40090,6 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
40074
40090
|
env: { ...process.env, __OA_RESUMED: resumeFlag }
|
|
40075
40091
|
});
|
|
40076
40092
|
} catch {
|
|
40077
|
-
reloadSpinner.stop("Reload failed.");
|
|
40078
40093
|
renderWarning("Restart oa manually to use the new version.");
|
|
40079
40094
|
}
|
|
40080
40095
|
}
|
|
@@ -47821,19 +47836,6 @@ var init_status_bar = __esm({
|
|
|
47821
47836
|
const idx = Math.min(n - 1, stops.length - 1);
|
|
47822
47837
|
return stops[idx];
|
|
47823
47838
|
}
|
|
47824
|
-
/**
|
|
47825
|
-
* Cyan→magenta color spectrum for the alive LED (section 0).
|
|
47826
|
-
* 256-color ramp through the RGB cube: (0,5,5)→(5,0,5).
|
|
47827
|
-
* 1 peer = cyan, 5+ peers = magenta, 0 = dim gray (240).
|
|
47828
|
-
*/
|
|
47829
|
-
_aliveLedColor() {
|
|
47830
|
-
const n = this._exposePeerCount;
|
|
47831
|
-
if (n <= 0)
|
|
47832
|
-
return 240;
|
|
47833
|
-
const stops = [51, 81, 111, 141, 171, 201];
|
|
47834
|
-
const idx = Math.min(n - 1, stops.length - 1);
|
|
47835
|
-
return stops[idx];
|
|
47836
|
-
}
|
|
47837
47839
|
/** Update expose gateway status — only stores state, no blink timers */
|
|
47838
47840
|
setExposeStatus(status) {
|
|
47839
47841
|
this._expose = status;
|
|
@@ -48362,11 +48364,6 @@ var init_status_bar = __esm({
|
|
|
48362
48364
|
const compactOrder = [];
|
|
48363
48365
|
let modelSectionIdx = -1;
|
|
48364
48366
|
let versionSectionIdx = -1;
|
|
48365
|
-
if (this._expose) {
|
|
48366
|
-
const ledColor = this._exposeFlashOn ? this._aliveLedColor() : 240;
|
|
48367
|
-
const dot = `\x1B[38;5;${ledColor}m\u2B24\x1B[0m`;
|
|
48368
|
-
sections.push({ expanded: dot, compact: dot, expandedW: 1, compactW: 1, empty: false });
|
|
48369
|
-
}
|
|
48370
48367
|
const tokInRaw = m.promptTokens > 0 ? m.promptTokens : Math.max(m.estimatedContextTokens, 0);
|
|
48371
48368
|
const effectiveOut = this.effectiveCompletionTokens;
|
|
48372
48369
|
const tokOutRaw = effectiveOut > 0 ? effectiveOut : Math.ceil(m.totalTokens > 0 ? m.totalTokens - m.promptTokens : m.estimatedContextTokens * 0.3);
|
|
@@ -50120,7 +50117,7 @@ async function startInteractive(config, repoPath) {
|
|
|
50120
50117
|
}).catch(() => {
|
|
50121
50118
|
});
|
|
50122
50119
|
}
|
|
50123
|
-
const AUTO_UPDATE_INTERVAL_MS =
|
|
50120
|
+
const AUTO_UPDATE_INTERVAL_MS = 60 * 1e3;
|
|
50124
50121
|
const autoUpdateTimer = setInterval(() => {
|
|
50125
50122
|
const updateMode = savedSettings.updateMode ?? "auto";
|
|
50126
50123
|
if (updateMode === "manual")
|
package/package.json
CHANGED