open-agents-ai 0.138.11 → 0.138.12

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.
Files changed (2) hide show
  1. package/dist/index.js +14 -64
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -52088,74 +52088,35 @@ var init_status_bar = __esm({
52088
52088
  * Must be called after readline is created.
52089
52089
  */
52090
52090
  /**
52091
- * Hook into readline to intercept scroll keys AND consume mouse escape
52092
- * sequences so they don't leak as garbage text into the input area.
52091
+ * Hook into readline to intercept Page Up/Down before readline uses them
52092
+ * for history navigation. Monkey-patches _ttyWrite the only reliable
52093
+ * interception point in Node.js readline.
52093
52094
  *
52094
- * Uses _ttyWrite monkey-patchthis is the ONLY reliable interception
52095
- * point in Node.js because readline's internal input handler can't be
52096
- * pre-empted by stream listeners (they're all observers).
52097
- *
52098
- * Mouse SGR sequences: \x1B[<N;X;YM / \x1B[<N;X;Ym
52099
- * Readline splits these across multiple _ttyWrite calls, so we also
52100
- * match partial fragments like ";25M" or "[<65;".
52095
+ * NO mouse reportingSGR mouse sequences can't be reliably intercepted
52096
+ * before readline splits them into garbage text. Scroll wheel support
52097
+ * is keyboard-only (Page Up/Down, Shift+Up/Down).
52101
52098
  */
52102
52099
  hookReadlineScroll(rl) {
52103
52100
  if (!rl || !rl._ttyWrite)
52104
52101
  return;
52105
52102
  const self = this;
52106
52103
  const origTtyWrite = rl._ttyWrite.bind(rl);
52107
- let swallowingMouse = false;
52108
52104
  rl._ttyWrite = function(s, key) {
52109
52105
  if (!self.active)
52110
52106
  return origTtyWrite(s, key);
52111
- const seq = s || "";
52112
- const keySeq = key?.sequence || "";
52113
- const fullMouse = /\x1B\[<(\d+);\d+;\d+[Mm]/.exec(seq) || /\x1B\[<(\d+);\d+;\d+[Mm]/.exec(keySeq);
52114
- if (fullMouse) {
52115
- const btn = parseInt(fullMouse[1]);
52116
- if (btn === 64)
52117
- self.scrollContentUp(3);
52118
- else if (btn === 65)
52119
- self.scrollContentDown(3);
52120
- return;
52121
- }
52122
- if (seq.includes("\x1B[<") || seq.includes("[<")) {
52123
- swallowingMouse = true;
52124
- if (/[Mm]/.test(seq.slice(seq.indexOf("<")))) {
52125
- const match = /(\d+)/.exec(seq.slice(seq.indexOf("<") + 1));
52126
- if (match) {
52127
- const btn = parseInt(match[1]);
52128
- if (btn === 64)
52129
- self.scrollContentUp(3);
52130
- else if (btn === 65)
52131
- self.scrollContentDown(3);
52132
- }
52133
- swallowingMouse = false;
52134
- }
52135
- return;
52136
- }
52137
- if (swallowingMouse) {
52138
- if (/[Mm]/.test(seq)) {
52139
- swallowingMouse = false;
52140
- }
52141
- return;
52142
- }
52143
- if (/^\d+;\d+;\d*[Mm]?$/.test(seq) || /^;\d+[Mm]$/.test(seq)) {
52144
- return;
52145
- }
52146
- if (key?.name === "pageup" || seq === "\x1B[5~") {
52107
+ if (key?.name === "pageup" || s === "\x1B[5~") {
52147
52108
  self.pageUpContent();
52148
52109
  return;
52149
52110
  }
52150
- if (key?.name === "pagedown" || seq === "\x1B[6~") {
52111
+ if (key?.name === "pagedown" || s === "\x1B[6~") {
52151
52112
  self.pageDownContent();
52152
52113
  return;
52153
52114
  }
52154
- if (key?.shift && key?.name === "up" || seq === "\x1B[1;2A") {
52115
+ if (key?.shift && key?.name === "up" || s === "\x1B[1;2A") {
52155
52116
  self.scrollContentUp(3);
52156
52117
  return;
52157
52118
  }
52158
- if (key?.shift && key?.name === "down" || seq === "\x1B[1;2B") {
52119
+ if (key?.shift && key?.name === "down" || s === "\x1B[1;2B") {
52159
52120
  self.scrollContentDown(3);
52160
52121
  return;
52161
52122
  }
@@ -53352,9 +53313,9 @@ async function startInteractive(config, repoPath) {
53352
53313
  initOaDirectory(repoRoot);
53353
53314
  const savedSettings = resolveSettings(repoRoot);
53354
53315
  if (process.stdout.isTTY && !isResumed) {
53355
- process.stdout.write("\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l\x1B[?1002h\x1B[?1006h");
53316
+ process.stdout.write("\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l");
53356
53317
  const restoreScreen = () => {
53357
- process.stdout.write("\x1B[?1006l\x1B[?1002l\x1B[?25h\x1B[?1049l");
53318
+ process.stdout.write("\x1B[?25h\x1B[?1049l");
53358
53319
  };
53359
53320
  process.on("exit", restoreScreen);
53360
53321
  process.on("SIGINT", () => {
@@ -53429,9 +53390,9 @@ async function startInteractive(config, repoPath) {
53429
53390
  const version = getVersion3();
53430
53391
  if (isResumed) {
53431
53392
  if (process.stdout.isTTY) {
53432
- process.stdout.write("\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l\x1B[?1002h\x1B[?1006h");
53393
+ process.stdout.write("\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l");
53433
53394
  const restoreScreen = () => {
53434
- process.stdout.write("\x1B[?1006l\x1B[?1002l\x1B[?25h\x1B[?1049l");
53395
+ process.stdout.write("\x1B[?25h\x1B[?1049l");
53435
53396
  };
53436
53397
  process.on("exit", restoreScreen);
53437
53398
  process.on("SIGINT", () => {
@@ -54296,17 +54257,6 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
54296
54257
  cohereToggle() {
54297
54258
  cohereEnabled = !cohereEnabled;
54298
54259
  statusBar.setCohereActive(cohereEnabled);
54299
- if (cohereEnabled) {
54300
- banner.setDesign(createCohereBanner());
54301
- const reserved = banner.start();
54302
- if (statusBar.isActive && reserved > 0)
54303
- statusBar.setScrollRegionTop(reserved + 1);
54304
- } else {
54305
- banner.setDesign(createDefaultBanner(version));
54306
- const reserved = banner.start();
54307
- if (statusBar.isActive && reserved > 0)
54308
- statusBar.setScrollRegionTop(reserved + 1);
54309
- }
54310
54260
  return cohereEnabled;
54311
54261
  },
54312
54262
  isCohere() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.138.11",
3
+ "version": "0.138.12",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",