@sirius-mcp/mcp 1.4.0 → 1.4.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/adapters/sqlite/ftsIndex.js +17 -17
- package/dist/server.d.ts +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +1 -0
- package/dist/server.js.map +1 -1
- package/package.json +67 -67
|
@@ -59,11 +59,11 @@ export class FtsIndexAdapter {
|
|
|
59
59
|
if (!safeQuery) {
|
|
60
60
|
return [];
|
|
61
61
|
}
|
|
62
|
-
const stmt = this.db.prepare(`SELECT id, type, status, title, path,
|
|
63
|
-
snippet(documents_fts, 4, '<<<', '>>>', '...', 32) as snippet
|
|
64
|
-
FROM documents_fts
|
|
65
|
-
WHERE documents_fts MATCH ?
|
|
66
|
-
ORDER BY rank
|
|
62
|
+
const stmt = this.db.prepare(`SELECT id, type, status, title, path,
|
|
63
|
+
snippet(documents_fts, 4, '<<<', '>>>', '...', 32) as snippet
|
|
64
|
+
FROM documents_fts
|
|
65
|
+
WHERE documents_fts MATCH ?
|
|
66
|
+
ORDER BY rank
|
|
67
67
|
LIMIT ?`);
|
|
68
68
|
let rows = stmt.all(safeQuery, limit);
|
|
69
69
|
if (rows.length === 0) {
|
|
@@ -88,14 +88,14 @@ export class FtsIndexAdapter {
|
|
|
88
88
|
}
|
|
89
89
|
rebuild(docs) {
|
|
90
90
|
this.ensureOpen();
|
|
91
|
-
const createFts = this.db.prepare(`CREATE VIRTUAL TABLE IF NOT EXISTS documents_fts USING fts5(
|
|
92
|
-
id UNINDEXED, type UNINDEXED, status UNINDEXED,
|
|
93
|
-
title, body, path UNINDEXED,
|
|
94
|
-
tokenize = 'porter unicode61'
|
|
91
|
+
const createFts = this.db.prepare(`CREATE VIRTUAL TABLE IF NOT EXISTS documents_fts USING fts5(
|
|
92
|
+
id UNINDEXED, type UNINDEXED, status UNINDEXED,
|
|
93
|
+
title, body, path UNINDEXED,
|
|
94
|
+
tokenize = 'porter unicode61'
|
|
95
95
|
)`);
|
|
96
96
|
const dropFts = this.db.prepare("DROP TABLE IF EXISTS documents_fts");
|
|
97
97
|
const insertStmt = this.db.prepare("INSERT INTO documents_fts (id, type, status, title, body, path) VALUES (?, ?, ?, ?, ?, ?)");
|
|
98
|
-
const setVersion = this.db.prepare(`INSERT INTO index_meta (key, value) VALUES ('schema_version', ?)
|
|
98
|
+
const setVersion = this.db.prepare(`INSERT INTO index_meta (key, value) VALUES ('schema_version', ?)
|
|
99
99
|
ON CONFLICT(key) DO UPDATE SET value = excluded.value`);
|
|
100
100
|
const transaction = this.db.transaction((documents) => {
|
|
101
101
|
dropFts.run();
|
|
@@ -110,14 +110,14 @@ export class FtsIndexAdapter {
|
|
|
110
110
|
this._needsRebuild = false;
|
|
111
111
|
}
|
|
112
112
|
initializeSchema() {
|
|
113
|
-
this.db.exec(`CREATE TABLE IF NOT EXISTS index_meta (
|
|
114
|
-
key TEXT PRIMARY KEY,
|
|
115
|
-
value TEXT NOT NULL
|
|
113
|
+
this.db.exec(`CREATE TABLE IF NOT EXISTS index_meta (
|
|
114
|
+
key TEXT PRIMARY KEY,
|
|
115
|
+
value TEXT NOT NULL
|
|
116
116
|
)`);
|
|
117
|
-
const createFts = this.db.prepare(`CREATE VIRTUAL TABLE IF NOT EXISTS documents_fts USING fts5(
|
|
118
|
-
id UNINDEXED, type UNINDEXED, status UNINDEXED,
|
|
119
|
-
title, body, path UNINDEXED,
|
|
120
|
-
tokenize = 'porter unicode61'
|
|
117
|
+
const createFts = this.db.prepare(`CREATE VIRTUAL TABLE IF NOT EXISTS documents_fts USING fts5(
|
|
118
|
+
id UNINDEXED, type UNINDEXED, status UNINDEXED,
|
|
119
|
+
title, body, path UNINDEXED,
|
|
120
|
+
tokenize = 'porter unicode61'
|
|
121
121
|
)`);
|
|
122
122
|
createFts.run();
|
|
123
123
|
const row = this.db
|
package/dist/server.d.ts
CHANGED
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AAaA,OAAO,EACL,GAAG,EASJ,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,GAAG,EAAE,CAAC"}
|
package/dist/server.js
CHANGED
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAuB,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAA2B,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EACL,GAAG,EACH,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,EACZ,oBAAoB,EACpB,SAAS,EACT,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,kB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AAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;QACxB,QAAQ,EAAE,CAAC;QACX,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE;QACzB,QAAQ,EAAE,CAAC;QACX,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;IAEH,KAAK,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC7C,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;IAC5B,GAAG,CAAC,UAAU,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@sirius-mcp/mcp",
|
|
3
|
-
"version": "1.4.
|
|
4
|
-
"description": "Sirius MCP server — project context memory",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/server.js",
|
|
7
|
-
"bin": {
|
|
8
|
-
"sirius-mcp": "dist/server.js"
|
|
9
|
-
},
|
|
10
|
-
"files": [
|
|
11
|
-
"dist",
|
|
12
|
-
"README.md",
|
|
13
|
-
"LICENSE",
|
|
14
|
-
"scripts/quality-gate/install-hooks.mjs"
|
|
15
|
-
],
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build:ui": "npm --prefix web run build",
|
|
18
|
-
"dev:ui": "npm --prefix web run dev",
|
|
19
|
-
"test:ui": "npm --prefix web run test",
|
|
20
|
-
"build": "npm run build:ui && tsc",
|
|
21
|
-
"start": "node dist/server.js",
|
|
22
|
-
"dev": "tsx src/server.ts",
|
|
23
|
-
"lint": "eslint .",
|
|
24
|
-
"test": "vitest run",
|
|
25
|
-
"test:unit": "vitest run src",
|
|
26
|
-
"test:integration": "vitest run tests",
|
|
27
|
-
"test:coverage": "vitest run --coverage",
|
|
28
|
-
"test:ci": "npm run build && vitest run --coverage",
|
|
29
|
-
"test:watch": "vitest",
|
|
30
|
-
"test:mutation": "stryker run",
|
|
31
|
-
"test:mutation:incremental": "stryker run --incremental",
|
|
32
|
-
"test:perf": "tsx scripts/quality-gate/perf.mjs",
|
|
33
|
-
"test:e2e": "npm run build && vitest run --config vitest.e2e.config.ts",
|
|
34
|
-
"gate:local": "node scripts/quality-gate/local.mjs",
|
|
35
|
-
"gate:heavy": "node scripts/quality-gate/heavy-pipeline.mjs",
|
|
36
|
-
"validate:mvp": "npm run build && node scripts/validate-mvp.mjs",
|
|
37
|
-
"postinstall": "node scripts/quality-gate/install-hooks.mjs"
|
|
38
|
-
},
|
|
39
|
-
"engines": {
|
|
40
|
-
"node": ">=22"
|
|
41
|
-
},
|
|
42
|
-
"keywords": [
|
|
43
|
-
"mcp",
|
|
44
|
-
"context",
|
|
45
|
-
"sirius"
|
|
46
|
-
],
|
|
47
|
-
"dependencies": {
|
|
48
|
-
"@modelcontextprotocol/sdk": "1.29.0",
|
|
49
|
-
"better-sqlite3": "^12.11.1",
|
|
50
|
-
"yaml": "^2.9.0",
|
|
51
|
-
"zod": "^3.24.0"
|
|
52
|
-
},
|
|
53
|
-
"devDependencies": {
|
|
54
|
-
"@eslint/js": "^10.0.1",
|
|
55
|
-
"@stryker-mutator/core": "^8.7.0",
|
|
56
|
-
"@stryker-mutator/vitest-runner": "^8.7.0",
|
|
57
|
-
"@types/better-sqlite3": "^7.6.13",
|
|
58
|
-
"@types/node": "^22.0.0",
|
|
59
|
-
"@vitest/coverage-v8": "^3.0.0",
|
|
60
|
-
"eslint": "^10.8.1",
|
|
61
|
-
"globals": "^17.11.0",
|
|
62
|
-
"tsx": "^4.0.0",
|
|
63
|
-
"typescript": "^5.7.0",
|
|
64
|
-
"typescript-eslint": "^8.67.0",
|
|
65
|
-
"vitest": "^3.0.0"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@sirius-mcp/mcp",
|
|
3
|
+
"version": "1.4.1",
|
|
4
|
+
"description": "Sirius MCP server — project context memory",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/server.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"sirius-mcp": "dist/server.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md",
|
|
13
|
+
"LICENSE",
|
|
14
|
+
"scripts/quality-gate/install-hooks.mjs"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build:ui": "npm --prefix web run build",
|
|
18
|
+
"dev:ui": "npm --prefix web run dev",
|
|
19
|
+
"test:ui": "npm --prefix web run test",
|
|
20
|
+
"build": "npm run build:ui && tsc",
|
|
21
|
+
"start": "node dist/server.js",
|
|
22
|
+
"dev": "tsx src/server.ts",
|
|
23
|
+
"lint": "eslint .",
|
|
24
|
+
"test": "vitest run",
|
|
25
|
+
"test:unit": "vitest run src",
|
|
26
|
+
"test:integration": "vitest run tests",
|
|
27
|
+
"test:coverage": "vitest run --coverage",
|
|
28
|
+
"test:ci": "npm run build && vitest run --coverage",
|
|
29
|
+
"test:watch": "vitest",
|
|
30
|
+
"test:mutation": "stryker run",
|
|
31
|
+
"test:mutation:incremental": "stryker run --incremental",
|
|
32
|
+
"test:perf": "tsx scripts/quality-gate/perf.mjs",
|
|
33
|
+
"test:e2e": "npm run build && vitest run --config vitest.e2e.config.ts",
|
|
34
|
+
"gate:local": "node scripts/quality-gate/local.mjs",
|
|
35
|
+
"gate:heavy": "node scripts/quality-gate/heavy-pipeline.mjs",
|
|
36
|
+
"validate:mvp": "npm run build && node scripts/validate-mvp.mjs",
|
|
37
|
+
"postinstall": "node scripts/quality-gate/install-hooks.mjs"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=22"
|
|
41
|
+
},
|
|
42
|
+
"keywords": [
|
|
43
|
+
"mcp",
|
|
44
|
+
"context",
|
|
45
|
+
"sirius"
|
|
46
|
+
],
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@modelcontextprotocol/sdk": "1.29.0",
|
|
49
|
+
"better-sqlite3": "^12.11.1",
|
|
50
|
+
"yaml": "^2.9.0",
|
|
51
|
+
"zod": "^3.24.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@eslint/js": "^10.0.1",
|
|
55
|
+
"@stryker-mutator/core": "^8.7.0",
|
|
56
|
+
"@stryker-mutator/vitest-runner": "^8.7.0",
|
|
57
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
58
|
+
"@types/node": "^22.0.0",
|
|
59
|
+
"@vitest/coverage-v8": "^3.0.0",
|
|
60
|
+
"eslint": "^10.8.1",
|
|
61
|
+
"globals": "^17.11.0",
|
|
62
|
+
"tsx": "^4.0.0",
|
|
63
|
+
"typescript": "^5.7.0",
|
|
64
|
+
"typescript-eslint": "^8.67.0",
|
|
65
|
+
"vitest": "^3.0.0"
|
|
66
|
+
}
|
|
67
|
+
}
|