open-agents-ai 0.184.64 → 0.184.66
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 +70 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5588,6 +5588,7 @@ async function handleCmd(cmd) {
|
|
|
5588
5588
|
var sponsorData = {
|
|
5589
5589
|
type: 'sponsor.announce',
|
|
5590
5590
|
peerId: globalThis._daemonPeerId || 'unknown',
|
|
5591
|
+
libp2pPeerId: globalThis._daemonPeerId || '',
|
|
5591
5592
|
name: args.name || 'Anonymous Sponsor',
|
|
5592
5593
|
models: args.models || [],
|
|
5593
5594
|
tunnelUrl: args.tunnel_url || null,
|
|
@@ -48312,8 +48313,21 @@ async function handleSlashCommand(input, ctx) {
|
|
|
48312
48313
|
if (!sponsorName)
|
|
48313
48314
|
sponsorName = "OA Sponsor";
|
|
48314
48315
|
}
|
|
48316
|
+
let stablePeerId = `oa-${Date.now()}`;
|
|
48317
|
+
let libp2pPeerId = "";
|
|
48318
|
+
try {
|
|
48319
|
+
const nexus = new NexusTool(projectDir);
|
|
48320
|
+
const statusCheck = String(await nexus.execute({ action: "status" }) ?? "");
|
|
48321
|
+
const peerMatch = statusCheck.match(/peerId:\s*(12D3KooW\S+)/i);
|
|
48322
|
+
if (peerMatch) {
|
|
48323
|
+
stablePeerId = peerMatch[1];
|
|
48324
|
+
libp2pPeerId = peerMatch[1];
|
|
48325
|
+
}
|
|
48326
|
+
} catch {
|
|
48327
|
+
}
|
|
48315
48328
|
const sponsorPayload = {
|
|
48316
|
-
peerId:
|
|
48329
|
+
peerId: stablePeerId,
|
|
48330
|
+
libp2pPeerId,
|
|
48317
48331
|
name: sponsorName,
|
|
48318
48332
|
models: allModels,
|
|
48319
48333
|
tunnelUrl: sponsorUrl,
|
|
@@ -53057,6 +53071,8 @@ var init_banner = __esm({
|
|
|
53057
53071
|
_updateAvailable = null;
|
|
53058
53072
|
/** Global frame counter for pulse animation (survives frame resets) */
|
|
53059
53073
|
_pulseFrame = 0;
|
|
53074
|
+
/** Whether header zone is focused (Ctrl+Tab highlight) */
|
|
53075
|
+
_focused = false;
|
|
53060
53076
|
constructor() {
|
|
53061
53077
|
this.width = process.stdout.columns ?? 80;
|
|
53062
53078
|
}
|
|
@@ -53068,6 +53084,10 @@ var init_banner = __esm({
|
|
|
53068
53084
|
clearUpdateAvailable() {
|
|
53069
53085
|
this._updateAvailable = null;
|
|
53070
53086
|
}
|
|
53087
|
+
/** Set header focus state for Ctrl+Tab visual highlight */
|
|
53088
|
+
setFocused(focused) {
|
|
53089
|
+
this._focused = focused;
|
|
53090
|
+
}
|
|
53071
53091
|
/** Whether an update badge is showing */
|
|
53072
53092
|
get hasUpdate() {
|
|
53073
53093
|
return this._updateAvailable !== null;
|
|
@@ -53169,6 +53189,11 @@ var init_banner = __esm({
|
|
|
53169
53189
|
buf += "\x1B]8;;\x07";
|
|
53170
53190
|
}
|
|
53171
53191
|
}
|
|
53192
|
+
if (this._focused) {
|
|
53193
|
+
for (let r = 0; r < this.rows; r++) {
|
|
53194
|
+
buf += `\x1B[${r + 1};1H\x1B[38;5;178m\x1B[48;5;234m\u258E\x1B[0m`;
|
|
53195
|
+
}
|
|
53196
|
+
}
|
|
53172
53197
|
if (this._updateAvailable && this.currentDesign?.type === "default") {
|
|
53173
53198
|
this._pulseFrame++;
|
|
53174
53199
|
const t = (Math.sin(this._pulseFrame * 0.16) + 1) / 2;
|
|
@@ -53211,7 +53236,9 @@ var init_banner = __esm({
|
|
|
53211
53236
|
}
|
|
53212
53237
|
buf += "\x1B[0m";
|
|
53213
53238
|
}
|
|
53214
|
-
|
|
53239
|
+
const termRows = process.stdout.rows ?? 24;
|
|
53240
|
+
const inputRow = termRows - 2;
|
|
53241
|
+
buf += `\x1B[${inputRow};1H\x1B[0m\x1B[?2026l`;
|
|
53215
53242
|
process.stdout.write(buf);
|
|
53216
53243
|
if (this.onAfterRender)
|
|
53217
53244
|
this.onAfterRender();
|
|
@@ -58857,7 +58884,7 @@ var init_braille_spinner = __esm({
|
|
|
58857
58884
|
* high SNR produces smooth coherent waves (clean signal propagation).
|
|
58858
58885
|
* - Dream mode: slower, deeper breathing with warm amber color override.
|
|
58859
58886
|
*/
|
|
58860
|
-
render(width) {
|
|
58887
|
+
render(width, hintColor) {
|
|
58861
58888
|
const m = this._metrics;
|
|
58862
58889
|
const useExtended = m.isStreaming || m.isDreaming || m.mood !== "neutral";
|
|
58863
58890
|
const wave = useExtended ? WAVE_EXT : WAVE;
|
|
@@ -58925,7 +58952,7 @@ var init_braille_spinner = __esm({
|
|
|
58925
58952
|
ch = sparseChars[Math.floor(scatter * sparseChars.length * 3.33) % sparseChars.length];
|
|
58926
58953
|
}
|
|
58927
58954
|
}
|
|
58928
|
-
const color = activeColorRamp[Math.min(scaledIdx, activeColorRamp.length - 1)];
|
|
58955
|
+
const color = hintColor ?? activeColorRamp[Math.min(scaledIdx, activeColorRamp.length - 1)];
|
|
58929
58956
|
if (color !== lastColor) {
|
|
58930
58957
|
buf += `\x1B[38;5;${color}m`;
|
|
58931
58958
|
lastColor = color;
|
|
@@ -59839,6 +59866,10 @@ var init_status_bar = __esm({
|
|
|
59839
59866
|
_countdown = 0;
|
|
59840
59867
|
_recBlink = true;
|
|
59841
59868
|
_recBlinkTimer = null;
|
|
59869
|
+
/** Current focus zone for Ctrl+Tab cycling */
|
|
59870
|
+
_focusedZone = "footer";
|
|
59871
|
+
/** Callback to notify header (banner) of focus changes */
|
|
59872
|
+
_headerFocusHandler = null;
|
|
59842
59873
|
/** Whether agent is actively processing (braille animation) */
|
|
59843
59874
|
_processing = false;
|
|
59844
59875
|
_brailleSpinner = new BrailleSpinner();
|
|
@@ -60409,6 +60440,25 @@ var init_status_bar = __esm({
|
|
|
60409
60440
|
get isStreaming() {
|
|
60410
60441
|
return this.writeDepth > 0;
|
|
60411
60442
|
}
|
|
60443
|
+
/** Get current focused zone */
|
|
60444
|
+
get focusedZone() {
|
|
60445
|
+
return this._focusedZone;
|
|
60446
|
+
}
|
|
60447
|
+
/** Set callback for header focus changes (wired by interactive.ts to banner) */
|
|
60448
|
+
setHeaderFocusHandler(handler) {
|
|
60449
|
+
this._headerFocusHandler = handler;
|
|
60450
|
+
}
|
|
60451
|
+
/** Cycle focus: footer → header → content → footer */
|
|
60452
|
+
cycleFocus() {
|
|
60453
|
+
const order = ["footer", "header", "content"];
|
|
60454
|
+
const idx = order.indexOf(this._focusedZone);
|
|
60455
|
+
this._focusedZone = order[(idx + 1) % order.length];
|
|
60456
|
+
this._headerFocusHandler?.(this._focusedZone === "header");
|
|
60457
|
+
if (this.active) {
|
|
60458
|
+
this._bannerRefresh?.();
|
|
60459
|
+
this.renderFooterAndPositionInput();
|
|
60460
|
+
}
|
|
60461
|
+
}
|
|
60412
60462
|
/** Set/get COHERE participation state — shows 🌐 in metrics when active */
|
|
60413
60463
|
setCohereActive(active) {
|
|
60414
60464
|
this._cohereActive = active;
|
|
@@ -61045,6 +61095,13 @@ ${CONTENT_BG_SEQ}`);
|
|
|
61045
61095
|
const compactOrder = [];
|
|
61046
61096
|
let modelSectionIdx = -1;
|
|
61047
61097
|
let versionSectionIdx = -1;
|
|
61098
|
+
{
|
|
61099
|
+
const zoneLabels = { header: "hdr", content: "cnt", footer: "ftr" };
|
|
61100
|
+
const zoneLabel = zoneLabels[this._focusedZone];
|
|
61101
|
+
const focusStr = pastel2(TEXT_PRIMARY, `\u258E${zoneLabel}`);
|
|
61102
|
+
const focusW = 1 + zoneLabel.length;
|
|
61103
|
+
sections.push({ expanded: focusStr, compact: focusStr, expandedW: focusW, compactW: focusW, empty: false });
|
|
61104
|
+
}
|
|
61048
61105
|
if (this._cohereActive) {
|
|
61049
61106
|
const cohereExpanded = "\x1B[38;5;214m\u{1F310}\x1B[0m";
|
|
61050
61107
|
sections.push({ expanded: cohereExpanded, compact: cohereExpanded, expandedW: 2, compactW: 2, empty: false });
|
|
@@ -61584,7 +61641,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
61584
61641
|
*/
|
|
61585
61642
|
buildBufferContent(width) {
|
|
61586
61643
|
if (this._processing && this._brailleSpinner.isRunning) {
|
|
61587
|
-
return this._brailleSpinner.render(width);
|
|
61644
|
+
return this._brailleSpinner.render(width, PANEL_BG + 1);
|
|
61588
61645
|
}
|
|
61589
61646
|
return "";
|
|
61590
61647
|
}
|
|
@@ -61648,6 +61705,10 @@ ${CONTENT_BG_SEQ}`);
|
|
|
61648
61705
|
onCtrlO();
|
|
61649
61706
|
return;
|
|
61650
61707
|
}
|
|
61708
|
+
if (key?.ctrl && key?.name === "tab" || s === "\x1B[9;5u") {
|
|
61709
|
+
self.cycleFocus();
|
|
61710
|
+
return;
|
|
61711
|
+
}
|
|
61651
61712
|
if (key?.ctrl && key?.shift && key?.name === "b") {
|
|
61652
61713
|
self.armBlockSelection();
|
|
61653
61714
|
return;
|
|
@@ -64931,6 +64992,10 @@ Review its full output in the [${id}] tab or via full_sub_agent(action='output',
|
|
|
64931
64992
|
statusBar.setBannerRefresh(() => {
|
|
64932
64993
|
banner.renderCurrentFrame();
|
|
64933
64994
|
});
|
|
64995
|
+
statusBar.setHeaderFocusHandler((focused) => {
|
|
64996
|
+
banner.setFocused(focused);
|
|
64997
|
+
banner.renderCurrentFrame();
|
|
64998
|
+
});
|
|
64934
64999
|
const { onOverlayLeave: onOverlayLeave2 } = await Promise.resolve().then(() => (init_overlay_lock(), overlay_lock_exports));
|
|
64935
65000
|
onOverlayLeave2(() => {
|
|
64936
65001
|
banner.renderCurrentFrame();
|
package/package.json
CHANGED