open-agents-ai 0.187.155 → 0.187.156

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 +38 -20
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -265250,11 +265250,21 @@ Respond with your assessment, then take action.`;
265250
265250
  try {
265251
265251
  const fs4 = await import("node:fs");
265252
265252
  const path5 = await import("node:path");
265253
- const patternsFile = path5.join(process.cwd(), ".oa", "error-patterns.json");
265254
- if (fs4.existsSync(patternsFile)) {
265255
- const saved = JSON.parse(fs4.readFileSync(patternsFile, "utf8"));
265256
- for (const [sig, pattern] of Object.entries(saved)) {
265257
- this._errorPatterns.set(sig, pattern);
265253
+ const os8 = await import("node:os");
265254
+ const globalFile = path5.join(os8.homedir(), ".open-agents", "error-patterns.json");
265255
+ const localFile = path5.join(process.cwd(), ".oa", "error-patterns.json");
265256
+ for (const patternsFile of [globalFile, localFile]) {
265257
+ try {
265258
+ if (fs4.existsSync(patternsFile)) {
265259
+ const saved = JSON.parse(fs4.readFileSync(patternsFile, "utf8"));
265260
+ for (const [sig, pattern] of Object.entries(saved)) {
265261
+ const existing = this._errorPatterns.get(sig);
265262
+ if (!existing || (pattern.count ?? 0) > (existing.count ?? 0)) {
265263
+ this._errorPatterns.set(sig, pattern);
265264
+ }
265265
+ }
265266
+ }
265267
+ } catch {
265258
265268
  }
265259
265269
  }
265260
265270
  } catch {
@@ -266729,22 +266739,30 @@ Full content available via: repl_exec(code="data = retrieve('${handleId}')") or
266729
266739
  try {
266730
266740
  const fs4 = await import("node:fs");
266731
266741
  const path5 = await import("node:path");
266732
- const patternsFile = path5.join(process.cwd(), ".oa", "error-patterns.json");
266733
- fs4.mkdirSync(path5.join(process.cwd(), ".oa"), { recursive: true });
266734
- let existing = {};
266735
- try {
266736
- existing = JSON.parse(fs4.readFileSync(patternsFile, "utf8"));
266737
- } catch {
266738
- }
266739
- for (const [sig, pattern] of this._errorPatterns) {
266740
- const prev = existing[sig];
266741
- existing[sig] = {
266742
- ...pattern,
266743
- count: (prev?.count ?? 0) + pattern.count,
266744
- firstSeen: prev?.firstSeen ?? pattern.lastSeen
266745
- };
266742
+ const os8 = await import("node:os");
266743
+ const globalFile = path5.join(os8.homedir(), ".open-agents", "error-patterns.json");
266744
+ const localFile = path5.join(process.cwd(), ".oa", "error-patterns.json");
266745
+ for (const targetFile of [globalFile, localFile]) {
266746
+ try {
266747
+ const dir = path5.dirname(targetFile);
266748
+ fs4.mkdirSync(dir, { recursive: true });
266749
+ let existing = {};
266750
+ try {
266751
+ existing = JSON.parse(fs4.readFileSync(targetFile, "utf8"));
266752
+ } catch {
266753
+ }
266754
+ for (const [sig, pattern] of this._errorPatterns) {
266755
+ const prev = existing[sig];
266756
+ existing[sig] = {
266757
+ ...pattern,
266758
+ count: Math.max(prev?.count ?? 0, pattern.count),
266759
+ firstSeen: prev?.firstSeen ?? pattern.lastSeen
266760
+ };
266761
+ }
266762
+ fs4.writeFileSync(targetFile, JSON.stringify(existing, null, 2));
266763
+ } catch {
266764
+ }
266746
266765
  }
266747
- fs4.writeFileSync(patternsFile, JSON.stringify(existing, null, 2));
266748
266766
  } catch {
266749
266767
  }
266750
266768
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.155",
3
+ "version": "0.187.156",
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",