open-agents-ai 0.126.0 → 0.128.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 +50 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -8782,14 +8782,16 @@ New: ${newNarrative.slice(0, 200)}...`,
8782
8782
  entity: "primary-user",
8783
8783
  trust_level: 0.9,
8784
8784
  interaction_history_summary: "New relationship \u2014 first session.",
8785
- preferences_learned: []
8785
+ preferences_learned: [],
8786
+ their_model_of_us: "New relationship \u2014 user likely expects a capable coding assistant."
8786
8787
  }],
8787
8788
  homeostasis: {
8788
8789
  uncertainty: 0.1,
8789
8790
  coherence: 1,
8790
8791
  goal_tension: 0,
8791
8792
  memory_trust: 1,
8792
- boundary_breach: 0
8793
+ boundary_breach: 0,
8794
+ latency_stress: 0
8793
8795
  },
8794
8796
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
8795
8797
  updated_at: (/* @__PURE__ */ new Date()).toISOString(),
@@ -42383,6 +42385,7 @@ async function handleUpdate(subcommand, ctx) {
42383
42385
  }
42384
42386
  };
42385
42387
  }
42388
+ renderInfo("Checking for updates...");
42386
42389
  const info = await checkForUpdate(currentVersion, true);
42387
42390
  const { exec: exec4, execSync: es2 } = await import("node:child_process");
42388
42391
  const execA = (cmd, opts) => new Promise((res, rej) => exec4(cmd, { encoding: "utf8", timeout: opts?.timeout ?? 3e4, cwd: opts?.cwd }, (err, stdout) => err ? rej(err) : res((stdout || "").trim())));
@@ -44216,14 +44219,14 @@ function createDefaultBanner(version = "0.120.0") {
44216
44219
  const width = process.stdout.columns ?? 80;
44217
44220
  const rows = 3;
44218
44221
  const grid = [];
44219
- const gradient = " .\xB7:;+*#\u2588";
44222
+ const gradient = " \u2591\u2592\u2593\u2588";
44220
44223
  for (let r = 0; r < rows; r++) {
44221
44224
  const row = [];
44222
44225
  for (let c3 = 0; c3 < width; c3++) {
44223
44226
  const progress = c3 / width;
44224
44227
  const charIdx = Math.min(gradient.length - 1, Math.floor(progress * gradient.length));
44225
- const grayColor = 232 + Math.floor(progress * 10);
44226
- row.push({ char: gradient[charIdx], fg: grayColor, bg: 0, bold: false });
44228
+ const yellowShade = 232 + Math.floor(progress * 12);
44229
+ row.push({ char: gradient[charIdx], fg: yellowShade, bg: 0, bold: false });
44227
44230
  }
44228
44231
  grid.push(row);
44229
44232
  }
@@ -44231,11 +44234,14 @@ function createDefaultBanner(version = "0.120.0") {
44231
44234
  const hintText = " /cohere to engage distributed mind experiment";
44232
44235
  const fullText = versionText + hintText;
44233
44236
  const startCol = Math.max(2, Math.floor((width - fullText.length) / 2));
44237
+ for (let c3 = Math.max(0, startCol - 1); c3 < Math.min(width, startCol + fullText.length + 1); c3++) {
44238
+ grid[1][c3] = { char: " ", fg: -1, bg: 0, bold: false };
44239
+ }
44234
44240
  for (let i = 0; i < versionText.length && startCol + i < width; i++) {
44235
- grid[1][startCol + i] = { char: versionText[i], fg: 255, bg: 0, bold: true };
44241
+ grid[1][startCol + i] = { char: versionText[i], fg: 226, bg: 0, bold: true };
44236
44242
  }
44237
44243
  for (let i = 0; i < hintText.length && startCol + versionText.length + i < width; i++) {
44238
- grid[1][startCol + versionText.length + i] = { char: hintText[i], fg: 226, bg: 0, bold: false };
44244
+ grid[1][startCol + versionText.length + i] = { char: hintText[i], fg: 178, bg: 0, bold: false };
44239
44245
  }
44240
44246
  return {
44241
44247
  id: "default-header",
@@ -44302,11 +44308,38 @@ var init_banner = __esm({
44302
44308
  getDesign() {
44303
44309
  return this.currentDesign;
44304
44310
  }
44305
- /** Start rendering the banner */
44311
+ /**
44312
+ * Start rendering the banner.
44313
+ * Sets up DECSTBM scroll region so rows 1-3 are locked at top and
44314
+ * content below row 4 scrolls normally without overlapping the banner.
44315
+ * Returns the number of rows reserved (3 banner + 1 separator = 4).
44316
+ */
44306
44317
  start() {
44307
44318
  if (!isTTY7 || !this.currentDesign)
44308
- return;
44319
+ return 0;
44320
+ const termRows = process.stdout.rows ?? 24;
44321
+ process.stdout.write("\x1B[1;1H");
44322
+ for (let i = 0; i < this.rows + 1; i++) {
44323
+ process.stdout.write("\x1B[2K\n");
44324
+ }
44325
+ process.stdout.write(`\x1B[${this.rows + 2};${termRows}r`);
44326
+ process.stdout.write(`\x1B[${this.rows + 2};1H`);
44309
44327
  this.renderCurrentFrame();
44328
+ this._resizeHandler = () => {
44329
+ this.width = process.stdout.columns ?? 80;
44330
+ if (this.currentDesign) {
44331
+ if (this.currentDesign.type === "default") {
44332
+ const version = this.currentDesign.frames[0]?.grid[1]?.filter((c3) => c3.bold && c3.fg === 226).map((c3) => c3.char).join("").replace("OA-", "") || "0.0.0";
44333
+ this.currentDesign = createDefaultBanner(version);
44334
+ } else if (this.currentDesign.type === "cohere") {
44335
+ this.currentDesign = createCohereBanner();
44336
+ }
44337
+ const newRows = process.stdout.rows ?? 24;
44338
+ process.stdout.write(`\x1B[${this.rows + 2};${newRows}r`);
44339
+ this.renderCurrentFrame();
44340
+ }
44341
+ };
44342
+ process.stdout.on("resize", this._resizeHandler);
44310
44343
  if (this.currentDesign.frames.length > 1) {
44311
44344
  this.timer = setInterval(() => {
44312
44345
  this.frameTick++;
@@ -44318,13 +44351,19 @@ var init_banner = __esm({
44318
44351
  }
44319
44352
  }, 66);
44320
44353
  }
44354
+ return this.rows + 1;
44321
44355
  }
44322
- /** Stop rendering */
44356
+ _resizeHandler = null;
44357
+ /** Stop rendering and clean up */
44323
44358
  stop() {
44324
44359
  if (this.timer) {
44325
44360
  clearInterval(this.timer);
44326
44361
  this.timer = null;
44327
44362
  }
44363
+ if (this._resizeHandler) {
44364
+ process.stdout.removeListener("resize", this._resizeHandler);
44365
+ this._resizeHandler = null;
44366
+ }
44328
44367
  }
44329
44368
  /** Render the current frame into the top 3 rows */
44330
44369
  renderCurrentFrame() {
@@ -52991,8 +53030,7 @@ async function startInteractive(config, repoPath) {
52991
53030
  } else {
52992
53031
  process.stdout.write("\x1B[2J\x1B[H");
52993
53032
  banner.setDesign(createDefaultBanner(version));
52994
- banner.start();
52995
- carouselLines = 4;
53033
+ carouselLines = banner.start();
52996
53034
  renderRichHeader({
52997
53035
  model: config.model,
52998
53036
  version,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.126.0",
3
+ "version": "0.128.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",