pi-nocturne-memory 1.0.7 → 1.0.8

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.
@@ -33,15 +33,17 @@ async function callMCP(method: string, params: Record<string, unknown>): Promise
33
33
  });
34
34
 
35
35
  const text = await resp.text();
36
- const lines = text.split("\n");
36
+ // Handle CRLF line endings from SSE
37
+ const lines = text.split(/\r?\n/);
37
38
  let currentData = "";
38
39
 
39
40
  for (const line of lines) {
40
- if (line.startsWith("data: ")) {
41
- currentData = line.slice(6);
42
- } else if (line.startsWith("event: ")) {
41
+ const trimmed = line.trim();
42
+ if (trimmed.startsWith("data: ")) {
43
+ currentData = trimmed.slice(6);
44
+ } else if (trimmed.startsWith("event: ")) {
43
45
  // ignore event type
44
- } else if (line.trim() === "" && currentData) {
46
+ } else if (trimmed === "" && currentData) {
45
47
  // empty line after data = end of event
46
48
  try {
47
49
  const parsed = JSON.parse(currentData);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-nocturne-memory",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Nocturne Memory extension for Pi — automated memory management with SessionStart boot protocol",
5
5
  "license": "MIT",
6
6
  "type": "module",