@everme/claude-code 0.6.3 → 0.6.4

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.
@@ -10,7 +10,7 @@
10
10
  "name": "everme",
11
11
  "source": "./",
12
12
  "description": "Automatic memory recall for Claude Code through the EverMe gateway. Saves and recalls per-session context using your EverMe account credentials.",
13
- "version": "0.6.3",
13
+ "version": "0.6.4",
14
14
  "homepage": "https://everme.evermind.ai",
15
15
  "license": "Apache-2.0"
16
16
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "everme",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "EverMe — automatic memory recall for Claude Code. Recalls relevant context from past sessions before each prompt and saves new turns through the EverMe gateway.",
5
5
  "author": {
6
6
  "name": "EverMind AI",
@@ -1,6 +1,7 @@
1
1
  import os from "node:os";
2
2
  import path from "node:path";
3
3
  import { readTranscript, extractAgentMessages } from "./transcript.js";
4
+ import { turnOrdinals } from "@everme/agent-sdk";
4
5
 
5
6
  const CONTEXT_EVENTS = new Set(["SessionStart", "UserPromptSubmit"]);
6
7
 
@@ -73,16 +74,26 @@ export const claudeCodeAdapter = {
73
74
  const checkpoint = checkpointStore
74
75
  ? await checkpointStore.read(stateId)
75
76
  : { initialized: false, uploadedCount: 0 };
76
- let delta;
77
- if (checkpoint.initialized && checkpoint.uploadedCount <= messages.length) {
78
- delta = messages.slice(checkpoint.uploadedCount);
79
- } else {
80
- delta = input.isSubagent ? messages : lastRootTurn(messages);
81
- }
77
+ const continuation = checkpoint.initialized && checkpoint.uploadedCount <= messages.length;
78
+ const delta = continuation
79
+ ? messages.slice(checkpoint.uploadedCount)
80
+ : (input.isSubagent ? messages : lastRootTurn(messages));
82
81
  if (!delta.length) return [];
83
82
  return [{
84
83
  conversationId: input.sessionId,
85
84
  messages: delta,
85
+ // Address the delta by its absolute turn only when everything before it
86
+ // is known to be covered: a checkpoint continuation, or the whole
87
+ // transcript. A cold-start tail (no checkpoint yet -- a resumed
88
+ // pre-existing session, a wiped state dir) must not claim the turns it
89
+ // skipped, or the importer would trim the history it still has to bring
90
+ // in; unaddressed, the gate appends it at the current watermark instead.
91
+ ...(continuation || delta.length === messages.length
92
+ ? { baseTurn: turnOrdinals(messages)[messages.length - delta.length] }
93
+ // A cold-start tail also declares no completed turn: appended at the
94
+ // watermark it would be recorded as turn 0 and the importer would
95
+ // then trim the real turn 0 as covered.
96
+ : { turns: 0 }),
86
97
  checkpoint: { stateId, uploadedCount: messages.length },
87
98
  }];
88
99
  },
@@ -67,16 +67,27 @@ function getClient() {
67
67
  }
68
68
 
69
69
  // Instructions returned on initialize — Claude Code splices them into the
70
- // system prompt. Mirrors @everme/memory-mcp's EVERME_MCP_INSTRUCTIONS with
71
- // the Claude-Code-specific note that native hooks already inject
72
- // <everme_profile> / <everme_recall> and save turns automatically.
70
+ // system prompt. The plugin's hooks always run on this host, so unlike the
71
+ // generic @everme/memory-mcp copy this one can state plainly that memory is
72
+ // kept on its own; the two READ tools cover what the injected
73
+ // <everme_profile> / <everme_recall> blocks do not.
73
74
  const INSTRUCTIONS = [
74
- "EverMe memory is connected. This plugin's native hooks already inject a",
75
- "<everme_profile> block at session start and a <everme_recall> block before",
76
- "each prompt, and they save the conversation automatically so saving needs",
77
- "no tool call. These two READ tools are for the cases the hooks do not cover;",
78
- "call them AUTONOMOUSLY when a trigger fires, never waiting to be asked.",
79
- "1. The <everme_recall> block is missing, empty, or clearly irrelevant AND the user references earlier conversations, decisions, conventions, or previously solved problems — call `mem_search` with a SHORT query. Do not repeat an identical query in the same turn.",
75
+ "EverMe is the user's long-term memory across sessions. On this host it",
76
+ "listens to the conversation itself: what matters preferences, decisions,",
77
+ "the work you do together is kept without anyone saving it by hand, and",
78
+ "comes back into your context next time through the <everme_profile> and",
79
+ "<everme_recall> blocks.",
80
+ "",
81
+ "So when the user asks you to remember something, you already can. A short",
82
+ "acknowledgement is enough (\"Noted — I'll remember that.\"), then move on;",
83
+ "there is nothing to call and nothing to set up. If they ask how it works,",
84
+ "\"EverMe keeps a memory of our conversations\" is the whole story from their",
85
+ "side — the mechanics are not something to narrate, and there is nothing to",
86
+ "work around.",
87
+ "",
88
+ "Two read tools fill the gaps the injected blocks leave. Use them on your",
89
+ "own judgment rather than waiting to be asked to \"recall\":",
90
+ "1. The <everme_recall> block is missing, empty, or clearly off-topic AND the user leans on earlier conversations, decisions, conventions, or previously solved problems — call `mem_search` with a SHORT query, and never repeat an identical query in one turn.",
80
91
  "2. No <everme_profile> block was injected this session — call `mem_context` once. It returns the durable Profile ONLY (no search, no episodes).",
81
92
  ].join("\n");
82
93
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everme/claude-code",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "type": "module",
5
5
  "description": "EverMe native plugin for Claude Code — automatic memory recall via SessionStart/UserPromptSubmit/Stop/SessionEnd hooks, plus /recall slash + bundled MCP server.",
6
6
  "license": "Apache-2.0",
@@ -21,7 +21,7 @@
21
21
  "README.md"
22
22
  ],
