sepia-mcp 0.8.0 → 0.8.2
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/dist/index.js +11 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -714,6 +714,7 @@ var MAX_ENTITY_LINKS = 3;
|
|
|
714
714
|
var SEARCH_LIMIT_MAX = 25;
|
|
715
715
|
var QUERY_LIMIT_MAX = 50;
|
|
716
716
|
var TRAVERSE_DEPTH_MAX = 3;
|
|
717
|
+
var SEARCH_ENGINES = ["coverage", "bm25"];
|
|
717
718
|
var BRIEFING_DETAILS = ["core", "all"];
|
|
718
719
|
var BRIEFING_DETAIL_DEFAULT = "core";
|
|
719
720
|
var BRIEFING_CHARS_DEFAULT = 8000;
|
|
@@ -818,7 +819,8 @@ var SearchInput = v.object({
|
|
|
818
819
|
type: v.optional(v.pipe(v.string(), v.maxLength(64), v.description("Memory type (fact/observation/preference/instruction) OR entity type (person/project/tool/concept/repo)"))),
|
|
819
820
|
tags: v.optional(v.pipe(tagsSchema, v.description("Match memories/entities carrying ALL of these tags"))),
|
|
820
821
|
limit: v.optional(v.pipe(v.number(), v.minValue(1), v.maxValue(SEARCH_LIMIT_MAX), v.description("Max results (default 10, max 25)")), 10),
|
|
821
|
-
min_terms: v.optional(v.pipe(v.number(), v.minValue(1), v.maxValue(50), v.description("Drop hits covering fewer than this many query terms (precision dial; absent = best-effort recall). Too high returns 0 with `terms` present — that is the filter, not a missing memory.")))
|
|
822
|
+
min_terms: v.optional(v.pipe(v.number(), v.minValue(1), v.maxValue(50), v.description("Drop hits covering fewer than this many query terms (precision dial; absent = best-effort recall). Too high returns 0 with `terms` present — that is the filter, not a missing memory."))),
|
|
823
|
+
engine: v.optional(v.pipe(v.picklist([...SEARCH_ENGINES]), v.description('Ranking engine: "coverage" (substring, coverage-first) or "bm25" (tokenised, BM25-ranked). Omit to use the server default.')))
|
|
822
824
|
});
|
|
823
825
|
var TraverseInput = v.object({
|
|
824
826
|
start_id: v.pipe(uuidSchema, v.description("Entity UUID to start the BFS walk from")),
|
|
@@ -3338,6 +3340,9 @@ class PrimaryKey {
|
|
|
3338
3340
|
}
|
|
3339
3341
|
|
|
3340
3342
|
// ../shared/src/db/schema.ts
|
|
3343
|
+
var tsvector = customType({
|
|
3344
|
+
dataType: () => "tsvector"
|
|
3345
|
+
});
|
|
3341
3346
|
var users = pgTable("users", {
|
|
3342
3347
|
id: uuid2().primaryKey().notNull(),
|
|
3343
3348
|
name: text().notNull(),
|
|
@@ -3512,6 +3517,7 @@ var entities = pgTable("entities", {
|
|
|
3512
3517
|
importance: real().default(0.5),
|
|
3513
3518
|
accessCount: integer("access_count").default(0),
|
|
3514
3519
|
tags: text("tags").array().default([]),
|
|
3520
|
+
haystackTsv: tsvector("haystack_tsv").generatedAlwaysAs(sql`to_tsvector('english', COALESCE(name, '') || ' ' || COALESCE(summary, ''))`),
|
|
3515
3521
|
createdAt: timestamp("created_at", {
|
|
3516
3522
|
withTimezone: true,
|
|
3517
3523
|
mode: "string"
|
|
@@ -3524,6 +3530,7 @@ var entities = pgTable("entities", {
|
|
|
3524
3530
|
index("idx_entities_name").using("btree", table.name.asc().nullsLast().op("text_ops")),
|
|
3525
3531
|
index("idx_entities_namespace").using("btree", table.namespaceId.asc().nullsLast().op("uuid_ops")),
|
|
3526
3532
|
index("idx_entities_type").using("btree", table.type.asc().nullsLast().op("text_ops")),
|
|
3533
|
+
index("entities_haystack_bm25").using("lakebase_bm25", table.haystackTsv).with({ b: 0, default_limit: 100 }),
|
|
3527
3534
|
unique("entities_namespace_id_name_key").on(table.namespaceId, table.name),
|
|
3528
3535
|
check("entities_importance_check", sql`${table.importance} >= 0 AND ${table.importance} <= 1`),
|
|
3529
3536
|
check("entities_type_check", sql`${table.type} IN ('person', 'project', 'tool', 'concept', 'repo')`),
|
|
@@ -3585,11 +3592,13 @@ var memories = pgTable("memories", {
|
|
|
3585
3592
|
withTimezone: true,
|
|
3586
3593
|
mode: "string"
|
|
3587
3594
|
}).defaultNow(),
|
|
3588
|
-
archived: boolean2().default(false)
|
|
3595
|
+
archived: boolean2().default(false),
|
|
3596
|
+
contentTsv: tsvector("content_tsv").generatedAlwaysAs(sql`to_tsvector('english', COALESCE(content, ''))`)
|
|
3589
3597
|
}, (table) => [
|
|
3590
3598
|
index("idx_memories_importance").using("btree", table.importance.asc().nullsLast().op("float4_ops")),
|
|
3591
3599
|
index("idx_memories_namespace").using("btree", table.namespaceId.asc().nullsLast().op("uuid_ops")),
|
|
3592
3600
|
index("idx_memories_type").using("btree", table.type.asc().nullsLast().op("text_ops")),
|
|
3601
|
+
index("memories_content_bm25").using("lakebase_bm25", table.contentTsv).with({ b: 0, default_limit: 100 }),
|
|
3593
3602
|
check("memories_importance_check", sql`${table.importance} >= 0 AND ${table.importance} <= 1`),
|
|
3594
3603
|
check("memories_type_check", sql`${table.type} IN ('fact', 'observation', 'preference', 'instruction')`),
|
|
3595
3604
|
index("idx_memories_content_trgm").using("gin", table.content.op("gin_trgm_ops")),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sepia-mcp",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
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": {
|