mio-agent-runtime 0.13.4 → 0.13.5
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.
- package/README.md +19 -5
- package/adapters/codex.js +121 -121
- package/adapters/hermes.js +182 -176
- package/adapters/opencode.js +203 -202
- package/adapters/workbuddy.js +197 -197
- package/bin/mio.js +93 -12
- package/observe/observer.js +1876 -1867
- package/package.json +3 -3
- package/server/creativity-engine.js +238 -67
- package/server/evolution-cutover.js +5 -2
- package/server/insight-store.js +37 -11
- package/server/llm-client.js +29 -8
- package/server/mio-intelligence-mcp/README.md +173 -173
- package/server/mio-intelligence-mcp/index.js +27 -6
- package/server/mio-intelligence-mcp/package.json +17 -17
- package/server/mio-intelligence-mcp/phase0.js +365 -365
- package/server/observer-store.js +12 -11
- package/server/task-store.js +475 -475
package/server/observer-store.js
CHANGED
|
@@ -72,8 +72,8 @@ function readJsonSafe(filePath) {
|
|
|
72
72
|
if (!fs.existsSync(filePath)) return null
|
|
73
73
|
try {
|
|
74
74
|
return JSON.parse(fs.readFileSync(filePath, 'utf8'))
|
|
75
|
-
} catch {
|
|
76
|
-
|
|
75
|
+
} catch (err) {
|
|
76
|
+
throw new Error(`Failed to parse JSON from ${filePath}: ${err.message}`)
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
@@ -91,19 +91,20 @@ function todayTaskId() {
|
|
|
91
91
|
function readJsonlSafe(filePath) {
|
|
92
92
|
if (!fs.existsSync(filePath)) return []
|
|
93
93
|
try {
|
|
94
|
-
|
|
94
|
+
const lines = fs
|
|
95
95
|
.readFileSync(filePath, 'utf8')
|
|
96
96
|
.trim()
|
|
97
97
|
.split('\n')
|
|
98
98
|
.filter(Boolean)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
99
|
+
const results = []
|
|
100
|
+
for (let i = 0; i < lines.length; i++) {
|
|
101
|
+
try {
|
|
102
|
+
results.push(JSON.parse(lines[i]))
|
|
103
|
+
} catch (err) {
|
|
104
|
+
console.warn(`Skipping corrupted line ${i + 1} in ${filePath}: ${err.message}`)
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return results
|
|
107
108
|
} catch {
|
|
108
109
|
return []
|
|
109
110
|
}
|