sepia-mcp 0.3.0 → 0.3.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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +14 -12
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  A self-contained MCP server for [Sepia](https://sepia.fly.dev) — your personal
4
4
  knowledge-graph memory server. It exposes the **same 7 tools** as the Sepia
5
5
  server (`manage_namespace`, `manage_entity`, `manage_relation`, `manage_memory`,
6
- `search`, `traverse_graph`, `consolidate`), but every call is proxied to the
6
+ `search`, `traverse_graph`, `prune_memories`), but every call is proxied to the
7
7
  Sepia REST API. No database, no migrations — just a lightweight MCP wrapper.
8
8
 
9
9
  ## Install
package/dist/index.js CHANGED
@@ -621,6 +621,7 @@ AFTER you answer (every turn where you learned something):
621
621
  2. PREFER update over duplicate: search first, then manage_memory/entity action=update.
622
622
  3. SCORE importance 0-1: 0.9+ identity/core preference, 0.6-0.8 active project fact/decision, 0.3-0.5 observation/person, ≤0.2 transient (will decay).
623
623
  4. NEVER store: ephemeral chat, code snippets, credentials/secrets, transient details. Sepia is not a vault — refuse secrets.
624
+ 5. NEVER call "prune_memories" to save anything — it is NOT a write tool. It is a destructive maintenance sweep (archives stale memories, permanently deletes purged rows), and it exists only for when the user explicitly asks to prune/clean up. Persisting is manage_memory.
624
625
 
625
626
  Rule of thumb: If the user sent a message with any substantive content, you should have called search before replying and considered a manage_memory/manage_entity write after replying. Two Sepia calls per turn is normal and expected.
626
627
 
@@ -784,7 +785,6 @@ var TraverseInput = v.object({
784
785
  start_id: v.pipe(uuidSchema, v.description("Entity UUID to start the BFS walk from")),
785
786
  depth: v.optional(v.pipe(v.number(), v.minValue(1), v.maxValue(TRAVERSE_DEPTH_MAX), v.description("Walk depth (default 1, max 3)")), 1)
786
787
  });
787
- var ConsolidateInput = v.object({});
788
788
  var NamespaceToolInput = v.object({
789
789
  action: v.pipe(v.union([
790
790
  v.literal("create"),
@@ -856,7 +856,9 @@ var MemoryToolInput = v.object({
856
856
  });
857
857
  var SearchToolInput = SearchInput;
858
858
  var TraverseToolInput = TraverseInput;
859
- var ConsolidateToolInput = v.object({});
859
+ var PruneMemoriesToolInput = v.object({
860
+ confirm: v.pipe(v.literal(true), v.description("Must be true. Acknowledges that this archives stale memories and permanently deletes rows archived more than 30 days ago. Set it only after the user explicitly asked for the sweep."))
861
+ });
860
862
  // ../../node_modules/.bun/drizzle-orm@0.45.2+af38a8ac26d8f59c/node_modules/drizzle-orm/entity.js
861
863
  var entityKind = Symbol.for("drizzle:entityKind");
862
864
  var hasOwnEntityKind = Symbol.for("drizzle:hasOwnEntityKind");
@@ -8730,8 +8732,8 @@ class SepiaClient {
8730
8732
  qs.set("depth", String(depth));
8731
8733
  return this.request("GET", `/api/graph?${qs.toString()}`);
8732
8734
  }
8733
- consolidate() {
8734
- return this.request("POST", "/api/consolidate");
8735
+ pruneMemories() {
8736
+ return this.request("POST", "/api/prune-memories");
8735
8737
  }
8736
8738
  }
8737
8739
 
@@ -9026,17 +9028,17 @@ function registerTraverseTools(server, client) {
9026
9028
  }));
9027
9029
  }
9028
9030
 
9029
- // src/tools/consolidate.ts
9030
- function registerConsolidateTools(server, client) {
9031
+ // src/tools/prune.ts
9032
+ function registerPruneMemoriesTools(server, client) {
9031
9033
  server.tool({
9032
- name: "consolidate",
9033
- title: "Consolidate Memory",
9034
- description: "Idempotent maintenance sweep — pure SQL, no LLM calls. Scoped to your namespaces only.",
9034
+ name: "prune_memories",
9035
+ title: "Maintenance sweep — NOT for saving memories",
9036
+ description: 'Maintenance sweep — NOT for saving memories. Never call this to store, remember, or persist anything (that is manage_memory), and never call it proactively or to "tidy up". Run it ONLY when the user explicitly asks to prune or clean up their memories. Destructive and not reversible: archives stale memories (importance < 0.3, untouched 90 days), de-duplicates identical content, and permanently deletes rows archived more than 30 days ago.',
9035
9037
  icons: [SEPIA_ICON],
9036
- schema: ConsolidateToolInput,
9038
+ schema: PruneMemoriesToolInput,
9037
9039
  annotations: { destructiveHint: true }
9038
9040
  }, safe(async () => {
9039
- return (await client.consolidate()).result;
9041
+ return (await client.pruneMemories()).result;
9040
9042
  }));
9041
9043
  }
9042
9044
 
@@ -9067,7 +9069,7 @@ function createSepiaServer(opts = {}) {
9067
9069
  registerMemoryTools(server, client);
9068
9070
  registerSearchTools(server, client);
9069
9071
  registerTraverseTools(server, client);
9070
- registerConsolidateTools(server, client);
9072
+ registerPruneMemoriesTools(server, client);
9071
9073
  return { server, client };
9072
9074
  }
9073
9075
  async function startStdio(server) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sepia-mcp",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Self-contained MCP server for Sepia — a personal knowledge-graph memory server. Talks to the Sepia REST API (SEPIA_URL + SEPIA_API_KEY); stdio or HTTP transport.",
5
5
  "type": "module",
6
6
  "repository": {