open-agents-ai 0.14.2 → 0.14.3
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 +22 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -299,10 +299,23 @@ async function checkForUpdate(currentVersion, forceCheck = false) {
|
|
|
299
299
|
}
|
|
300
300
|
function performUpdate() {
|
|
301
301
|
try {
|
|
302
|
-
execSync(`npm install -g ${PACKAGE_NAME}@latest`, {
|
|
302
|
+
execSync(`npm install -g ${PACKAGE_NAME}@latest --prefer-online`, {
|
|
303
303
|
stdio: "inherit",
|
|
304
304
|
timeout: 12e4
|
|
305
305
|
});
|
|
306
|
+
try {
|
|
307
|
+
const installed = execSync(`npm list -g ${PACKAGE_NAME} --depth=0 --json`, {
|
|
308
|
+
encoding: "utf-8",
|
|
309
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
310
|
+
timeout: 1e4
|
|
311
|
+
});
|
|
312
|
+
const parsed = JSON.parse(installed);
|
|
313
|
+
const ver = parsed?.dependencies?.[PACKAGE_NAME]?.version;
|
|
314
|
+
if (ver) {
|
|
315
|
+
console.log(` Verified: ${PACKAGE_NAME}@${ver} installed globally.`);
|
|
316
|
+
}
|
|
317
|
+
} catch {
|
|
318
|
+
}
|
|
306
319
|
return true;
|
|
307
320
|
} catch {
|
|
308
321
|
return false;
|
|
@@ -310,7 +323,7 @@ function performUpdate() {
|
|
|
310
323
|
}
|
|
311
324
|
function performSilentUpdate() {
|
|
312
325
|
try {
|
|
313
|
-
execSync(`npm install -g ${PACKAGE_NAME}@latest`, {
|
|
326
|
+
execSync(`npm install -g ${PACKAGE_NAME}@latest --prefer-online`, {
|
|
314
327
|
stdio: "pipe",
|
|
315
328
|
timeout: 12e4
|
|
316
329
|
});
|
|
@@ -14797,7 +14810,10 @@ async function startInteractive(config, repoPath) {
|
|
|
14797
14810
|
const carousel = new Carousel();
|
|
14798
14811
|
let carouselLines = 0;
|
|
14799
14812
|
const version = getVersion();
|
|
14813
|
+
if (process.stdout.isTTY)
|
|
14814
|
+
process.stdout.write("\x1B[?1049h");
|
|
14800
14815
|
if (isResumed) {
|
|
14816
|
+
process.stdout.write("\x1B[2J\x1B[H");
|
|
14801
14817
|
renderInfo(`Updated to v${version} \u2014 picking up where you left off.
|
|
14802
14818
|
`);
|
|
14803
14819
|
} else {
|
|
@@ -15086,7 +15102,8 @@ async function startInteractive(config, repoPath) {
|
|
|
15086
15102
|
activeTask.runner.abort();
|
|
15087
15103
|
}
|
|
15088
15104
|
statusBar.deactivate();
|
|
15089
|
-
process.stdout.
|
|
15105
|
+
if (process.stdout.isTTY)
|
|
15106
|
+
process.stdout.write("\x1B[?1049l");
|
|
15090
15107
|
process.stdout.write(`${c2.dim("Goodbye!")}
|
|
15091
15108
|
`);
|
|
15092
15109
|
rl.close();
|
|
@@ -15275,7 +15292,8 @@ Summarize or analyze this transcription as appropriate.`;
|
|
|
15275
15292
|
});
|
|
15276
15293
|
rl.on("close", () => {
|
|
15277
15294
|
statusBar.deactivate();
|
|
15278
|
-
process.stdout.
|
|
15295
|
+
if (process.stdout.isTTY)
|
|
15296
|
+
process.stdout.write("\x1B[?1049l");
|
|
15279
15297
|
process.stdout.write(`${c2.dim("Goodbye!")}
|
|
15280
15298
|
`);
|
|
15281
15299
|
process.exit(0);
|
package/package.json
CHANGED