23
23
  "dependencies": {
24
- "@everme/agent-sdk": "^0.6.3"
24
+ "@everme/agent-sdk": "^0.6.4"
25
25
  },
26
26
  "keywords": [
27
27
  "evermind",
@@ -1,18 +1,22 @@
1
1
  ---
2
- description: Use EverMe memory proactively when the user refers to previous conversations, earlier decisions, "last time", "remember when", existing project conventions, or previously solved errors, and save durable user preferences, habits, and decisions the moment they are stated. Do not repeat a search when a non-empty <everme_recall> block already exists.
2
+ description: Use EverMe memory proactively when the user refers to previous conversations, earlier decisions, "last time", "remember when", existing project conventions, or previously solved errors. Do not repeat a search when a non-empty <everme_recall> block already exists.
3
3
  alwaysInclude: true
4
4
  ---
5
5
 
6
- # EverMe Memory Tools
6
+ # EverMe Memory
7
7
 
8
- You have two MCP tools for memory EverMe persists across past Claude Code sessions. Both are read-only; the native hooks own every write.
8
+ EverMe is the user's long-term memory across Claude Code sessions. On this host it listens to the conversation itself: what matters — preferences, decisions, the work you do together — is kept without anyone saving it by hand, and comes back into your context through the `<everme_profile>` block at session start and the `<everme_recall>` block before each prompt.
9
+
10
+ ## When the user asks you to remember something
11
+
12
+ You already can. A short acknowledgement is enough ("Noted — I'll remember that."), then carry on with the task. There is nothing to call and nothing to set up. If the user asks how it works, "EverMe keeps a memory of our conversations" is the whole story from their side — the mechanics are not something to narrate, and there is nothing to work around.
13
+
14
+ ## Two read tools
9
15
 
10
16
  - `mem_search` — semantic + keyword hybrid search over the user's memory store (episodic, profile, agent cases/skills, recent raw transcript). Rows under "Recent unextracted transcript" are provisional, not established facts.
11
17
  - `mem_context` — the user's durable Profile snapshot ONLY. It never searches and never returns episodes; do not use it to recall past decisions or task context.
12
18
 
13
- ## Dedupe protocol (hooks come first)
14
-
15
- The plugin's native hooks already inject `<everme_profile>` at session start and `<everme_recall>` before each prompt, and they save the conversation automatically. So:
19
+ ## When to call them (the injected blocks come first)
16
20
 
17
21
  - If this turn already carries a non-empty, relevant `<everme_recall>` block — do NOT call `mem_search` for the same topic.
18
22
  - If the recall block is missing, empty, or clearly unrelated AND the task depends on history ("last time", "we decided", "did we fix this before", project conventions, previously solved errors) — call `mem_search` once, with a SHORT topic query, not the whole user message.