sepia-mcp 0.7.0 → 0.8.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/dist/index.js +56 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3338,6 +3338,9 @@ class PrimaryKey {
|
|
|
3338
3338
|
}
|
|
3339
3339
|
|
|
3340
3340
|
// ../shared/src/db/schema.ts
|
|
3341
|
+
var tsvector = customType({
|
|
3342
|
+
dataType: () => "tsvector"
|
|
3343
|
+
});
|
|
3341
3344
|
var users = pgTable("users", {
|
|
3342
3345
|
id: uuid2().primaryKey().notNull(),
|
|
3343
3346
|
name: text().notNull(),
|
|
@@ -3512,6 +3515,7 @@ var entities = pgTable("entities", {
|
|
|
3512
3515
|
importance: real().default(0.5),
|
|
3513
3516
|
accessCount: integer("access_count").default(0),
|
|
3514
3517
|
tags: text("tags").array().default([]),
|
|
3518
|
+
haystackTsv: tsvector("haystack_tsv").generatedAlwaysAs(sql`to_tsvector('english', COALESCE(name, '') || ' ' || COALESCE(summary, ''))`),
|
|
3515
3519
|
createdAt: timestamp("created_at", {
|
|
3516
3520
|
withTimezone: true,
|
|
3517
3521
|
mode: "string"
|
|
@@ -3524,6 +3528,7 @@ var entities = pgTable("entities", {
|
|
|
3524
3528
|
index("idx_entities_name").using("btree", table.name.asc().nullsLast().op("text_ops")),
|
|
3525
3529
|
index("idx_entities_namespace").using("btree", table.namespaceId.asc().nullsLast().op("uuid_ops")),
|
|
3526
3530
|
index("idx_entities_type").using("btree", table.type.asc().nullsLast().op("text_ops")),
|
|
3531
|
+
index("entities_haystack_bm25").using("lakebase_bm25", table.haystackTsv).with({ b: 0, default_limit: 100 }),
|
|
3527
3532
|
unique("entities_namespace_id_name_key").on(table.namespaceId, table.name),
|
|
3528
3533
|
check("entities_importance_check", sql`${table.importance} >= 0 AND ${table.importance} <= 1`),
|
|
3529
3534
|
check("entities_type_check", sql`${table.type} IN ('person', 'project', 'tool', 'concept', 'repo')`),
|
|
@@ -3585,11 +3590,13 @@ var memories = pgTable("memories", {
|
|
|
3585
3590
|
withTimezone: true,
|
|
3586
3591
|
mode: "string"
|
|
3587
3592
|
}).defaultNow(),
|
|
3588
|
-
archived: boolean2().default(false)
|
|
3593
|
+
archived: boolean2().default(false),
|
|
3594
|
+
contentTsv: tsvector("content_tsv").generatedAlwaysAs(sql`to_tsvector('english', COALESCE(content, ''))`)
|
|
3589
3595
|
}, (table) => [
|
|
3590
3596
|
index("idx_memories_importance").using("btree", table.importance.asc().nullsLast().op("float4_ops")),
|
|
3591
3597
|
index("idx_memories_namespace").using("btree", table.namespaceId.asc().nullsLast().op("uuid_ops")),
|
|
3592
3598
|
index("idx_memories_type").using("btree", table.type.asc().nullsLast().op("text_ops")),
|
|
3599
|
+
index("memories_content_bm25").using("lakebase_bm25", table.contentTsv).with({ b: 0, default_limit: 100 }),
|
|
3593
3600
|
check("memories_importance_check", sql`${table.importance} >= 0 AND ${table.importance} <= 1`),
|
|
3594
3601
|
check("memories_type_check", sql`${table.type} IN ('fact', 'observation', 'preference', 'instruction')`),
|
|
3595
3602
|
index("idx_memories_content_trgm").using("gin", table.content.op("gin_trgm_ops")),
|
|
@@ -3694,6 +3701,52 @@ var memoryEntityLinks = pgTable("memory_entity_links", {
|
|
|
3694
3701
|
name: "memory_entity_links_pkey"
|
|
3695
3702
|
})
|
|
3696
3703
|
]);
|
|
3704
|
+
var telemetrySettings = pgTable("telemetry_settings", {
|
|
3705
|
+
ownerId: uuid2("owner_id").primaryKey().notNull(),
|
|
3706
|
+
tier: text().notNull().default("off"),
|
|
3707
|
+
ttlDays: integer("ttl_days").notNull().default(30),
|
|
3708
|
+
enabledAt: timestamp("enabled_at", { withTimezone: true, mode: "string" }),
|
|
3709
|
+
updatedAt: timestamp("updated_at", {
|
|
3710
|
+
withTimezone: true,
|
|
3711
|
+
mode: "string"
|
|
3712
|
+
}).defaultNow()
|
|
3713
|
+
}, (table) => [
|
|
3714
|
+
foreignKey({
|
|
3715
|
+
columns: [table.ownerId],
|
|
3716
|
+
foreignColumns: [users.id],
|
|
3717
|
+
name: "telemetry_settings_owner_id_fkey"
|
|
3718
|
+
}).onDelete("cascade"),
|
|
3719
|
+
check("telemetry_settings_tier_check", sql`${table.tier} IN ('off', 'signals', 'transcripts')`),
|
|
3720
|
+
check("telemetry_settings_ttl_check", sql`${table.ttlDays} >= 1 AND ${table.ttlDays} <= 365`)
|
|
3721
|
+
]);
|
|
3722
|
+
var telemetryEvents = pgTable("telemetry_events", {
|
|
3723
|
+
id: uuid2().defaultRandom().primaryKey().notNull(),
|
|
3724
|
+
ownerId: uuid2("owner_id").notNull(),
|
|
3725
|
+
createdAt: timestamp("created_at", {
|
|
3726
|
+
withTimezone: true,
|
|
3727
|
+
mode: "string"
|
|
3728
|
+
}).defaultNow(),
|
|
3729
|
+
sessionHash: text("session_hash"),
|
|
3730
|
+
tool: text().notNull(),
|
|
3731
|
+
action: text(),
|
|
3732
|
+
engine: text(),
|
|
3733
|
+
queryFingerprint: text("query_fingerprint"),
|
|
3734
|
+
terms: integer(),
|
|
3735
|
+
bestMatchedTerms: integer("best_matched_terms"),
|
|
3736
|
+
hitCount: integer("hit_count"),
|
|
3737
|
+
latencyMs: integer("latency_ms"),
|
|
3738
|
+
resultChars: integer("result_chars"),
|
|
3739
|
+
queryText: text("query_text"),
|
|
3740
|
+
hitIds: uuid2("hit_ids").array()
|
|
3741
|
+
}, (table) => [
|
|
3742
|
+
index("idx_telemetry_events_owner").using("btree", table.ownerId.asc().nullsLast().op("uuid_ops")),
|
|
3743
|
+
index("idx_telemetry_events_session").using("btree", table.sessionHash.asc().nullsLast().op("text_ops")),
|
|
3744
|
+
foreignKey({
|
|
3745
|
+
columns: [table.ownerId],
|
|
3746
|
+
foreignColumns: [users.id],
|
|
3747
|
+
name: "telemetry_events_owner_id_fkey"
|
|
3748
|
+
}).onDelete("cascade")
|
|
3749
|
+
]);
|
|
3697
3750
|
// ../../node_modules/.bun/@neondatabase+serverless@1.1.0/node_modules/@neondatabase/serverless/index.mjs
|
|
3698
3751
|
var So = Object.create;
|
|
3699
3752
|
var Ie = Object.defineProperty;
|
|
@@ -8597,6 +8650,8 @@ buffer/index.js:
|
|
|
8597
8650
|
* @license MIT
|
|
8598
8651
|
*)
|
|
8599
8652
|
*/
|
|
8653
|
+
// ../shared/src/db/lib/telemetry.ts
|
|
8654
|
+
var tierCache = new Map;
|
|
8600
8655
|
// src/client.ts
|
|
8601
8656
|
class SepiaApiError extends Error {
|
|
8602
8657
|
status;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sepia-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.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": {
|