open-agents-ai 0.138.98 → 0.138.99
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 +74 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51957,7 +51957,7 @@ function themeForTool(toolName) {
|
|
|
51957
51957
|
return THEME_DEFAULT;
|
|
51958
51958
|
}
|
|
51959
51959
|
}
|
|
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;
|
|
51960
|
+
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
51961
|
var init_braille_spinner = __esm({
|
|
51962
51962
|
"packages/cli/dist/tui/braille-spinner.js"() {
|
|
51963
51963
|
"use strict";
|
|
@@ -51982,6 +51982,47 @@ var init_braille_spinner = __esm({
|
|
|
51982
51982
|
// all dots
|
|
51983
51983
|
];
|
|
51984
51984
|
WAVE = [...DENSITY, ...DENSITY.slice(1, -1).reverse()];
|
|
51985
|
+
EXTENDED_DENSITY = [
|
|
51986
|
+
"\u2800",
|
|
51987
|
+
// empty
|
|
51988
|
+
"\xB7",
|
|
51989
|
+
// middle dot (matches header sparse particle)
|
|
51990
|
+
"\u2840",
|
|
51991
|
+
// dot 7
|
|
51992
|
+
"\u28C0",
|
|
51993
|
+
// dots 7,8
|
|
51994
|
+
"\u2591",
|
|
51995
|
+
// ░ light shade (header particle)
|
|
51996
|
+
"\u28E4",
|
|
51997
|
+
// dots 3,6,7,8
|
|
51998
|
+
"\u2592",
|
|
51999
|
+
// ▒ medium shade
|
|
52000
|
+
"\u28F7",
|
|
52001
|
+
// dots 1,2,3,5,6,7,8
|
|
52002
|
+
"\u2593",
|
|
52003
|
+
// ▓ dark shade
|
|
52004
|
+
"\u28FF",
|
|
52005
|
+
// all dots
|
|
52006
|
+
"\u2588"
|
|
52007
|
+
// █ full block (header solid)
|
|
52008
|
+
];
|
|
52009
|
+
WAVE_EXT = [...EXTENDED_DENSITY, ...EXTENDED_DENSITY.slice(1, -1).reverse()];
|
|
52010
|
+
particleHash = (col, frame) => {
|
|
52011
|
+
const x = col * 13 + frame * 3 + 37;
|
|
52012
|
+
return (x * x * 31 + x * 17 + 59) % 97 / 97;
|
|
52013
|
+
};
|
|
52014
|
+
MOOD_RAMPS = {
|
|
52015
|
+
neutral: [237, 94, 130, 136, 172, 172, 178, 178, 214],
|
|
52016
|
+
// default amber→yellow
|
|
52017
|
+
success: [237, 22, 28, 34, 40, 46, 47, 48, 49],
|
|
52018
|
+
// green pulse
|
|
52019
|
+
error: [237, 52, 88, 124, 160, 196, 197, 203, 209],
|
|
52020
|
+
// red alert
|
|
52021
|
+
waiting: [237, 24, 25, 31, 32, 38, 39, 45, 51],
|
|
52022
|
+
// cool blue
|
|
52023
|
+
thinking: [237, 55, 91, 127, 163, 164, 170, 176, 213]
|
|
52024
|
+
// purple contemplation
|
|
52025
|
+
};
|
|
51985
52026
|
THEME_DEFAULT = {
|
|
51986
52027
|
ramp: [237, 94, 130, 136, 172, 172, 178, 178, 214],
|
|
51987
52028
|
// grey → amber → yellow (matches header)
|
|
@@ -52024,7 +52065,8 @@ var init_braille_spinner = __esm({
|
|
|
52024
52065
|
tokenRate: 0,
|
|
52025
52066
|
isStreaming: false,
|
|
52026
52067
|
snr: 0.5,
|
|
52027
|
-
isDreaming: false
|
|
52068
|
+
isDreaming: false,
|
|
52069
|
+
mood: "neutral"
|
|
52028
52070
|
};
|
|
52029
52071
|
BrailleSpinner = class {
|
|
52030
52072
|
frame = 0;
|
|
@@ -52096,10 +52138,15 @@ var init_braille_spinner = __esm({
|
|
|
52096
52138
|
* - Dream mode: slower, deeper breathing with warm amber color override.
|
|
52097
52139
|
*/
|
|
52098
52140
|
render(width) {
|
|
52099
|
-
const cycleLen = WAVE.length;
|
|
52100
52141
|
const m = this._metrics;
|
|
52142
|
+
const useExtended = m.isStreaming || m.isDreaming || m.mood !== "neutral";
|
|
52143
|
+
const wave = useExtended ? WAVE_EXT : WAVE;
|
|
52144
|
+
const cycleLen = wave.length;
|
|
52101
52145
|
const activeTheme = m.isDreaming ? THEME_DREAM : this.theme;
|
|
52102
|
-
const
|
|
52146
|
+
const moodRamp = m.mood !== "neutral" ? MOOD_RAMPS[m.mood] : null;
|
|
52147
|
+
const baseRamp = moodRamp ?? (m.isDreaming ? THEME_DREAM.ramp : activeTheme.ramp);
|
|
52148
|
+
const extRamp = useExtended ? [...baseRamp, baseRamp[baseRamp.length - 1], baseRamp[baseRamp.length - 1]] : baseRamp;
|
|
52149
|
+
const activeColorRamp = buildColorRamp(extRamp);
|
|
52103
52150
|
const baseSpeed = activeTheme.speed;
|
|
52104
52151
|
const breathRate = m.isDreaming ? 0.04 : 0.08;
|
|
52105
52152
|
const breathPhase = Math.sin(this.frame * breathRate);
|
|
@@ -52109,6 +52156,10 @@ var init_braille_spinner = __esm({
|
|
|
52109
52156
|
speed = baseSpeed + rateBoost + breathPhase * 0.3;
|
|
52110
52157
|
} else if (m.isDreaming) {
|
|
52111
52158
|
speed = baseSpeed * 0.6 + breathPhase * 1.2;
|
|
52159
|
+
} else if (m.mood === "waiting") {
|
|
52160
|
+
speed = baseSpeed * 0.5 + breathPhase * 0.5;
|
|
52161
|
+
} else if (m.mood === "thinking") {
|
|
52162
|
+
speed = baseSpeed * 0.8 + breathPhase * 1.5;
|
|
52112
52163
|
} else {
|
|
52113
52164
|
speed = baseSpeed + breathPhase * 0.8;
|
|
52114
52165
|
}
|
|
@@ -52119,31 +52170,42 @@ var init_braille_spinner = __esm({
|
|
|
52119
52170
|
const slinkyFreq = 0.02 + (m.isStreaming ? 0.01 : 0);
|
|
52120
52171
|
const slinkyAmp = 1.5 + pressure * 2;
|
|
52121
52172
|
const jitterSeed = this.frame * 7919;
|
|
52173
|
+
const moodWaveShift = m.mood === "error" ? Math.sin(this.frame * 0.3) * 2 : 0;
|
|
52174
|
+
const moodDensityBoost = m.mood === "success" ? 0.2 : m.mood === "error" ? 0.3 : 0;
|
|
52122
52175
|
let buf = "";
|
|
52123
52176
|
let lastColor = -1;
|
|
52177
|
+
const halfCycle = Math.ceil(cycleLen / 2);
|
|
52124
52178
|
for (let col = 0; col < width; col++) {
|
|
52125
52179
|
const slinkyOffset = Math.sin(col * 0.1 + this.frame * slinkyFreq) * slinkyAmp;
|
|
52126
52180
|
const jitterHash = Math.sin((col * 127 + jitterSeed) * 1e-3) * 2 + Math.cos((col * 311 + jitterSeed) * 7e-4) * 1.5;
|
|
52127
52181
|
const snrJitter = jitterHash * entropy * 3;
|
|
52128
|
-
const rawPhase = col * speed + this.frame + slinkyOffset + snrJitter;
|
|
52182
|
+
const rawPhase = col * speed + this.frame + slinkyOffset + snrJitter + moodWaveShift;
|
|
52129
52183
|
const normalizedPhase = (rawPhase % cycleLen + cycleLen) % cycleLen;
|
|
52130
52184
|
const waveIdx = Math.round(normalizedPhase) % cycleLen;
|
|
52131
52185
|
let amplitude;
|
|
52132
|
-
if (waveIdx <=
|
|
52186
|
+
if (waveIdx <= halfCycle) {
|
|
52133
52187
|
amplitude = waveIdx;
|
|
52134
52188
|
} else {
|
|
52135
|
-
amplitude =
|
|
52189
|
+
amplitude = cycleLen - waveIdx;
|
|
52136
52190
|
}
|
|
52137
|
-
const
|
|
52191
|
+
const effectiveDensity = Math.min(1, densityScale + moodDensityBoost);
|
|
52192
|
+
const scaledAmplitude = Math.round(amplitude * effectiveDensity);
|
|
52138
52193
|
let scaledIdx;
|
|
52139
|
-
if (waveIdx <=
|
|
52194
|
+
if (waveIdx <= halfCycle) {
|
|
52140
52195
|
scaledIdx = scaledAmplitude;
|
|
52141
52196
|
} else {
|
|
52142
|
-
scaledIdx =
|
|
52197
|
+
scaledIdx = cycleLen - scaledAmplitude;
|
|
52143
52198
|
}
|
|
52144
52199
|
scaledIdx = Math.max(0, Math.min(cycleLen - 1, scaledIdx));
|
|
52145
|
-
|
|
52146
|
-
|
|
52200
|
+
let ch = wave[scaledIdx];
|
|
52201
|
+
if (useExtended && scaledIdx <= 2 && scaledIdx > 0) {
|
|
52202
|
+
const scatter = particleHash(col, this.frame);
|
|
52203
|
+
if (scatter < 0.3) {
|
|
52204
|
+
const sparseChars = ["\xB7", "\u2801", "\u2802", "\u2840", "\u2804"];
|
|
52205
|
+
ch = sparseChars[Math.floor(scatter * sparseChars.length * 3.33) % sparseChars.length];
|
|
52206
|
+
}
|
|
52207
|
+
}
|
|
52208
|
+
const color = activeColorRamp[Math.min(scaledIdx, activeColorRamp.length - 1)];
|
|
52147
52209
|
if (color !== lastColor) {
|
|
52148
52210
|
buf += `\x1B[38;5;${color}m`;
|
|
52149
52211
|
lastColor = color;
|
package/package.json
CHANGED