open-agents-ai 0.139.2 → 0.139.4

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 +86 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -38643,7 +38643,7 @@ async function startNeovimMode(opts) {
38643
38643
  if (!filtered)
38644
38644
  return;
38645
38645
  if (topOffset > 0) {
38646
- filtered = filtered.replace(/\x1B\[(\d+)(;\d+)?H/g, (_m, row, col) => `\x1B[${parseInt(row) + topOffset}${col ?? ""}H`);
38646
+ filtered = filtered.replace(/\x1B\[(\d+);(\d+)H/g, (_m, row, col) => `\x1B[${parseInt(row) + topOffset};${col}H`).replace(/\x1B\[(\d+)H/g, (_m, row) => `\x1B[${parseInt(row) + topOffset}H`).replace(/\x1B\[H/g, `\x1B[${topOffset + 1}H`).replace(/\x1B\[(\d+)d/g, (_m, row) => `\x1B[${parseInt(row) + topOffset}d`);
38647
38647
  }
38648
38648
  if (!state.focused) {
38649
38649
  process.stdout.write("\x1B7" + filtered + "\x1B8");
@@ -38984,6 +38984,9 @@ import { join as join50, dirname as dirname17 } from "node:path";
38984
38984
  import { homedir as homedir11, tmpdir as tmpdir9, platform as platform2 } from "node:os";
38985
38985
  import { execSync as execSync26, spawn as nodeSpawn } from "node:child_process";
38986
38986
  import { createRequire } from "node:module";
38987
+ function sanitizeForTTS(text) {
38988
+ return text.replace(/^#{1,6}\s+/gm, "").replace(/\*{1,3}([^*]+)\*{1,3}/g, "$1").replace(/_{1,3}([^_]+)_{1,3}/g, "$1").replace(/~~([^~]+)~~/g, "$1").replace(/`([^`]+)`/g, "$1").replace(/```[\s\S]*?```/g, "").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/!\[([^\]]*)\]\([^)]+\)/g, "$1").replace(/^[\s]*[-*+]\s+/gm, "").replace(/^[\s]*\d+\.\s+/gm, "").replace(/^>\s+/gm, "").replace(/^[-*_]{3,}$/gm, "").replace(/\[[ xX]\]\s*/g, "").replace(/[\u{1F600}-\u{1F64F}]/gu, "").replace(/[\u{1F300}-\u{1F5FF}]/gu, "").replace(/[\u{1F680}-\u{1F6FF}]/gu, "").replace(/[\u{1F1E0}-\u{1F1FF}]/gu, "").replace(/[\u{2600}-\u{26FF}]/gu, "").replace(/[\u{2700}-\u{27BF}]/gu, "").replace(/[\u{FE00}-\u{FE0F}]/gu, "").replace(/[\u{1F900}-\u{1F9FF}]/gu, "").replace(/[\u{1FA00}-\u{1FA6F}]/gu, "").replace(/[\u{1FA70}-\u{1FAFF}]/gu, "").replace(/[\u{200D}]/gu, "").replace(/[\u{20E3}]/gu, "").replace(/[✓✔✗✘✕✖⚠️⏸⏹⏵●○◆◇■□▪▫►▼▲◀⬆⬇⬅➡↑↓←→⇐⇒⇑⇓]/g, "").replace(/[─━│┃┌┐└┘├┤┬┴┼╔╗╚╝╠╣╦╩╬⎿⎾▕▏⏐░▒▓█⠀-⣿]/g, "").replace(/\s{2,}/g, " ").trim();
38989
+ }
38987
38990
  function registerCustomOnnxModel(id, label) {
38988
38991
  VOICE_MODELS[id] = {
38989
38992
  id,
@@ -40183,6 +40186,9 @@ var init_voice = __esm({
40183
40186
  enqueueSpeech(text, volume, pitchFactor, speedFactor = 1, stereoDelayMs = 0.6) {
40184
40187
  if (!this.enabled || !this.ready)
40185
40188
  return;
40189
+ text = sanitizeForTTS(text);
40190
+ if (!text.trim())
40191
+ return;
40186
40192
  const chunks = this.chunkText(text);
40187
40193
  if (this.speakQueue.length >= 30) {
40188
40194
  return;
@@ -44370,10 +44376,8 @@ async function handleUpdate(subcommand, ctx) {
44370
44376
  skipKeys,
44371
44377
  availableRows: ctx.availableContentRows?.()
44372
44378
  });
44373
- if (!menuResult.confirmed || !menuResult.key) {
44374
- renderInfo("Update cancelled.");
44379
+ if (!menuResult.confirmed || !menuResult.key)
44375
44380
  return;
44376
- }
44377
44381
  if (menuResult.key === "policy_auto") {
44378
44382
  const settings = { updateMode: "auto" };
44379
44383
  saveProjectSettings(repoRoot, settings);
@@ -45502,6 +45506,76 @@ function runMigrations(db) {
45502
45506
 
45503
45507
  CREATE INDEX IF NOT EXISTS idx_validation_runs_passed
45504
45508
  ON validation_runs (passed);
45509
+
45510
+ -- =======================================================================
45511
+ -- Structured procedural memory (Fortemi-inspired, WO-FM1)
45512
+ -- Replaces flat JSON metabolism store with semantic-searchable DB
45513
+ -- =======================================================================
45514
+
45515
+ -- procedural_memory: core entity for agent learnings
45516
+ CREATE TABLE IF NOT EXISTS procedural_memory (
45517
+ id TEXT PRIMARY KEY,
45518
+ type TEXT NOT NULL DEFAULT 'procedural', -- procedural | episodic | semantic | normative
45519
+ category TEXT NOT NULL DEFAULT 'strategy', -- strategy | recovery | optimization
45520
+ content TEXT NOT NULL DEFAULT '', -- the lesson text
45521
+ trigger_pattern TEXT NOT NULL DEFAULT '', -- when to apply this memory
45522
+ steps TEXT NOT NULL DEFAULT '', -- ordered steps (semicolon-separated)
45523
+ source_trace TEXT NOT NULL DEFAULT '', -- what created this (llm-extraction, manual, etc.)
45524
+ utility REAL NOT NULL DEFAULT 0.5, -- 0-1 usefulness score
45525
+ confidence REAL NOT NULL DEFAULT 0.5, -- 0-1 certainty score
45526
+ access_count INTEGER NOT NULL DEFAULT 0,
45527
+ deleted_at TEXT, -- soft-delete (NULL = active)
45528
+ created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
45529
+ updated_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now'))
45530
+ );
45531
+
45532
+ CREATE INDEX IF NOT EXISTS idx_procedural_memory_type
45533
+ ON procedural_memory (type);
45534
+ CREATE INDEX IF NOT EXISTS idx_procedural_memory_category
45535
+ ON procedural_memory (category);
45536
+ CREATE INDEX IF NOT EXISTS idx_procedural_memory_deleted
45537
+ ON procedural_memory (deleted_at);
45538
+
45539
+ -- memory_revision: tracks changes to procedural memories
45540
+ CREATE TABLE IF NOT EXISTS memory_revision (
45541
+ id TEXT PRIMARY KEY,
45542
+ memory_id TEXT NOT NULL REFERENCES procedural_memory(id),
45543
+ content TEXT NOT NULL DEFAULT '',
45544
+ revision_type TEXT NOT NULL DEFAULT 'update', -- create | update | reinforce | decay
45545
+ model TEXT, -- which LLM made this revision
45546
+ created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now'))
45547
+ );
45548
+
45549
+ CREATE INDEX IF NOT EXISTS idx_memory_revision_memory
45550
+ ON memory_revision (memory_id);
45551
+
45552
+ -- memory_embedding: vector embeddings for semantic search
45553
+ CREATE TABLE IF NOT EXISTS memory_embedding (
45554
+ id TEXT PRIMARY KEY,
45555
+ memory_id TEXT NOT NULL REFERENCES procedural_memory(id),
45556
+ vector BLOB NOT NULL, -- float32[] as binary blob
45557
+ model TEXT NOT NULL DEFAULT '', -- embedding model name
45558
+ dimensions INTEGER NOT NULL DEFAULT 0,
45559
+ created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now'))
45560
+ );
45561
+
45562
+ CREATE INDEX IF NOT EXISTS idx_memory_embedding_memory
45563
+ ON memory_embedding (memory_id);
45564
+
45565
+ -- memory_link: bidirectional relationships between memories
45566
+ CREATE TABLE IF NOT EXISTS memory_link (
45567
+ id TEXT PRIMARY KEY,
45568
+ source_id TEXT NOT NULL REFERENCES procedural_memory(id),
45569
+ target_id TEXT NOT NULL REFERENCES procedural_memory(id),
45570
+ link_type TEXT NOT NULL DEFAULT 'related', -- related | contradicts | supersedes
45571
+ confidence REAL NOT NULL DEFAULT 0.5,
45572
+ created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now'))
45573
+ );
45574
+
45575
+ CREATE INDEX IF NOT EXISTS idx_memory_link_source
45576
+ ON memory_link (source_id);
45577
+ CREATE INDEX IF NOT EXISTS idx_memory_link_target
45578
+ ON memory_link (target_id);
45505
45579
  `);
45506
45580
  }
45507
45581
  var init_db = __esm({
@@ -45867,6 +45941,13 @@ var init_toolPatternStore = __esm({
45867
45941
  }
45868
45942
  });
45869
45943
 
45944
+ // packages/memory/dist/proceduralMemoryStore.js
45945
+ var init_proceduralMemoryStore = __esm({
45946
+ "packages/memory/dist/proceduralMemoryStore.js"() {
45947
+ "use strict";
45948
+ }
45949
+ });
45950
+
45870
45951
  // packages/memory/dist/index.js
45871
45952
  var init_dist7 = __esm({
45872
45953
  "packages/memory/dist/index.js"() {
@@ -45879,6 +45960,7 @@ var init_dist7 = __esm({
45879
45960
  init_failureStore();
45880
45961
  init_validationStore();
45881
45962
  init_toolPatternStore();
45963
+ init_proceduralMemoryStore();
45882
45964
  }
45883
45965
  });
45884
45966
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.139.2",
3
+ "version": "0.139.4",
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",