@inceptionstack/roundhouse 0.5.31 → 0.5.32

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.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to `@inceptionstack/roundhouse` are documented here.
4
4
 
5
+ ## [0.5.32] — 2026-05-14
6
+
7
+ ### Fixed
8
+ - **Soft-reset progress: emit completion message, not just start.** Before, the user saw `♻️ Session overflowed — soft-resetting to recent turns...` and then silence — success/failure outcomes only went to stderr. Now the user always sees a follow-up:
9
+ - ✅ `Soft-reset complete (N → M entries). Durable memory will re-inject on next turn.` on success
10
+ - ⚠️ `Soft-reset no-op (<reason>). Will retry compact next turn.` when nothing to trim
11
+ - ❌ `Soft-reset failed: <msg>. Will retry next turn.` when recovery itself errors
12
+ - 3 new tests verifying onProgress emissions for all three outcomes (`emergency_whenSoftResetSucceeds_emitsCompletionProgressMessage`, `..._emitsNoOpProgressMessage`, `..._emitsFailureProgressMessage`), plus 1 regression test (`..._doesNotMaskWithTypeError`) for non-Error throws inside the recovery catch. **540 tests passing.**
13
+
5
14
  ## [0.5.31] — 2026-05-14
6
15
 
7
16
  ### Internal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inceptionstack/roundhouse",
3
- "version": "0.5.31",
3
+ "version": "0.5.32",
4
4
  "type": "module",
5
5
  "description": "Multi-platform chat gateway that routes messages through a configured AI agent",
6
6
  "license": "MIT",
@@ -66,13 +66,22 @@ async function attemptSoftResetRecovery(
66
66
  const report = await agent.softReset(threadId);
67
67
  if (report?.reset) {
68
68
  console.warn(`[memory] soft-reset recovered ${threadId} from overflow`);
69
+ const { entriesBefore, entriesAfter } = (report as { entriesBefore?: number; entriesAfter?: number });
70
+ const detail = typeof entriesBefore === "number" && typeof entriesAfter === "number"
71
+ ? ` (${entriesBefore} → ${entriesAfter} entries)`
72
+ : "";
73
+ await onProgress?.(`✅ Soft-reset complete${detail}. Durable memory will re-inject on next turn.`);
69
74
  return { attempted: true, succeeded: true };
70
75
  }
71
76
 
72
- console.warn(`[memory] soft-reset returned no-op for ${threadId} (${(report as { reason?: string } | null)?.reason ?? "unknown"})`);
77
+ const reason = (report as { reason?: string } | null)?.reason ?? "unknown";
78
+ console.warn(`[memory] soft-reset returned no-op for ${threadId} (${reason})`);
79
+ await onProgress?.(`⚠️ Soft-reset no-op (${reason}). Will retry compact next turn.`);
73
80
  return { attempted: true, succeeded: false };
74
81
  } catch (resetErr) {
75
- console.error(`[memory] soft-reset failed for ${threadId}:`, (resetErr as Error).message);
82
+ const msg = resetErr instanceof Error ? resetErr.message : String(resetErr);
83
+ console.error(`[memory] soft-reset failed for ${threadId}:`, msg);
84
+ await onProgress?.(`❌ Soft-reset failed: ${msg.slice(0, 200)}. Will retry next turn.`);
76
85
  return { attempted: true, succeeded: false };
77
86
  }
78
87
  }