@ouro.bot/cli 0.1.0-alpha.41 → 0.1.0-alpha.42

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/changelog.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.42",
6
+ "changes": [
7
+ "Associative recall now skips corrupt JSONL lines instead of crashing — matches the resilient pattern already used in memory.ts."
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.41",
6
12
  "changes": [
@@ -87,7 +87,19 @@ function readFacts(memoryRoot) {
87
87
  const raw = fs.readFileSync(factsPath, "utf8").trim();
88
88
  if (!raw)
89
89
  return [];
90
- return raw.split("\n").map((line) => JSON.parse(line));
90
+ const facts = [];
91
+ for (const line of raw.split("\n")) {
92
+ const trimmed = line.trim();
93
+ if (!trimmed)
94
+ continue;
95
+ try {
96
+ facts.push(JSON.parse(trimmed));
97
+ }
98
+ catch {
99
+ // Skip corrupt lines (e.g. partial write from a crash).
100
+ }
101
+ }
102
+ return facts;
91
103
  }
92
104
  function getLatestUserText(messages) {
93
105
  for (let i = messages.length - 1; i >= 0; i--) {
@@ -190,7 +202,7 @@ async function injectAssociativeRecall(messages, options) {
190
202
  event: "mind.associative_recall_error",
191
203
  message: "associative recall failed",
192
204
  meta: {
193
- reason: error instanceof Error ? error.message : String(error),
205
+ reason: error instanceof Error ? error.message : /* v8 ignore start -- defensive: non-Error catch branch @preserve */ String(error) /* v8 ignore stop */,
194
206
  },
195
207
  });
196
208
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.41",
3
+ "version": "0.1.0-alpha.42",
4
4
  "main": "dist/heart/daemon/ouro-entry.js",
5
5
  "bin": {
6
6
  "cli": "dist/heart/daemon/ouro-bot-entry.js",