open-agents-ai 0.187.75 → 0.187.77

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 +85 -34
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -248711,7 +248711,7 @@ var init_pdf_to_text = __esm({
248711
248711
  const start2 = performance.now();
248712
248712
  const rawPath = args["path"];
248713
248713
  const pages = args["pages"];
248714
- const layout = args["layout"] === true;
248714
+ const layout2 = args["layout"] === true;
248715
248715
  const ocrIfEmpty = args["ocr_if_empty"] !== false;
248716
248716
  const language = args["language"] ?? "eng";
248717
248717
  if (!rawPath) {
@@ -248735,7 +248735,7 @@ var init_pdf_to_text = __esm({
248735
248735
  };
248736
248736
  }
248737
248737
  const cmdParts = ["pdftotext"];
248738
- if (layout)
248738
+ if (layout2)
248739
248739
  cmdParts.push("-layout");
248740
248740
  let firstPage;
248741
248741
  let lastPage;
@@ -278086,6 +278086,60 @@ var init_daemon_registry = __esm({
278086
278086
  }
278087
278087
  });
278088
278088
 
278089
+ // packages/cli/dist/tui/layout.js
278090
+ function layout() {
278091
+ const rows = _termRows;
278092
+ const cols = _termCols;
278093
+ const fh = _footerHeight;
278094
+ const headerTop = 1;
278095
+ const headerContent = 2;
278096
+ const headerBottom = 3;
278097
+ const contentTop = headerBottom + 1;
278098
+ const footerMetrics = rows;
278099
+ const footerBoxBottom = footerMetrics - 1;
278100
+ const footerBoxTop = rows - fh + 1;
278101
+ const footerInput = footerBoxTop + 1;
278102
+ const contentBottom = footerBoxTop - 1;
278103
+ const contentHeight = Math.max(1, contentBottom - contentTop + 1);
278104
+ return {
278105
+ rows,
278106
+ cols,
278107
+ headerTop,
278108
+ headerContent,
278109
+ headerBottom,
278110
+ contentTop,
278111
+ contentBottom,
278112
+ contentHeight,
278113
+ footerBoxTop,
278114
+ footerInput,
278115
+ footerBoxBottom,
278116
+ footerMetrics,
278117
+ scrollRegionTop: contentTop,
278118
+ scrollRegionBottom: contentBottom,
278119
+ footerHeight: fh,
278120
+ headerHeight: _headerHeight
278121
+ };
278122
+ }
278123
+ function setTermSize(rows, cols) {
278124
+ _termRows = rows;
278125
+ _termCols = cols;
278126
+ }
278127
+ function setFooterHeight(height) {
278128
+ _footerHeight = Math.max(FOOTER_MIN_ROWS, height);
278129
+ }
278130
+ var HEADER_ROWS, FOOTER_MIN_ROWS, _termRows, _termCols, _footerHeight, _headerHeight;
278131
+ var init_layout2 = __esm({
278132
+ "packages/cli/dist/tui/layout.js"() {
278133
+ "use strict";
278134
+ HEADER_ROWS = 3;
278135
+ FOOTER_MIN_ROWS = 4;
278136
+ _termRows = 24;
278137
+ _termCols = 80;
278138
+ _footerHeight = FOOTER_MIN_ROWS;
278139
+ _headerHeight = HEADER_ROWS;
278140
+ }
278141
+ });
278142
+
278089
278143
  // packages/cli/dist/tui/status-bar.js
278090
278144
  var status_bar_exports = {};
278091
278145
  __export(status_bar_exports, {
@@ -278127,6 +278181,7 @@ var init_status_bar = __esm({
278127
278181
  init_text_selection();
278128
278182
  init_daemon_registry();
278129
278183
  init_theme();
278184
+ init_layout2();
278130
278185
  EXPERT_TOOL_BASELINES = {
278131
278186
  file_read: 12,
278132
278187
  structured_read: 15,
@@ -279677,11 +279732,12 @@ var init_status_bar = __esm({
279677
279732
  this.updateFooterHeight();
279678
279733
  if (this._currentFooterHeight < 4)
279679
279734
  this._currentFooterHeight = 4;
279735
+ setTermSize(process.stdout.rows ?? 24, process.stdout.columns ?? 80);
279736
+ setFooterHeight(this._currentFooterHeight);
279680
279737
  this.cancelMouseIdle();
279681
279738
  this.enableMouseTracking();
279682
- const rows = process.stdout.rows ?? 24;
279683
- const pos = this.rowPositions(rows);
279684
- const scrollEnd = pos.scrollEnd;
279739
+ const L = layout();
279740
+ const scrollEnd = L.scrollRegionBottom;
279685
279741
  if (this.writeDepth === 1 && !this._origWrite) {
279686
279742
  this._origWrite = this._trueStdoutWrite;
279687
279743
  const origBound = this._trueStdoutWrite;
@@ -279856,10 +279912,8 @@ ${CONTENT_BG_SEQ}`);
279856
279912
  positionAtInput() {
279857
279913
  if (!this.active)
279858
279914
  return;
279859
- const rows = process.stdout.rows ?? 24;
279860
- const pos = this.rowPositions(rows);
279861
- const inputTextRow = pos.inputStartRow + 1;
279862
- this.termWrite(`\x1B[${inputTextRow};${this.promptWidth + 1}H\x1B[?25h`);
279915
+ const L = layout();
279916
+ this.termWrite(`\x1B[${L.footerInput};${this.promptWidth + 1}H\x1B[?25h`);
279863
279917
  }
279864
279918
  /** Strip ANSI escape codes to measure visible character width */
279865
279919
  static visWidth(s2) {
@@ -280209,6 +280263,8 @@ ${CONTENT_BG_SEQ}`);
280209
280263
  const newHeight = 1 + 1 + inputLines + suggestionRows;
280210
280264
  if (newHeight !== this._currentFooterHeight) {
280211
280265
  this._currentFooterHeight = newHeight;
280266
+ setTermSize(process.stdout.rows ?? 24, process.stdout.columns ?? 80);
280267
+ setFooterHeight(newHeight);
280212
280268
  return true;
280213
280269
  }
280214
280270
  return false;
@@ -280221,25 +280277,21 @@ ${CONTENT_BG_SEQ}`);
280221
280277
  return 1 + 1 + inputLines + suggestionRows !== this._currentFooterHeight;
280222
280278
  }
280223
280279
  /** Compute absolute row positions for all footer elements.
280224
- * Layout (top to bottom): input suggestions/braille metrics.
280225
- * When suggestions are active, they replace the braille row and expand upward. */
280226
- rowPositions(rows) {
280227
- const fh = this._currentFooterHeight;
280280
+ * DELEGATES TO layout() the centralized layout manager.
280281
+ * This method exists for backward compatibility with the ~100 call sites
280282
+ * that use `pos.inputStartRow`, `pos.scrollEnd`, etc. */
280283
+ rowPositions(_rows) {
280284
+ setTermSize(process.stdout.rows ?? 24, process.stdout.columns ?? 80);
280285
+ setFooterHeight(this._currentFooterHeight);
280286
+ const L = layout();
280228
280287
  const hasSugg = this._suggestions.length > 0;
280229
- const suggestionAndBottomRows = hasSugg ? this._suggestions.length + 1 : 1;
280230
- const totalFooter = fh;
280231
- const metricsRow = rows;
280232
- const boxBottomRow = metricsRow - 1;
280233
- const suggestStartRow = hasSugg ? boxBottomRow - this._suggestions.length : -1;
280234
- const inputEndRow = hasSugg ? suggestStartRow - 1 : boxBottomRow - 1;
280235
- const inputStartRow = rows - totalFooter + 1;
280236
280288
  return {
280237
- scrollEnd: Math.max(inputStartRow - 1, this.scrollRegionTop + 1),
280238
- inputStartRow,
280289
+ scrollEnd: L.scrollRegionBottom,
280290
+ inputStartRow: L.footerBoxTop,
280239
280291
  tabBarRow: -1,
280240
- bufferRow: boxBottomRow,
280241
- suggestStartRow,
280242
- metricsRow,
280292
+ bufferRow: L.footerBoxBottom,
280293
+ suggestStartRow: hasSugg ? L.footerBoxBottom - this._suggestions.length : -1,
280294
+ metricsRow: L.footerMetrics,
280243
280295
  topSepRow: -1,
280244
280296
  bottomSepRow: -1
280245
280297
  };
@@ -294114,15 +294166,15 @@ async function handleUpdate(subcommand, ctx3) {
294114
294166
  let _installProgress = 0;
294115
294167
  let _installTotal = 10;
294116
294168
  function renderInstallFrame(version4, _frame, statusLine) {
294117
- const cols = process.stdout.columns ?? 80;
294118
- const rows = process.stdout.rows ?? 24;
294169
+ const L = layout();
294170
+ const cols = L.cols;
294119
294171
  const { tuiAccent: getAccent, tuiBgSeq: getBgSeq, tuiBoxFg: getBoxFg } = (init_theme(), __toCommonJS(theme_exports));
294120
294172
  const accentColor = getAccent() < 0 ? 252 : getAccent();
294121
294173
  const boxFg = getBoxFg();
294122
294174
  const bgSeq = getBgSeq();
294123
- const contentTop = 4;
294124
- const contentBottom = rows - 4;
294125
- const contentHeight = Math.max(5, contentBottom - contentTop + 1);
294175
+ const contentTop = L.contentTop;
294176
+ const contentBottom = L.contentBottom;
294177
+ const contentHeight = L.contentHeight;
294126
294178
  let buf = "\x1B[?2026h\x1B7\x1B[?25l";
294127
294179
  for (let r2 = contentTop; r2 <= contentBottom; r2++) {
294128
294180
  buf += `\x1B[${r2};1H${bgSeq}\x1B[2K`;
@@ -294196,12 +294248,10 @@ async function handleUpdate(subcommand, ctx3) {
294196
294248
  dismiss() {
294197
294249
  unlockFooterRedraws();
294198
294250
  clearInterval(timer);
294199
- const rows = process.stdout.rows ?? 24;
294200
- const contentTop = 4;
294201
- const contentBottom = rows - 4;
294251
+ const LD = layout();
294202
294252
  const { tuiBgSeq: getDismissBg } = (init_theme(), __toCommonJS(theme_exports));
294203
294253
  let buf = "\x1B7";
294204
- for (let r2 = contentTop; r2 <= contentBottom; r2++) {
294254
+ for (let r2 = LD.contentTop; r2 <= LD.contentBottom; r2++) {
294205
294255
  buf += `\x1B[${r2};1H${getDismissBg()}\x1B[2K`;
294206
294256
  }
294207
294257
  buf += "\x1B8";
@@ -295143,6 +295193,7 @@ var init_commands = __esm({
295143
295193
  init_oa_directory();
295144
295194
  init_theme();
295145
295195
  init_status_bar();
295196
+ init_layout2();
295146
295197
  init_setup();
295147
295198
  init_listen();
295148
295199
  init_dist();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.75",
3
+ "version": "0.187.77",
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",