@everme/claude-code 0.3.1 → 0.3.3
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.3.
|
|
13
|
+
"version": "0.3.3",
|
|
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.3.
|
|
3
|
+
"version": "0.3.3",
|
|
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",
|
|
@@ -50,6 +50,9 @@ async function main() {
|
|
|
50
50
|
let count = 0;
|
|
51
51
|
let degraded = null;
|
|
52
52
|
try {
|
|
53
|
+
// The raw prompt can be a huge paste; the SDK's searchMemory clamps
|
|
54
|
+
// the query to the backend's MaxSearchQueryRunes limit, so we pass it
|
|
55
|
+
// through as-is rather than capping here too.
|
|
53
56
|
const res = await searchMemories(prompt, { topK: TOP_K });
|
|
54
57
|
// EverOS frequently returns score=null on episodic hits (decoded as
|
|
55
58
|
// 0 over the wire) — that's "unscored", not "score zero". Treat
|
|
@@ -18,14 +18,20 @@
|
|
|
18
18
|
|
|
19
19
|
import { createInterface } from "readline";
|
|
20
20
|
import { createRequire } from "node:module";
|
|
21
|
+
import { buildMemoryPrompt } from "@everme/agent-sdk";
|
|
21
22
|
import { searchMemories, getContext, EvermeError } from "./lib/api.js";
|
|
22
23
|
import { isConfigured } from "./lib/config.js";
|
|
24
|
+
import { renderProfileBlock } from "./lib/profile.js";
|
|
23
25
|
import { redactError, debug } from "./lib/redact.js";
|
|
24
26
|
|
|
25
27
|
// Derive serverInfo.version from package.json so the value tracks the
|
|
26
28
|
// plugin release rather than rotting as a hard-coded literal. We sit at
|
|
27
|
-
// hooks/scripts/mcp-server.js
|
|
28
|
-
|
|
29
|
+
// hooks/scripts/mcp-server.js → ../ is hooks/, ../../ is the plugin
|
|
30
|
+
// root where package.json lives. (`../../../` would land in
|
|
31
|
+
// node_modules/@everme/, which has no package.json and blows up the
|
|
32
|
+
// server at startup — that was the 0.3.1 bug Claude Code surfaced as
|
|
33
|
+
// "Failed to connect" for plugin:everme:everme.)
|
|
34
|
+
const { version: PKG_VERSION } = createRequire(import.meta.url)("../../package.json");
|
|
29
35
|
|
|
30
36
|
// Protocol versions this hand-rolled server knows about. Clients that
|
|
31
37
|
// announce one of these in `initialize` get their version echoed back
|
|
@@ -86,14 +92,38 @@ const handlers = {
|
|
|
86
92
|
try {
|
|
87
93
|
switch (name) {
|
|
88
94
|
case "everme_search": {
|
|
95
|
+
// Render the SDK bundle through buildMemoryPrompt — same
|
|
96
|
+
// path inject-memories.js uses for the auto-recall hook,
|
|
97
|
+
// and the same shape @everme/memory-mcp's mem_search tool
|
|
98
|
+
// returns. Earlier `JSON.stringify(res, null, 2)` forced the
|
|
99
|
+
// host LLM to peel a JSON envelope and decode escaped
|
|
100
|
+
// newlines before any of the section bullets were readable.
|
|
89
101
|
const topK = Math.min(Number(args.topK) || 10, 25);
|
|
90
102
|
const res = await searchMemories(String(args.query || ""), { topK });
|
|
91
|
-
|
|
103
|
+
const body = buildMemoryPrompt(res, { wrapInCodeBlock: false });
|
|
104
|
+
const header = `## EverMe search results for "${String(args.query || "")}"`;
|
|
105
|
+
const trimmed = body.replace(/^## Relevant memory\n\n?/, "");
|
|
106
|
+
const text = trimmed
|
|
107
|
+
? `${header}\n\n${trimmed}`
|
|
108
|
+
: `${header}\n\n_(no matching memories)_`;
|
|
109
|
+
return ok(redactError(text));
|
|
92
110
|
}
|
|
93
111
|
case "everme_context": {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
112
|
+
// getContext returns the gateway's raw shape
|
|
113
|
+
// {profile, cachedAt, generatedAt} — the markdown lives in
|
|
114
|
+
// res.profile as a structured object, NOT a string. Render
|
|
115
|
+
// via renderProfileBlock (same renderer session-start.js
|
|
116
|
+
// uses for the SessionStart hook injection) so the Tools
|
|
117
|
+
// path matches what users already see in the injected
|
|
118
|
+
// <everme_profile> block.
|
|
119
|
+
const res = await getContext(String(args.query || ""), {});
|
|
120
|
+
// renderProfileBlock returns "" when profile exists but has no
|
|
121
|
+
// facts/traits yet (new account). Check the rendered output, not
|
|
122
|
+
// just the wrapper object, so the empty case yields a fallback
|
|
123
|
+
// message instead of an empty tool result.
|
|
124
|
+
const rendered = res?.profile ? renderProfileBlock(res.profile) : "";
|
|
125
|
+
const text = rendered || "_(no profile available — your EverMe account has no extracted memories yet)_";
|
|
126
|
+
return ok(redactError(text));
|
|
97
127
|
}
|
|
98
128
|
default:
|
|
99
129
|
return errResp(`unknown tool: ${name}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everme/claude-code",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
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",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"node": ">=18.0.0"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
-
"test": "node --test tests/redact.test.js tests/config.test.js tests/transcript.test.js tests/hooks.test.js"
|
|
11
|
+
"test": "node --test tests/redact.test.js tests/config.test.js tests/transcript.test.js tests/hooks.test.js tests/mcp-server.test.js"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
14
|
".claude-plugin/",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"README.md"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@everme/agent-sdk": "^0.3.
|
|
24
|
+
"@everme/agent-sdk": "^0.3.3"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [
|
|
27
27
|
"evermind",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"homepage": "https://everme.evermind.ai",
|
|
38
38
|
"repository": {
|
|
39
39
|
"type": "git",
|
|
40
|
-
"url": "git+https://github.com/EverMind-AI/EverMe
|
|
40
|
+
"url": "git+https://github.com/EverMind-AI/EverMe.git",
|
|
41
41
|
"directory": "plugins/claude-code"
|
|
42
42
|
},
|
|
43
43
|
"bugs": {
|
|
44
|
-
"url": "https://github.com/EverMind-AI/EverMe
|
|
44
|
+
"url": "https://github.com/EverMind-AI/EverMe/issues"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public",
|