sepia-mcp 0.8.5 → 0.9.0

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 (2) hide show
  1. package/dist/index.js +53 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -629,7 +629,11 @@ FIRST — once per session, before your first substantive action (NOT keyword-dr
629
629
  rules it did NOT return. BEFORE anything slow, metered, destructive, or expensive (an
630
630
  install, build, deploy, deletion, or infra change), call it again with detail="all" and
631
631
  read the rest — the rule that bites in those moments is exactly the one a default load
632
- leaves out.
632
+ leaves out. A ~1M-token context window? Then make THAT FIRST call detail="all" with
633
+ max_chars at its maximum instead — the full standing set is only ~10k tokens (≈1% of your
634
+ window), it is read once per session, and core-by-default exists to protect small
635
+ contexts, not to withhold rules from big ones. If you don't know your window size, keep
636
+ the default.
633
637
 
634
638
  THEN — before you answer (every turn except trivial chitchat):
635
639
  1. Call "search" with 2-5 keywords from the user's current message + task (e.g. query="auth rate limiting"). If sparse, also call "traverse_graph" from the top entity.
@@ -717,8 +721,10 @@ var TRAVERSE_DEPTH_MAX = 3;
717
721
  var SEARCH_ENGINES = ["coverage", "bm25"];
718
722
  var BRIEFING_DETAILS = ["core", "all"];
719
723
  var BRIEFING_DETAIL_DEFAULT = "core";
724
+ var BRIEFING_ITEM_CHARS = 400;
720
725
  var BRIEFING_CHARS_DEFAULT = 8000;
721
- var BRIEFING_CHARS_MAX = 40000;
726
+ var BRIEFING_FETCH_MAX = 500;
727
+ var BRIEFING_CHARS_MAX = BRIEFING_FETCH_MAX * BRIEFING_ITEM_CHARS;
722
728
  // ../shared/src/schemas.ts
723
729
  import * as v from "valibot";
724
730
  var importanceSchema = v.pipe(v.number(), v.minValue(IMPORTANCE_MIN), v.maxValue(IMPORTANCE_MAX));
@@ -887,8 +893,8 @@ var MemoryToolInput = v.object({
887
893
  archived: v.optional(v.pipe(v.boolean(), v.description("query: include archived (default false)")), false),
888
894
  tags: v.optional(v.pipe(tagsSchema, v.description("query: match memories carrying ALL of these tags"))),
889
895
  limit: v.optional(v.pipe(v.number(), v.minValue(1), v.maxValue(QUERY_LIMIT_MAX), v.description("query: max results (default 20, max 50)")), 20),
890
- detail: v.optional(v.pipe(v.picklist([...BRIEFING_DETAILS]), v.description('briefing: "core" (default) = the never-dropped standing rules; "all" = also return the tail of situational rules (max_chars applies only then).')), BRIEFING_DETAIL_DEFAULT),
891
- max_chars: v.optional(v.pipe(v.number(), v.minValue(1000), v.maxValue(BRIEFING_CHARS_MAX), v.description(`briefing (detail="all" only): total character budget (default ${BRIEFING_CHARS_DEFAULT}, max ${BRIEFING_CHARS_MAX}). If truncated: true, raise it or fetch the ids.`)), BRIEFING_CHARS_DEFAULT),
896
+ detail: v.optional(v.pipe(v.picklist([...BRIEFING_DETAILS]), v.description('briefing: "core" (default) = the never-dropped standing rules; "all" = also return the tail of situational rules (max_chars applies only then). On a ~1M-token context window, request "all" on the first session-start call.')), BRIEFING_DETAIL_DEFAULT),
897
+ max_chars: v.optional(v.pipe(v.number(), v.minValue(1000), v.maxValue(BRIEFING_CHARS_MAX), v.description(`briefing (detail="all" only): total character budget (default ${BRIEFING_CHARS_DEFAULT}, max ${BRIEFING_CHARS_MAX} — the physical maximum a briefing can return: FETCH_MAX rows x ITEM_CHARS). If truncated: true, raise it or fetch the ids.`)), BRIEFING_CHARS_DEFAULT),
892
898
  where: v.optional(v.pipe(v.object({
893
899
  type: v.optional(v.picklist(MEMORY_TYPES)),
894
900
  namespace: v.optional(v.string()),
@@ -9165,6 +9171,48 @@ function registerPruneMemoriesTools(server, client) {
9165
9171
  return (await client.pruneMemories()).result;
9166
9172
  }));
9167
9173
  }
9174
+ // package.json
9175
+ var package_default = {
9176
+ name: "sepia-mcp",
9177
+ version: "0.9.0",
9178
+ 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.",
9179
+ type: "module",
9180
+ repository: {
9181
+ type: "git",
9182
+ url: "https://github.com/Michael-Obele/sepia",
9183
+ directory: "packages/sepia-mcp"
9184
+ },
9185
+ bin: "./dist/index.js",
9186
+ exports: {
9187
+ ".": "./dist/index.js"
9188
+ },
9189
+ files: [
9190
+ "dist"
9191
+ ],
9192
+ scripts: {
9193
+ build: "bun build ./src/index.ts --target=node --outdir=dist --external tmcp --external @tmcp/transport-http --external valibot && chmod +x dist/index.js",
9194
+ check: "tsc --noEmit",
9195
+ dev: "bun --hot ./src/index.ts"
9196
+ },
9197
+ dependencies: {
9198
+ "@tmcp/transport-http": "^0.9.0",
9199
+ tmcp: "^1.20.0",
9200
+ valibot: "^1.4.2"
9201
+ },
9202
+ devDependencies: {
9203
+ "@sepia/shared": "workspace:*"
9204
+ },
9205
+ peerDependencies: {
9206
+ typescript: "^5"
9207
+ },
9208
+ keywords: [
9209
+ "mcp",
9210
+ "memory",
9211
+ "knowledge-graph",
9212
+ "sepia"
9213
+ ],
9214
+ license: "MIT"
9215
+ };
9168
9216
 
9169
9217
  // src/index.ts
9170
9218
  function createSepiaServer(opts = {}) {
@@ -9180,7 +9228,7 @@ function createSepiaServer(opts = {}) {
9180
9228
  });
9181
9229
  const server = new McpServer({
9182
9230
  name: "sepia",
9183
- version: "1.0.0",
9231
+ version: package_default.version,
9184
9232
  description: "Sepia — personal knowledge-graph memory server (remote REST client). Entities, relations, memories in namespaces, with search, traversal, and consolidation."
9185
9233
  }, {
9186
9234
  adapter: new ValibotJsonSchemaAdapter,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sepia-mcp",
3
- "version": "0.8.5",
3
+ "version": "0.9.0",
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": {