@mmnto/mcp 0.31.0 → 0.32.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.
- package/dist/search-log.d.ts +33 -0
- package/dist/search-log.d.ts.map +1 -0
- package/dist/search-log.js +52 -0
- package/dist/search-log.js.map +1 -0
- package/dist/tools/search-knowledge.d.ts.map +1 -1
- package/dist/tools/search-knowledge.js +121 -17
- package/dist/tools/search-knowledge.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface SearchLogEntry {
|
|
2
|
+
timestamp: string;
|
|
3
|
+
query: string;
|
|
4
|
+
typeFilter?: string;
|
|
5
|
+
resultCount: number;
|
|
6
|
+
durationMs: number;
|
|
7
|
+
topScore: number | null;
|
|
8
|
+
error?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SearchStats {
|
|
11
|
+
totalCalls: number;
|
|
12
|
+
avgDuration: number;
|
|
13
|
+
avgTopScore: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Set the directory where the `.search-log.jsonl` file will be written.
|
|
17
|
+
* Must be called before the first `logSearch` to enable file logging.
|
|
18
|
+
*/
|
|
19
|
+
export declare function setLogDir(totemDir: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Record a search call.
|
|
22
|
+
*
|
|
23
|
+
* - Always appends to the in-memory array.
|
|
24
|
+
* - Best-effort appends a single JSON line to `{totemDir}/.search-log.jsonl`.
|
|
25
|
+
* File writes are fire-and-forget — failures are silently swallowed because
|
|
26
|
+
* writing to stdout/stderr would corrupt the MCP stdio transport.
|
|
27
|
+
*/
|
|
28
|
+
export declare function logSearch(entry: SearchLogEntry): void;
|
|
29
|
+
/**
|
|
30
|
+
* Compute aggregate stats from the in-memory search log.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getSearchStats(): SearchStats;
|
|
33
|
+
//# sourceMappingURL=search-log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-log.d.ts","sourceRoot":"","sources":["../src/search-log.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAQD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAgBrD;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAc5C"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
/** In-memory log of search calls for the current server session. */
|
|
4
|
+
const entries = [];
|
|
5
|
+
/** Resolved path to the JSONL log file, set on first logSearch call. */
|
|
6
|
+
let logFilePath;
|
|
7
|
+
/**
|
|
8
|
+
* Set the directory where the `.search-log.jsonl` file will be written.
|
|
9
|
+
* Must be called before the first `logSearch` to enable file logging.
|
|
10
|
+
*/
|
|
11
|
+
export function setLogDir(totemDir) {
|
|
12
|
+
logFilePath = path.join(totemDir, '.search-log.jsonl');
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Record a search call.
|
|
16
|
+
*
|
|
17
|
+
* - Always appends to the in-memory array.
|
|
18
|
+
* - Best-effort appends a single JSON line to `{totemDir}/.search-log.jsonl`.
|
|
19
|
+
* File writes are fire-and-forget — failures are silently swallowed because
|
|
20
|
+
* writing to stdout/stderr would corrupt the MCP stdio transport.
|
|
21
|
+
*/
|
|
22
|
+
export function logSearch(entry) {
|
|
23
|
+
entries.push(entry);
|
|
24
|
+
// Best-effort, non-blocking file append
|
|
25
|
+
if (logFilePath) {
|
|
26
|
+
try {
|
|
27
|
+
const line = JSON.stringify(entry) + '\n';
|
|
28
|
+
// fs.promises.appendFile returns a promise — we intentionally do NOT await it.
|
|
29
|
+
// The .catch() swallows any write error silently (no stdout/stderr writes).
|
|
30
|
+
fs.promises.appendFile(logFilePath, line, 'utf-8').catch(() => {
|
|
31
|
+
// Intentionally empty — must not write to stdout/stderr (MCP stdio transport)
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
// Intentionally empty — synchronous errors from JSON.stringify etc.
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Compute aggregate stats from the in-memory search log.
|
|
41
|
+
*/
|
|
42
|
+
export function getSearchStats() {
|
|
43
|
+
const totalCalls = entries.length;
|
|
44
|
+
if (totalCalls === 0) {
|
|
45
|
+
return { totalCalls: 0, avgDuration: 0, avgTopScore: 0 };
|
|
46
|
+
}
|
|
47
|
+
const avgDuration = entries.reduce((sum, e) => sum + e.durationMs, 0) / totalCalls;
|
|
48
|
+
const scored = entries.filter((e) => e.topScore !== null);
|
|
49
|
+
const avgTopScore = scored.length > 0 ? scored.reduce((sum, e) => sum + e.topScore, 0) / scored.length : 0;
|
|
50
|
+
return { totalCalls, avgDuration, avgTopScore };
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=search-log.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-log.js","sourceRoot":"","sources":["../src/search-log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAkBlC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AAC,CAAC;IAC1D,MAAM,WAAW,GACf,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,QAAS,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAE1F,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;AAClD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-knowledge.d.ts","sourceRoot":"","sources":["../../src/tools/search-knowledge.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"search-knowledge.d.ts","sourceRoot":"","sources":["../../src/tools/search-knowledge.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAgGzE,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAwH/D"}
|
|
@@ -1,7 +1,46 @@
|
|
|
1
|
+
import * as path from 'node:path';
|
|
1
2
|
import { z } from 'zod';
|
|
2
3
|
import { ContentTypeSchema } from '@mmnto/totem';
|
|
3
4
|
import { getContext, reconnectStore } from '../context.js';
|
|
5
|
+
import { logSearch, setLogDir } from '../search-log.js';
|
|
4
6
|
import { formatSystemWarning, formatXmlResponse } from '../xml-format.js';
|
|
7
|
+
/** Session-level flag — healthCheck runs only on the first search call. */
|
|
8
|
+
let firstHealthCheckDone = false;
|
|
9
|
+
/**
|
|
10
|
+
* Run a one-time health check on the LanceDB index and return any warnings.
|
|
11
|
+
* Returns null when healthy or after the first call (cached).
|
|
12
|
+
*/
|
|
13
|
+
async function runFirstQueryHealthCheck() {
|
|
14
|
+
if (firstHealthCheckDone)
|
|
15
|
+
return null;
|
|
16
|
+
firstHealthCheckDone = true;
|
|
17
|
+
try {
|
|
18
|
+
const { store } = await getContext();
|
|
19
|
+
const result = await store.healthCheck();
|
|
20
|
+
if (result.healthy)
|
|
21
|
+
return null;
|
|
22
|
+
// Build actionable warning lines
|
|
23
|
+
const lines = ['Index health issues detected:'];
|
|
24
|
+
for (const issue of result.issues) {
|
|
25
|
+
lines.push(`- ${issue}`);
|
|
26
|
+
}
|
|
27
|
+
lines.push('');
|
|
28
|
+
lines.push('Run `totem sync --rebuild` to re-index and fix these issues.');
|
|
29
|
+
return formatSystemWarning(lines.join('\n'));
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
// Health check itself failed — don't block the search. Log to disk for debugging.
|
|
33
|
+
logSearch({
|
|
34
|
+
timestamp: new Date().toISOString(),
|
|
35
|
+
query: 'internal:health-check',
|
|
36
|
+
resultCount: 0,
|
|
37
|
+
durationMs: 0,
|
|
38
|
+
topScore: null,
|
|
39
|
+
error: `Health check failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
40
|
+
});
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
5
44
|
async function performSearch(query, typeFilter, maxResults) {
|
|
6
45
|
const { store, config } = await getContext();
|
|
7
46
|
const results = await store.search({
|
|
@@ -51,28 +90,93 @@ export function registerSearchKnowledge(server) {
|
|
|
51
90
|
readOnlyHint: true,
|
|
52
91
|
},
|
|
53
92
|
}, async ({ query, type_filter, max_results }) => {
|
|
93
|
+
const start = Date.now();
|
|
54
94
|
try {
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
catch (originalErr) {
|
|
58
|
-
// Any LanceDB error could indicate a stale handle (e.g. files deleted
|
|
59
|
-
// during a full sync rebuild). Reconnect and retry once before failing.
|
|
95
|
+
// Initialize log directory on first call (lazy — avoids loading config at import time)
|
|
60
96
|
try {
|
|
61
|
-
await
|
|
62
|
-
|
|
97
|
+
const { projectRoot, config } = await getContext();
|
|
98
|
+
setLogDir(path.join(projectRoot, config.totemDir));
|
|
63
99
|
}
|
|
64
|
-
catch (
|
|
65
|
-
//
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
100
|
+
catch (err) {
|
|
101
|
+
// Non-fatal — logging just won't write to disk. Record the failure.
|
|
102
|
+
logSearch({
|
|
103
|
+
timestamp: new Date().toISOString(),
|
|
104
|
+
query: 'internal:set-log-dir',
|
|
105
|
+
resultCount: 0,
|
|
106
|
+
durationMs: 0,
|
|
107
|
+
topScore: null,
|
|
108
|
+
error: `Failed to set log dir: ${err instanceof Error ? err.message : String(err)}`,
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
// First-query health gate — runs once per session, non-blocking
|
|
112
|
+
const healthWarning = await runFirstQueryHealthCheck();
|
|
113
|
+
let result;
|
|
114
|
+
try {
|
|
115
|
+
result = await performSearch(query, type_filter, max_results);
|
|
116
|
+
}
|
|
117
|
+
catch (originalErr) {
|
|
118
|
+
// Any LanceDB error could indicate a stale handle (e.g. files deleted
|
|
119
|
+
// during a full sync rebuild). Reconnect and retry once before failing.
|
|
120
|
+
try {
|
|
121
|
+
await reconnectStore();
|
|
122
|
+
result = await performSearch(query, type_filter, max_results);
|
|
123
|
+
}
|
|
124
|
+
catch (retryErr) {
|
|
125
|
+
// Retry failed — report both errors for diagnostics
|
|
126
|
+
const originalMessage = originalErr instanceof Error ? originalErr.message : String(originalErr);
|
|
127
|
+
const retryMessage = retryErr instanceof Error ? retryErr.message : String(retryErr);
|
|
128
|
+
const errorText = originalMessage === retryMessage
|
|
129
|
+
? `[Totem Error] Search failed: ${originalMessage}`
|
|
130
|
+
: `[Totem Error] Search failed. Initial error: ${originalMessage}. Retry after reconnect also failed: ${retryMessage}`;
|
|
131
|
+
logSearch({
|
|
132
|
+
timestamp: new Date().toISOString(),
|
|
133
|
+
query,
|
|
134
|
+
typeFilter: type_filter,
|
|
135
|
+
resultCount: 0,
|
|
136
|
+
durationMs: Date.now() - start,
|
|
137
|
+
topScore: null,
|
|
138
|
+
error: errorText,
|
|
139
|
+
});
|
|
140
|
+
return {
|
|
141
|
+
content: [{ type: 'text', text: errorText }],
|
|
142
|
+
isError: true,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
// Extract result count and top score from the successful response
|
|
147
|
+
const resultText = result.content[0]?.text ?? '';
|
|
148
|
+
const scoreMatches = [...resultText.matchAll(/\*\*Score:\*\* ([\d.]+)/g)];
|
|
149
|
+
const topScore = scoreMatches.length > 0 ? parseFloat(scoreMatches[0][1]) : null;
|
|
150
|
+
logSearch({
|
|
151
|
+
timestamp: new Date().toISOString(),
|
|
152
|
+
query,
|
|
153
|
+
typeFilter: type_filter,
|
|
154
|
+
resultCount: scoreMatches.length,
|
|
155
|
+
durationMs: Date.now() - start,
|
|
156
|
+
topScore,
|
|
157
|
+
});
|
|
158
|
+
// Prepend health warning to the first search result if issues were found
|
|
159
|
+
if (healthWarning && result.content.length > 0) {
|
|
160
|
+
result.content[0] = {
|
|
161
|
+
type: 'text',
|
|
162
|
+
text: healthWarning + '\n\n' + result.content[0].text, // totem-ignore — healthWarning is system-generated, text is already XML-wrapped
|
|
74
163
|
};
|
|
75
164
|
}
|
|
165
|
+
return result;
|
|
166
|
+
}
|
|
167
|
+
catch (err) {
|
|
168
|
+
// Catch-all: log unexpected errors that bypass the inner try/catch
|
|
169
|
+
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
170
|
+
logSearch({
|
|
171
|
+
timestamp: new Date().toISOString(),
|
|
172
|
+
query,
|
|
173
|
+
typeFilter: type_filter,
|
|
174
|
+
resultCount: 0,
|
|
175
|
+
durationMs: Date.now() - start,
|
|
176
|
+
topScore: null,
|
|
177
|
+
error: errorMessage,
|
|
178
|
+
});
|
|
179
|
+
throw err;
|
|
76
180
|
}
|
|
77
181
|
});
|
|
78
182
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-knowledge.js","sourceRoot":"","sources":["../../src/tools/search-knowledge.ts"],"names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AC;YAED,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,mEAAmE;YACnE,MAAM,YAAY,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACtE,SAAS,CAAC;gBACR,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;gBACnC,KAAK;gBACL,UAAU,EAAE,WAAW;gBACvB,WAAW,EAAE,CAAC;gBACd,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;gBAC9B,QAAQ,EAAE,IAAI;gBACd,KAAK,EAAE,YAAY;aACpB,CAAC,CAAC;YACH,MAAM,GAAG,CAAC;QACZ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mmnto/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "MCP server for Totem — AI persistent memory and context layer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
19
19
|
"jiti": "^2.4.0",
|
|
20
20
|
"zod": "^3.24.0",
|
|
21
|
-
"@mmnto/totem": "0.
|
|
21
|
+
"@mmnto/totem": "0.32.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/node": "^22.0.0",
|