@hir4ta/mneme 0.25.0 → 0.25.1

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mneme",
3
3
  "description": "A plugin that provides long-term memory for Claude Code. It automatically saves context lost during auto-compact, offering features for session restoration, recording technical decisions, and learning developer patterns.",
4
- "version": "0.25.0",
4
+ "version": "0.25.1",
5
5
  "author": {
6
6
  "name": "hir4ta"
7
7
  },
package/README.ja.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # mneme
2
2
 
3
- ![Version](https://img.shields.io/badge/version-0.25.0-blue)
3
+ ![Version](https://img.shields.io/badge/version-0.25.1-blue)
4
4
  ![Node.js](https://img.shields.io/badge/node-%3E%3D22.5.0-brightgreen)
5
5
  [![NPM Version](https://img.shields.io/npm/v/%40hir4ta%2Fmneme)](https://www.npmjs.com/package/@hir4ta/mneme)
6
6
  [![MIT License](https://img.shields.io/npm/l/%40hir4ta%2Fmneme)](https://github.com/hir4ta/mneme/blob/main/LICENSE)
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # mneme
2
2
 
3
- ![Version](https://img.shields.io/badge/version-0.25.0-blue)
3
+ ![Version](https://img.shields.io/badge/version-0.25.1-blue)
4
4
  ![Node.js](https://img.shields.io/badge/node-%3E%3D22.5.0-brightgreen)
5
5
  [![NPM Version](https://img.shields.io/npm/v/%40hir4ta%2Fmneme)](https://www.npmjs.com/package/@hir4ta/mneme)
6
6
  [![MIT License](https://img.shields.io/npm/l/%40hir4ta%2Fmneme)](https://github.com/hir4ta/mneme/blob/main/LICENSE)
@@ -518,9 +518,16 @@ async function parseTranscriptIncremental(transcriptPath, lastSavedLine) {
518
518
  progressEvents.get(key)?.push(event);
519
519
  }
520
520
  }
521
+ const planContentEntries = entries.filter(
522
+ (e) => e.type === "user" && e.message?.role === "user" && !!e.planContent && typeof e.message?.content === "string"
523
+ ).map((e) => ({
524
+ timestamp: e.timestamp,
525
+ content: e.message?.content
526
+ }));
521
527
  const userMessages = entries.filter((e) => {
522
528
  if (e.type !== "user" || e.message?.role !== "user") return false;
523
529
  if (e.isMeta === true) return false;
530
+ if (e.planContent) return false;
524
531
  const content = e.message?.content;
525
532
  if (typeof content !== "string") return false;
526
533
  if (content.startsWith("<local-command-stdout>")) return false;
@@ -531,7 +538,7 @@ async function parseTranscriptIncremental(transcriptPath, lastSavedLine) {
531
538
  return {
532
539
  timestamp: e.timestamp,
533
540
  content,
534
- isCompactSummary: e.isCompactSummary || !!e.planContent || false,
541
+ isCompactSummary: e.isCompactSummary || false,
535
542
  slashCommand: extractSlashCommand(content)
536
543
  };
537
544
  });
@@ -581,7 +588,8 @@ async function parseTranscriptIncremental(transcriptPath, lastSavedLine) {
581
588
  const orphanedResponses = assistantMessages.filter(
582
589
  (a) => a.timestamp < firstUserTs
583
590
  );
584
- if (orphanedResponses.length > 0) {
591
+ const planEntry = planContentEntries.find((p) => p.timestamp <= firstUserTs);
592
+ if (orphanedResponses.length > 0 || planEntry) {
585
593
  const allToolDetails = orphanedResponses.flatMap((r) => r.toolDetails);
586
594
  const orphanedTimeKeys = new Set(
587
595
  orphanedResponses.map((r) => r.timestamp.slice(0, 16))
@@ -593,15 +601,18 @@ async function parseTranscriptIncremental(transcriptPath, lastSavedLine) {
593
601
  (k) => progressEvents.get(k) || []
594
602
  );
595
603
  interactions.push({
596
- timestamp: orphanedResponses[0].timestamp,
597
- user: "",
604
+ timestamp: orphanedResponses.length > 0 ? orphanedResponses[0].timestamp : planEntry?.timestamp ?? "",
605
+ // Include plan content for compact detection (UUID extraction)
606
+ user: planEntry?.content || "",
598
607
  thinking: orphanedResponses.filter((r) => r.thinking).map((r) => r.thinking).join("\n"),
599
608
  assistant: orphanedResponses.filter((r) => r.text).map((r) => r.text).join("\n"),
600
- isCompactSummary: false,
609
+ isCompactSummary: !!planEntry,
601
610
  isContinuation: true,
602
611
  toolsUsed: [...new Set(allToolDetails.map((t) => t.name))],
603
612
  toolDetails: allToolDetails,
604
- inPlanMode: isInPlanMode(orphanedResponses[0].timestamp) || void 0,
613
+ inPlanMode: isInPlanMode(
614
+ orphanedResponses[0]?.timestamp ?? planEntry?.timestamp ?? ""
615
+ ) || void 0,
605
616
  toolResults: allToolResults.length > 0 ? allToolResults : void 0,
606
617
  progressEvents: allProgressEvents.length > 0 ? allProgressEvents : void 0
607
618
  });
@@ -522,9 +522,16 @@ async function parseTranscriptIncremental(transcriptPath, lastSavedLine) {
522
522
  progressEvents.get(key)?.push(event);
523
523
  }
524
524
  }
525
+ const planContentEntries = entries.filter(
526
+ (e) => e.type === "user" && e.message?.role === "user" && !!e.planContent && typeof e.message?.content === "string"
527
+ ).map((e) => ({
528
+ timestamp: e.timestamp,
529
+ content: e.message?.content
530
+ }));
525
531
  const userMessages = entries.filter((e) => {
526
532
  if (e.type !== "user" || e.message?.role !== "user") return false;
527
533
  if (e.isMeta === true) return false;
534
+ if (e.planContent) return false;
528
535
  const content = e.message?.content;
529
536
  if (typeof content !== "string") return false;
530
537
  if (content.startsWith("<local-command-stdout>")) return false;
@@ -535,7 +542,7 @@ async function parseTranscriptIncremental(transcriptPath, lastSavedLine) {
535
542
  return {
536
543
  timestamp: e.timestamp,
537
544
  content,
538
- isCompactSummary: e.isCompactSummary || !!e.planContent || false,
545
+ isCompactSummary: e.isCompactSummary || false,
539
546
  slashCommand: extractSlashCommand(content)
540
547
  };
541
548
  });
@@ -585,7 +592,8 @@ async function parseTranscriptIncremental(transcriptPath, lastSavedLine) {
585
592
  const orphanedResponses = assistantMessages.filter(
586
593
  (a) => a.timestamp < firstUserTs
587
594
  );
588
- if (orphanedResponses.length > 0) {
595
+ const planEntry = planContentEntries.find((p) => p.timestamp <= firstUserTs);
596
+ if (orphanedResponses.length > 0 || planEntry) {
589
597
  const allToolDetails = orphanedResponses.flatMap((r) => r.toolDetails);
590
598
  const orphanedTimeKeys = new Set(
591
599
  orphanedResponses.map((r) => r.timestamp.slice(0, 16))
@@ -597,15 +605,18 @@ async function parseTranscriptIncremental(transcriptPath, lastSavedLine) {
597
605
  (k) => progressEvents.get(k) || []
598
606
  );
599
607
  interactions.push({
600
- timestamp: orphanedResponses[0].timestamp,
601
- user: "",
608
+ timestamp: orphanedResponses.length > 0 ? orphanedResponses[0].timestamp : planEntry?.timestamp ?? "",
609
+ // Include plan content for compact detection (UUID extraction)
610
+ user: planEntry?.content || "",
602
611
  thinking: orphanedResponses.filter((r) => r.thinking).map((r) => r.thinking).join("\n"),
603
612
  assistant: orphanedResponses.filter((r) => r.text).map((r) => r.text).join("\n"),
604
- isCompactSummary: false,
613
+ isCompactSummary: !!planEntry,
605
614
  isContinuation: true,
606
615
  toolsUsed: [...new Set(allToolDetails.map((t) => t.name))],
607
616
  toolDetails: allToolDetails,
608
- inPlanMode: isInPlanMode(orphanedResponses[0].timestamp) || void 0,
617
+ inPlanMode: isInPlanMode(
618
+ orphanedResponses[0]?.timestamp ?? planEntry?.timestamp ?? ""
619
+ ) || void 0,
609
620
  toolResults: allToolResults.length > 0 ? allToolResults : void 0,
610
621
  progressEvents: allProgressEvents.length > 0 ? allProgressEvents : void 0
611
622
  });
package/dist/server.js CHANGED
@@ -4493,7 +4493,7 @@ misc.get("/project", (c) => {
4493
4493
  }
4494
4494
  } catch {
4495
4495
  }
4496
- const version = "0.25.0";
4496
+ const version = "0.25.1";
4497
4497
  return c.json({
4498
4498
  name: projectName,
4499
4499
  path: projectRoot,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hir4ta/mneme",
3
- "version": "0.25.0",
3
+ "version": "0.25.1",
4
4
  "description": "Long-term memory plugin for Claude Code - automated session saving, recording technical decisions, and web dashboard",
5
5
  "keywords": [
6
6
  "claude",