open-agents-ai 0.160.0 → 0.161.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.
Files changed (2) hide show
  1. package/dist/index.js +42 -46
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -52995,15 +52995,22 @@ function buildDMNGatherPrompt(recentTaskSummaries, dueReminders, attentionItems,
52995
52995
  return ` - ${c3.taskType}: ${c3.attempts} attempts, ${rate}% success`;
52996
52996
  }).join("\n") : " (no data yet \u2014 this is a fresh start)";
52997
52997
  const reflectionsText = reflectionBuffer.length > 0 ? reflectionBuffer.map((r, i) => ` ${i + 1}. ${r}`).join("\n") : " (none)";
52998
- return loadPrompt3("tui/dmn-gather.md", {
52999
- recentTaskSummaries: recentTaskSummaries.length > 0 ? recentTaskSummaries.map((s, i) => ` ${i + 1}. ${s}`).join("\n") : " (no recent tasks)",
53000
- reflectionsText,
53001
- competenceReport,
53002
- dueReminders: dueReminders.length > 0 ? dueReminders.map((r) => ` - ${r}`).join("\n") : " (none)",
53003
- attentionItems: attentionItems.length > 0 ? attentionItems.map((a) => ` - ${a}`).join("\n") : " (none)",
53004
- memoryTopics: memoryTopics.length > 0 ? memoryTopics.map((t) => ` - ${t}`).join("\n") : " (none \u2014 fresh start)",
53005
- capabilities: capabilities.map((c3) => ` - ${c3}`).join("\n")
53006
- });
52998
+ try {
52999
+ return loadPrompt3("tui/dmn-gather.md", {
53000
+ recentTaskSummaries: recentTaskSummaries.length > 0 ? recentTaskSummaries.map((s, i) => ` ${i + 1}. ${s}`).join("\n") : " (no recent tasks)",
53001
+ reflectionsText,
53002
+ competenceReport,
53003
+ dueReminders: dueReminders.length > 0 ? dueReminders.map((r) => ` - ${r}`).join("\n") : " (none)",
53004
+ attentionItems: attentionItems.length > 0 ? attentionItems.map((a) => ` - ${a}`).join("\n") : " (none)",
53005
+ memoryTopics: memoryTopics.length > 0 ? memoryTopics.map((t) => ` - ${t}`).join("\n") : " (none \u2014 fresh start)",
53006
+ capabilities: capabilities.map((c3) => ` - ${c3}`).join("\n")
53007
+ });
53008
+ } catch {
53009
+ return `Gather observations about the agent's recent work:
53010
+ ${competenceReport}
53011
+
53012
+ Reflect on what went well and what could improve.`;
53013
+ }
53007
53014
  }
