open-agents-ai 0.103.56 → 0.103.57

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 +23 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -44759,12 +44759,30 @@ var init_status_bar = __esm({
44759
44759
  capability: "system_metrics",
44760
44760
  input: queryData
44761
44761
  }, 8e3);
44762
- const parsed = JSON.parse(raw);
44763
- if (parsed) {
44762
+ let parsed = raw;
44763
+ try {
44764
+ parsed = JSON.parse(parsed);
44765
+ } catch {
44766
+ }
44767
+ if (typeof parsed === "string") {
44768
+ try {
44769
+ parsed = JSON.parse(parsed);
44770
+ } catch {
44771
+ }
44772
+ }
44773
+ if (parsed && typeof parsed === "object") {
44764
44774
  let metricsData = null;
44765
- if (typeof parsed === "object" && parsed.result) {
44766
- metricsData = typeof parsed.result === "string" ? JSON.parse(parsed.result) : parsed.result;
44767
- } else if (typeof parsed === "object" && parsed.cpu) {
44775
+ if (parsed.result) {
44776
+ let r = parsed.result;
44777
+ if (typeof r === "string") {
44778
+ try {
44779
+ r = JSON.parse(r);
44780
+ } catch {
44781
+ }
44782
+ }
44783
+ metricsData = typeof r === "object" && r?.cpu ? r : null;
44784
+ }
44785
+ if (!metricsData && parsed.cpu) {
44768
44786
  metricsData = parsed;
44769
44787
  }
44770
44788
  if (metricsData?.cpu) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.103.56",
3
+ "version": "0.103.57",
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",