open-agents-ai 0.138.98 → 0.139.0
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 +91 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37863,8 +37863,8 @@ function tuiSelect(opts) {
|
|
|
37863
37863
|
}
|
|
37864
37864
|
const reservedTopBottom = 6;
|
|
37865
37865
|
const hasCrumbs = opts.breadcrumbs && opts.breadcrumbs.length > 0;
|
|
37866
|
-
const selectChrome = hasCrumbs ?
|
|
37867
|
-
const contentArea = opts.availableRows
|
|
37866
|
+
const selectChrome = (hasCrumbs ? 11 : 10) + 3;
|
|
37867
|
+
const contentArea = opts.availableRows ? opts.availableRows + reservedTopBottom : process.stdout.rows ?? 24;
|
|
37868
37868
|
const maxVisible = opts.maxVisible ?? Math.max(3, contentArea - selectChrome);
|
|
37869
37869
|
let scrollOffset = 0;
|
|
37870
37870
|
let lastRenderedLines = 0;
|
|
@@ -37905,6 +37905,7 @@ function tuiSelect(opts) {
|
|
|
37905
37905
|
function render() {
|
|
37906
37906
|
overlayWrite("\x1B[48;5;234m\x1B[H\x1B[2J");
|
|
37907
37907
|
const lines = [];
|
|
37908
|
+
lines.push("", "", "");
|
|
37908
37909
|
if (hasBreadcrumbs) {
|
|
37909
37910
|
const trail = opts.breadcrumbs.map((b) => selectColors.dim(b)).join(selectColors.dim(" \u203A "));
|
|
37910
37911
|
lines.push(`
|
|
@@ -46533,6 +46534,20 @@ var init_banner = __esm({
|
|
|
46533
46534
|
buf += `\x1B]8;;oa-cmd:/update\x07`;
|
|
46534
46535
|
buf += `\x1B[1;${badgeStart}H\x1B[1;38;5;${updateFg}m\x1B[48;5;236m${badge}`;
|
|
46535
46536
|
buf += `\x1B]8;;\x07`;
|
|
46537
|
+
const mnemonicStartCol = badgeStart + badge.length;
|
|
46538
|
+
const gridRow = frame.grid[0];
|
|
46539
|
+
if (gridRow) {
|
|
46540
|
+
const origMnemonicStart = vStart - 1 + vLen;
|
|
46541
|
+
let mnBuf = `\x1B[1;${mnemonicStartCol}H\x1B[0;38;5;240m\x1B[48;5;${bgDark}m`;
|
|
46542
|
+
for (let c3 = origMnemonicStart; c3 < gridRow.length && c3 < Math.floor(this.width * 0.44); c3++) {
|
|
46543
|
+
const cell = gridRow[c3];
|
|
46544
|
+
if (cell && cell.char !== " " && !cell.bold)
|
|
46545
|
+
mnBuf += cell.char;
|
|
46546
|
+
else if (cell)
|
|
46547
|
+
mnBuf += cell.char;
|
|
46548
|
+
}
|
|
46549
|
+
buf += mnBuf;
|
|
46550
|
+
}
|
|
46536
46551
|
}
|
|
46537
46552
|
buf += "\x1B[0m";
|
|
46538
46553
|
}
|
|
@@ -51957,7 +51972,7 @@ function themeForTool(toolName) {
|
|
|
51957
51972
|
return THEME_DEFAULT;
|
|
51958
51973
|
}
|
|
51959
51974
|
}
|
|
51960
|
-
var DENSITY, WAVE, THEME_DEFAULT, THEME_FILE, THEME_SHELL, THEME_WEB, THEME_SEARCH, THEME_MEMORY, THEME_SKILL, THEME_TOOL_CREATE, THEME_DREAM, DEFAULT_METRICS, BrailleSpinner;
|
|
51975
|
+
var DENSITY, WAVE, EXTENDED_DENSITY, WAVE_EXT, particleHash, MOOD_RAMPS, THEME_DEFAULT, THEME_FILE, THEME_SHELL, THEME_WEB, THEME_SEARCH, THEME_MEMORY, THEME_SKILL, THEME_TOOL_CREATE, THEME_DREAM, DEFAULT_METRICS, BrailleSpinner;
|
|
51961
51976
|
var init_braille_spinner = __esm({
|
|
51962
51977
|
"packages/cli/dist/tui/braille-spinner.js"() {
|
|
51963
51978
|
"use strict";
|
|
@@ -51982,6 +51997,47 @@ var init_braille_spinner = __esm({
|
|
|
51982
51997
|
// all dots
|
|
51983
51998
|
];
|
|
51984
51999
|
WAVE = [...DENSITY, ...DENSITY.slice(1, -1).reverse()];
|
|
52000
|
+
EXTENDED_DENSITY = [
|
|
52001
|
+
"\u2800",
|
|
52002
|
+
// empty
|
|
52003
|
+
"\xB7",
|
|
52004
|
+
// middle dot (matches header sparse particle)
|
|
52005
|
+
"\u2840",
|
|
52006
|
+
// dot 7
|
|
52007
|
+
"\u28C0",
|
|
52008
|
+
// dots 7,8
|
|
52009
|
+
"\u2591",
|
|
52010
|
+
// ░ light shade (header particle)
|
|
52011
|
+
"\u28E4",
|
|
52012
|
+
// dots 3,6,7,8
|
|
52013
|
+
"\u2592",
|
|
52014
|
+
// ▒ medium shade
|
|
52015
|
+
"\u28F7",
|
|
52016
|
+
// dots 1,2,3,5,6,7,8
|
|
52017
|
+
"\u2593",
|
|
52018
|
+
// ▓ dark shade
|
|
52019
|
+
"\u28FF",
|
|
52020
|
+
// all dots
|
|
52021
|
+
"\u2588"
|
|
52022
|
+
// █ full block (header solid)
|
|
52023
|
+
];
|
|
52024
|
+
WAVE_EXT = [...EXTENDED_DENSITY, ...EXTENDED_DENSITY.slice(1, -1).reverse()];
|
|
52025
|
+
particleHash = (col, frame) => {
|
|
52026
|
+
const x = col * 13 + frame * 3 + 37;
|
|
52027
|
+
return (x * x * 31 + x * 17 + 59) % 97 / 97;
|
|
52028
|
+
};
|
|
52029
|
+
MOOD_RAMPS = {
|
|
52030
|
+
neutral: [237, 94, 130, 136, 172, 172, 178, 178, 214],
|
|
52031
|
+
// default amber→yellow
|
|
52032
|
+
success: [237, 22, 28, 34, 40, 46, 47, 48, 49],
|
|
52033
|
+
// green pulse
|
|
52034
|
+
error: [237, 52, 88, 124, 160, 196, 197, 203, 209],
|
|
52035
|
+
// red alert
|
|
52036
|
+
waiting: [237, 24, 25, 31, 32, 38, 39, 45, 51],
|
|
52037
|
+
// cool blue
|
|
52038
|
+
thinking: [237, 55, 91, 127, 163, 164, 170, 176, 213]
|
|
52039
|
+
// purple contemplation
|
|
52040
|
+
};
|
|
51985
52041
|
THEME_DEFAULT = {
|
|
51986
52042
|
ramp: [237, 94, 130, 136, 172, 172, 178, 178, 214],
|
|
51987
52043
|
// grey → amber → yellow (matches header)
|
|
@@ -52024,7 +52080,8 @@ var init_braille_spinner = __esm({
|
|
|
52024
52080
|
tokenRate: 0,
|
|
52025
52081
|
isStreaming: false,
|
|
52026
52082
|
snr: 0.5,
|
|
52027
|
-
isDreaming: false
|
|
52083
|
+
isDreaming: false,
|
|
52084
|
+
mood: "neutral"
|
|
52028
52085
|
};
|
|
52029
52086
|
BrailleSpinner = class {
|
|
52030
52087
|
frame = 0;
|
|
@@ -52096,10 +52153,15 @@ var init_braille_spinner = __esm({
|
|
|
52096
52153
|
* - Dream mode: slower, deeper breathing with warm amber color override.
|
|
52097
52154
|
*/
|
|
52098
52155
|
render(width) {
|
|
52099
|
-
const cycleLen = WAVE.length;
|
|
52100
52156
|
const m = this._metrics;
|
|
52157
|
+
const useExtended = m.isStreaming || m.isDreaming || m.mood !== "neutral";
|
|
52158
|
+
const wave = useExtended ? WAVE_EXT : WAVE;
|
|
52159
|
+
const cycleLen = wave.length;
|
|
52101
52160
|
const activeTheme = m.isDreaming ? THEME_DREAM : this.theme;
|
|
52102
|
-
const
|
|
52161
|
+
const moodRamp = m.mood !== "neutral" ? MOOD_RAMPS[m.mood] : null;
|
|
52162
|
+
const baseRamp = moodRamp ?? (m.isDreaming ? THEME_DREAM.ramp : activeTheme.ramp);
|
|
52163
|
+
const extRamp = useExtended ? [...baseRamp, baseRamp[baseRamp.length - 1], baseRamp[baseRamp.length - 1]] : baseRamp;
|
|
52164
|
+
const activeColorRamp = buildColorRamp(extRamp);
|
|
52103
52165
|
const baseSpeed = activeTheme.speed;
|
|
52104
52166
|
const breathRate = m.isDreaming ? 0.04 : 0.08;
|
|
52105
52167
|
const breathPhase = Math.sin(this.frame * breathRate);
|
|
@@ -52109,6 +52171,10 @@ var init_braille_spinner = __esm({
|
|
|
52109
52171
|
speed = baseSpeed + rateBoost + breathPhase * 0.3;
|
|
52110
52172
|
} else if (m.isDreaming) {
|
|
52111
52173
|
speed = baseSpeed * 0.6 + breathPhase * 1.2;
|
|
52174
|
+
} else if (m.mood === "waiting") {
|
|
52175
|
+
speed = baseSpeed * 0.5 + breathPhase * 0.5;
|
|
52176
|
+
} else if (m.mood === "thinking") {
|
|
52177
|
+
speed = baseSpeed * 0.8 + breathPhase * 1.5;
|
|
52112
52178
|
} else {
|
|
52113
52179
|
speed = baseSpeed + breathPhase * 0.8;
|
|
52114
52180
|
}
|
|
@@ -52119,31 +52185,42 @@ var init_braille_spinner = __esm({
|
|
|
52119
52185
|
const slinkyFreq = 0.02 + (m.isStreaming ? 0.01 : 0);
|
|
52120
52186
|
const slinkyAmp = 1.5 + pressure * 2;
|
|
52121
52187
|
const jitterSeed = this.frame * 7919;
|
|
52188
|
+
const moodWaveShift = m.mood === "error" ? Math.sin(this.frame * 0.3) * 2 : 0;
|
|
52189
|
+
const moodDensityBoost = m.mood === "success" ? 0.2 : m.mood === "error" ? 0.3 : 0;
|
|
52122
52190
|
let buf = "";
|
|
52123
52191
|
let lastColor = -1;
|
|
52192
|
+
const halfCycle = Math.ceil(cycleLen / 2);
|
|
52124
52193
|
for (let col = 0; col < width; col++) {
|
|
52125
52194
|
const slinkyOffset = Math.sin(col * 0.1 + this.frame * slinkyFreq) * slinkyAmp;
|
|
52126
52195
|
const jitterHash = Math.sin((col * 127 + jitterSeed) * 1e-3) * 2 + Math.cos((col * 311 + jitterSeed) * 7e-4) * 1.5;
|
|
52127
52196
|
const snrJitter = jitterHash * entropy * 3;
|
|
52128
|
-
const rawPhase = col * speed + this.frame + slinkyOffset + snrJitter;
|
|
52197
|
+
const rawPhase = col * speed + this.frame + slinkyOffset + snrJitter + moodWaveShift;
|
|
52129
52198
|
const normalizedPhase = (rawPhase % cycleLen + cycleLen) % cycleLen;
|
|
52130
52199
|
const waveIdx = Math.round(normalizedPhase) % cycleLen;
|
|
52131
52200
|
let amplitude;
|
|
52132
|
-
if (waveIdx <=
|
|
52201
|
+
if (waveIdx <= halfCycle) {
|
|
52133
52202
|
amplitude = waveIdx;
|
|
52134
52203
|
} else {
|
|
52135
|
-
amplitude =
|
|
52204
|
+
amplitude = cycleLen - waveIdx;
|
|
52136
52205
|
}
|
|
52137
|
-
const
|
|
52206
|
+
const effectiveDensity = Math.min(1, densityScale + moodDensityBoost);
|
|
52207
|
+
const scaledAmplitude = Math.round(amplitude * effectiveDensity);
|
|
52138
52208
|
let scaledIdx;
|
|
52139
|
-
if (waveIdx <=
|
|
52209
|
+
if (waveIdx <= halfCycle) {
|
|
52140
52210
|
scaledIdx = scaledAmplitude;
|
|
52141
52211
|
} else {
|
|
52142
|
-
scaledIdx =
|
|
52212
|
+
scaledIdx = cycleLen - scaledAmplitude;
|
|
52143
52213
|
}
|
|
52144
52214
|
scaledIdx = Math.max(0, Math.min(cycleLen - 1, scaledIdx));
|
|
52145
|
-
|
|
52146
|
-
|
|
52215
|
+
let ch = wave[scaledIdx];
|
|
52216
|
+
if (useExtended && scaledIdx <= 2 && scaledIdx > 0) {
|
|
52217
|
+
const scatter = particleHash(col, this.frame);
|
|
52218
|
+
if (scatter < 0.3) {
|
|
52219
|
+
const sparseChars = ["\xB7", "\u2801", "\u2802", "\u2840", "\u2804"];
|
|
52220
|
+
ch = sparseChars[Math.floor(scatter * sparseChars.length * 3.33) % sparseChars.length];
|
|
52221
|
+
}
|
|
52222
|
+
}
|
|
52223
|
+
const color = activeColorRamp[Math.min(scaledIdx, activeColorRamp.length - 1)];
|
|
52147
52224
|
if (color !== lastColor) {
|
|
52148
52225
|
buf += `\x1B[38;5;${color}m`;
|
|
52149
52226
|
lastColor = color;
|
package/package.json
CHANGED