53008
53015
  function adaptTool3(tool) {
53009
53016
  return {
@@ -57618,20 +57625,8 @@ var init_status_bar = __esm({
57618
57625
  if (row >= footerStart)
57619
57626
  return;
57620
57627
  if (type === "press") {
57621
- this._textSelection.clear();
57622
- this._textSelection.onMousePress(row, col);
57623
- this.repaintContent();
57624
- } else if (type === "drag") {
57625
- this._textSelection.onMouseDrag(row, col);
57626
- if (this._textSelection.isDragging)
57627
- this.repaintContent();
57628
- } else if (type === "release") {
57629
- this._textSelection.onMouseRelease(row, col);
57630
- if (this._textSelection.hasSelection) {
57631
- this.copySelection();
57632
- } else {
57633
- this.repaintContent();
57634
- }
57628
+ this.disableMouseTracking();
57629
+ this._scheduleMouseReEnable();
57635
57630
  }
57636
57631
  }
57637
57632
  /** Copy current selection to clipboard. Returns true if copied. */
@@ -57667,6 +57662,26 @@ var init_status_bar = __esm({
57667
57662
  this.renderFooterAndPositionInput();
57668
57663
  }, 1500);
57669
57664
  }
57665
+ /** Timer for re-enabling mouse tracking after content area click */
57666
+ _mouseReEnableTimer = null;
57667
+ /** Schedule re-enabling mouse tracking after content area selection.
57668
+ * Called when user clicks in content area (which disables tracking). */
57669
+ _scheduleMouseReEnable() {
57670
+ if (this._mouseReEnableTimer)
57671
+ clearTimeout(this._mouseReEnableTimer);
57672
+ this._mouseReEnableTimer = setTimeout(() => {
57673
+ this._mouseReEnableTimer = null;
57674
+ this.enableMouseTracking();
57675
+ }, 5e3);
57676
+ }
57677
+ /** Re-enable mouse tracking immediately (called from keyboard handler) */
57678
+ reEnableMouseTracking() {
57679
+ if (this._mouseReEnableTimer) {
57680
+ clearTimeout(this._mouseReEnableTimer);
57681
+ this._mouseReEnableTimer = null;
57682
+ }
57683
+ this.enableMouseTracking();
57684
+ }
57670
57685
  // ── Agent View Management (WO-NA1) ────────────────────────────
57671
57686
  /** Register a new sub-agent view with its own content buffer */
57672
57687
  registerAgentView(id, label, type, taskSummary) {
@@ -58088,18 +58103,10 @@ ${CONTENT_BG_SEQ}`);
58088
58103
  let buf = "\x1B[?2026h";
58089
58104
  buf += "\x1B7";
58090
58105
  buf += "\x1B[?25l";
58091
- const selRanges = this._textSelection.hasSelection ? this._textSelection.getSelectedRanges() : [];
58092
- const selByBuf = /* @__PURE__ */ new Map();
58093
- for (const r of selRanges)
58094
- selByBuf.set(r.bufferIdx, r);
58095
58106
  for (let row = 0; row < h; row++) {
58096
58107
  const lineIdx = startIdx + row;
58097
58108
  let line = lineIdx < totalLines ? this._contentLines[lineIdx] : "";
58098
58109
  const screenRow = this.scrollRegionTop + row;
58099
- const sel = selByBuf.get(lineIdx);
58100
- if (sel) {
58101
- line = TextSelection.applyHighlight(line, sel.startCol, sel.endCol);
58102
- }
58103
58110
  line = line.replace(/\x1B\[0m/g, `\x1B[0m${CONTENT_BG_SEQ}`);
58104
58111
  buf += `\x1B[${screenRow};1H${CONTENT_BG_SEQ}\x1B[2K${line}`;
58105
58112
  }
@@ -58766,18 +58773,6 @@ ${CONTENT_BG_SEQ}`);
58766
58773
  onCtrlO();
58767
58774
  return;
58768
58775
  }
58769
- if (key?.ctrl && key?.shift && key?.name === "c") {
58770
- self.copySelection();
58771
- return;
58772
- }
58773
- if (s === "\x1B[67;6u" || s === "\x1B[27;6;67~") {
58774
- self.copySelection();
58775
- return;
58776
- }
58777
- if (s === "" && key?.shift) {
58778
- self.copySelection();
58779
- return;
58780
- }
58781
58776
  if (key?.ctrl && key?.shift && key?.name === "b") {
58782
58777
  self.armBlockSelection();
58783
58778
  return;
@@ -58792,9 +58787,8 @@ ${CONTENT_BG_SEQ}`);
58792
58787
  if (key?.name === "escape" || s === "\x1B") {
58793
58788
  sawEscape = true;
58794
58789
  sawEscapeTime = Date.now();
58795
- if (self._textSelection.hasSelection && s.length === 1) {
58796
- self._textSelection.clear();
58797
- self.repaintContent();
58790
+ if (self._mouseReEnableTimer && s.length === 1) {
58791
+ self.reEnableMouseTracking();
58798
58792
  return;
58799
58793
  }
58800
58794
  if (onEscape && s.length === 1)
@@ -58877,6 +58871,8 @@ ${CONTENT_BG_SEQ}`);
58877
58871
  self.renderFooterAndPositionInput();
58878
58872
  }
58879
58873
  }
58874
+ if (self._mouseReEnableTimer)
58875
+ self.reEnableMouseTracking();
58880
58876
  return origTtyWrite(s, key);
58881
58877
  } catch {
58882
58878
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.160.0",
3
+ "version": "0.161.0",
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",