ever-opencode 0.2.0 → 0.2.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.
- package/README.md +1 -1
- package/dist/tools.js +13 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -109,7 +109,7 @@ agent can call on demand (same pattern as the mem0 plugin's memory tools):
|
|
|
109
109
|
|
|
110
110
|
| Tool | What it does |
|
|
111
111
|
| --- | --- |
|
|
112
|
-
| `everos_search` | Query memory on demand — "what did we decide about X last month?" Search runs server-side (BM25/vector); results carry relevance scores and ages.
|
|
112
|
+
| `everos_search` | Query memory on demand — "what did we decide about X last month?" Search runs server-side (BM25/vector); results carry relevance scores and ages. Searches this project's memory only — EverOS cannot search across projects. |
|
|
113
113
|
| `everos_add` | Store a durable fact immediately — add + synchronous extraction. Becomes searchable within a few seconds. |
|
|
114
114
|
| `everos_flush` | Force extraction of the session's buffered conversation. |
|
|
115
115
|
|
package/dist/tools.js
CHANGED
|
@@ -46,20 +46,16 @@ async function guarded(deps, tool, fn) {
|
|
|
46
46
|
function makeSearchTool(deps) {
|
|
47
47
|
return {
|
|
48
48
|
name: "everos_search",
|
|
49
|
-
description: "Search
|
|
50
|
-
"sessions). Use proactively when context from past work would help —
|
|
51
|
-
"preferences, debugging history. Results are ranked server-side
|
|
52
|
-
"line carries a relevance score and age."
|
|
49
|
+
description: "Search this project's persistent EverOS memory (episodes + atomic facts from previous " +
|
|
50
|
+
"sessions of this project). Use proactively when context from past work would help — " +
|
|
51
|
+
"prior decisions, preferences, debugging history. Results are ranked server-side " +
|
|
52
|
+
"(BM25/vector); each line carries a relevance score and age. Searches the current " +
|
|
53
|
+
"project's scope only — EverOS cannot search across projects.",
|
|
53
54
|
input: {
|
|
54
55
|
type: "object",
|
|
55
56
|
properties: {
|
|
56
57
|
query: { type: "string", description: "Free-text query, e.g. 'how did we fix the flaky login test'" },
|
|
57
58
|
top_k: { type: "number", description: `Max results (1-25, default ${deps.defaultTopK})` },
|
|
58
|
-
scope: {
|
|
59
|
-
type: "string",
|
|
60
|
-
enum: ["project", "global"],
|
|
61
|
-
description: '"project" (memories from this project only, default) or "global" (all projects)',
|
|
62
|
-
},
|
|
63
59
|
},
|
|
64
60
|
required: ["query"],
|
|
65
61
|
},
|
|
@@ -69,20 +65,23 @@ function makeSearchTool(deps) {
|
|
|
69
65
|
if (query.length === 0) {
|
|
70
66
|
return { content: "everos_search failed: 'query' (non-empty string) is required." };
|
|
71
67
|
}
|
|
72
|
-
const global = input.scope === "global";
|
|
73
68
|
return guarded(deps, "everos_search", async () => {
|
|
69
|
+
const topK = clampTopK(input.top_k, deps.defaultTopK);
|
|
70
|
+
// Scope narrowing is mandatory: the server pins app_id/project_id (defaults
|
|
71
|
+
// "default"/"default") into the store filter, so omitting either searches an
|
|
72
|
+
// empty partition — there is no cross-scope mode in the v2 API.
|
|
74
73
|
const episodes = await deps.client.searchMemories(deps.scopeBase.userId, query, {
|
|
75
74
|
method: deps.recallMethod,
|
|
76
|
-
topK
|
|
77
|
-
scope:
|
|
75
|
+
topK,
|
|
76
|
+
scope: { appId: deps.scopeBase.appId, projectId: deps.scopeBase.projectId },
|
|
78
77
|
});
|
|
79
|
-
const lines = formatEpisodeLines(episodes, { topK
|
|
78
|
+
const lines = formatEpisodeLines(episodes, { topK });
|
|
80
79
|
if (lines.length === 0) {
|
|
81
80
|
return { content: `No memories found for: ${query}` };
|
|
82
81
|
}
|
|
83
82
|
return {
|
|
84
83
|
content: [`EverOS memories (${lines.length}, may be imperfect):`, ...lines].join("\n"),
|
|
85
|
-
metadata: { sessionID: context.sessionID, scope:
|
|
84
|
+
metadata: { sessionID: context.sessionID, scope: "project", count: lines.length },
|
|
86
85
|
};
|
|
87
86
|
});
|
|
88
87
|
},
|
package/package.json
CHANGED