open-agents-ai 0.138.92 → 0.138.93
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 +76 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38,6 +38,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
38
38
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
39
39
|
mod
|
|
40
40
|
));
|
|
41
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
41
42
|
|
|
42
43
|
// packages/cli/dist/config.js
|
|
43
44
|
import { readFileSync, existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
@@ -46311,9 +46312,25 @@ var init_banner = __esm({
|
|
|
46311
46312
|
rows = 3;
|
|
46312
46313
|
/** Callback fired after every frame render — used for header button overlay */
|
|
46313
46314
|
onAfterRender = null;
|
|
46315
|
+
/** When set, the version text on row 1 becomes a pulsing UPDATE button */
|
|
46316
|
+
_updateAvailable = null;
|
|
46317
|
+
/** Global frame counter for pulse animation (survives frame resets) */
|
|
46318
|
+
_pulseFrame = 0;
|
|
46314
46319
|
constructor() {
|
|
46315
46320
|
this.width = process.stdout.columns ?? 80;
|
|
46316
46321
|
}
|
|
46322
|
+
/** Signal that an update is available — enables pulsing UPDATE badge on row 1 */
|
|
46323
|
+
setUpdateAvailable(latestVersion) {
|
|
46324
|
+
this._updateAvailable = latestVersion;
|
|
46325
|
+
}
|
|
46326
|
+
/** Clear the update notification (after updating) */
|
|
46327
|
+
clearUpdateAvailable() {
|
|
46328
|
+
this._updateAvailable = null;
|
|
46329
|
+
}
|
|
46330
|
+
/** Whether an update badge is showing */
|
|
46331
|
+
get hasUpdate() {
|
|
46332
|
+
return this._updateAvailable !== null;
|
|
46333
|
+
}
|
|
46317
46334
|
/** Set the active banner design */
|
|
46318
46335
|
setDesign(design) {
|
|
46319
46336
|
this.stop();
|
|
@@ -46416,6 +46433,33 @@ var init_banner = __esm({
|
|
|
46416
46433
|
buf += "\x1B]8;;\x07";
|
|
46417
46434
|
}
|
|
46418
46435
|
}
|
|
46436
|
+
if (this._updateAvailable && this.currentDesign?.type === "default") {
|
|
46437
|
+
this._pulseFrame++;
|
|
46438
|
+
const t = (Math.sin(this._pulseFrame * 0.16) + 1) / 2;
|
|
46439
|
+
const ramp = [240, 241, 243, 245, 247, 249, 180, 178];
|
|
46440
|
+
const versionIdx = Math.round(t * (ramp.length - 1));
|
|
46441
|
+
const updateIdx = Math.round((1 - t) * (ramp.length - 1));
|
|
46442
|
+
const versionFg = ramp[versionIdx];
|
|
46443
|
+
const updateFg = ramp[updateIdx];
|
|
46444
|
+
const bgDark = 234;
|
|
46445
|
+
const vText = this.currentDesign.frames[0]?.grid[0]?.filter((c3) => c3.bold && (c3.fg === 178 || c3.fg === 226)).map((c3) => c3.char).join("") || "";
|
|
46446
|
+
const vStart = 3;
|
|
46447
|
+
const vLen = vText.length || 10;
|
|
46448
|
+
buf += `\x1B[1;${vStart}H\x1B[1;38;5;${versionFg}m\x1B[48;5;${bgDark}m`;
|
|
46449
|
+
for (let c3 = vStart - 1; c3 < vStart - 1 + vLen && c3 < this.width; c3++) {
|
|
46450
|
+
const cell = frame.grid[0]?.[c3];
|
|
46451
|
+
if (cell)
|
|
46452
|
+
buf += cell.char;
|
|
46453
|
+
}
|
|
46454
|
+
const badge = " UPDATE ";
|
|
46455
|
+
const badgeStart = vStart + vLen;
|
|
46456
|
+
if (badgeStart + badge.length < this.width) {
|
|
46457
|
+
buf += `\x1B]8;;oa-cmd:/update\x07`;
|
|
46458
|
+
buf += `\x1B[1;${badgeStart}H\x1B[1;38;5;${updateFg}m\x1B[48;5;236m${badge}`;
|
|
46459
|
+
buf += `\x1B]8;;\x07`;
|
|
46460
|
+
}
|
|
46461
|
+
buf += "\x1B[0m";
|
|
46462
|
+
}
|
|
46419
46463
|
buf += "\x1B8";
|
|
46420
46464
|
process.stdout.write(buf);
|
|
46421
46465
|
if (this.onAfterRender)
|
|
@@ -52319,6 +52363,21 @@ var init_system_metrics = __esm({
|
|
|
52319
52363
|
});
|
|
52320
52364
|
|
|
52321
52365
|
// packages/cli/dist/tui/text-selection.js
|
|
52366
|
+
var text_selection_exports = {};
|
|
52367
|
+
__export(text_selection_exports, {
|
|
52368
|
+
SEL_END: () => SEL_END,
|
|
52369
|
+
SEL_START: () => SEL_START,
|
|
52370
|
+
TextSelection: () => TextSelection,
|
|
52371
|
+
computeHeaderButtons: () => computeHeaderButtons,
|
|
52372
|
+
copyText: () => copyText,
|
|
52373
|
+
hitTestHeaderButton: () => hitTestHeaderButton,
|
|
52374
|
+
renderHeaderButtons: () => renderHeaderButtons,
|
|
52375
|
+
setHoveredButton: () => setHoveredButton,
|
|
52376
|
+
setPressedButton: () => setPressedButton,
|
|
52377
|
+
setUpdateBadgeRegion: () => setUpdateBadgeRegion,
|
|
52378
|
+
stripAnsi: () => stripAnsi3,
|
|
52379
|
+
visibleLength: () => visibleLength
|
|
52380
|
+
});
|
|
52322
52381
|
import { execSync as execSync29 } from "node:child_process";
|
|
52323
52382
|
function stripAnsi3(s) {
|
|
52324
52383
|
return s.replace(/\x1B\[[0-9;]*[A-Za-z]|\x1B\].*?(?:\x07|\x1B\\)/g, "");
|
|
@@ -52410,7 +52469,15 @@ function renderHeaderButtons(termWidth) {
|
|
|
52410
52469
|
}
|
|
52411
52470
|
return out;
|
|
52412
52471
|
}
|
|
52472
|
+
function setUpdateBadgeRegion(active, startCol, length) {
|
|
52473
|
+
_updateBadgeActive = active;
|
|
52474
|
+
_updateBadgeCol = startCol;
|
|
52475
|
+
_updateBadgeLen = length;
|
|
52476
|
+
}
|
|
52413
52477
|
function hitTestHeaderButton(row, col, termWidth) {
|
|
52478
|
+
if (_updateBadgeActive && row === 1 && col >= _updateBadgeCol && col < _updateBadgeCol + _updateBadgeLen) {
|
|
52479
|
+
return "/update";
|
|
52480
|
+
}
|
|
52414
52481
|
const buttons = computeHeaderButtons(termWidth);
|
|
52415
52482
|
for (const btn of buttons) {
|
|
52416
52483
|
if (row === btn.row && col >= btn.startCol && col <= btn.endCol) {
|
|
@@ -52419,7 +52486,7 @@ function hitTestHeaderButton(row, col, termWidth) {
|
|
|
52419
52486
|
}
|
|
52420
52487
|
return null;
|
|
52421
52488
|
}
|
|
52422
|
-
var SEL_BG, SEL_FG, SEL_START, SEL_END, TextSelection, _hoveredButtonCmd, _pressedButtonCmd, BTN_REST_BG, BTN_REST_FG, BTN_HOVER_BG, BTN_HOVER_FG, BTN_PRESS_BG, BTN_PRESS_FG;
|
|
52489
|
+
var SEL_BG, SEL_FG, SEL_START, SEL_END, TextSelection, _hoveredButtonCmd, _pressedButtonCmd, BTN_REST_BG, BTN_REST_FG, BTN_HOVER_BG, BTN_HOVER_FG, BTN_PRESS_BG, BTN_PRESS_FG, _updateBadgeActive, _updateBadgeCol, _updateBadgeLen;
|
|
52423
52490
|
var init_text_selection = __esm({
|
|
52424
52491
|
"packages/cli/dist/tui/text-selection.js"() {
|
|
52425
52492
|
"use strict";
|
|
@@ -52630,6 +52697,9 @@ var init_text_selection = __esm({
|
|
|
52630
52697
|
BTN_HOVER_FG = 252;
|
|
52631
52698
|
BTN_PRESS_BG = 249;
|
|
52632
52699
|
BTN_PRESS_FG = 234;
|
|
52700
|
+
_updateBadgeActive = false;
|
|
52701
|
+
_updateBadgeCol = 0;
|
|
52702
|
+
_updateBadgeLen = 0;
|
|
52633
52703
|
}
|
|
52634
52704
|
});
|
|
52635
52705
|
|
|
@@ -56214,6 +56284,10 @@ async function startInteractive(config, repoPath) {
|
|
|
56214
56284
|
if (!isResumed) {
|
|
56215
56285
|
checkForUpdate(version).then((updateInfo) => {
|
|
56216
56286
|
if (updateInfo) {
|
|
56287
|
+
banner.setUpdateAvailable(updateInfo.latestVersion);
|
|
56288
|
+
const vTextLen = ` OA v${version}`.length;
|
|
56289
|
+
const { setUpdateBadgeRegion: setUpdateBadgeRegion2 } = (init_text_selection(), __toCommonJS(text_selection_exports));
|
|
56290
|
+
setUpdateBadgeRegion2(true, vTextLen + 1, " UPDATE ".length);
|
|
56217
56291
|
const writeMsg = () => {
|
|
56218
56292
|
if (statusBar?.isActive && statusBar.isStreaming) {
|
|
56219
56293
|
setTimeout(writeMsg, 3e3);
|
|
@@ -56222,7 +56296,7 @@ async function startInteractive(config, repoPath) {
|
|
|
56222
56296
|
updateNotified = true;
|
|
56223
56297
|
if (statusBar?.isActive)
|
|
56224
56298
|
statusBar.beginContentWrite();
|
|
56225
|
-
renderInfo(`Update available: v${updateInfo.currentVersion} \u2192 v${c2.bold(c2.green(updateInfo.latestVersion))}.
|
|
56299
|
+
renderInfo(`Update available: v${updateInfo.currentVersion} \u2192 v${c2.bold(c2.green(updateInfo.latestVersion))}. Click UPDATE in header or run /update.`);
|
|
56226
56300
|
if (statusBar?.isActive)
|
|
56227
56301
|
statusBar.endContentWrite();
|
|
56228
56302
|
};
|
package/package.json
CHANGED