@noesis-brain/mcp-server 2.1.5 → 2.5.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/README.md +10 -1
- package/dist/agent/identity.d.ts +33 -0
- package/dist/agent/identity.d.ts.map +1 -0
- package/dist/agent/identity.js +61 -0
- package/dist/agent/identity.js.map +1 -0
- package/dist/agent/runner.d.ts +103 -6
- package/dist/agent/runner.d.ts.map +1 -1
- package/dist/agent/runner.js +375 -64
- package/dist/agent/runner.js.map +1 -1
- package/dist/agent/tokenState.d.ts +81 -0
- package/dist/agent/tokenState.d.ts.map +1 -0
- package/dist/agent/tokenState.js +173 -0
- package/dist/agent/tokenState.js.map +1 -0
- package/dist/agent/webGuard.d.ts +48 -0
- package/dist/agent/webGuard.d.ts.map +1 -0
- package/dist/agent/webGuard.js +173 -0
- package/dist/agent/webGuard.js.map +1 -0
- package/dist/api/NoesisClient.d.ts +19 -1
- package/dist/api/NoesisClient.d.ts.map +1 -1
- package/dist/api/NoesisClient.js +55 -3
- package/dist/api/NoesisClient.js.map +1 -1
- package/dist/cli/setup.js +1 -1
- package/dist/cli/setup.js.map +1 -1
- package/dist/machineLabel.d.ts +16 -0
- package/dist/machineLabel.d.ts.map +1 -0
- package/dist/machineLabel.js +43 -0
- package/dist/machineLabel.js.map +1 -0
- package/dist/tools/backlog.d.ts +21 -0
- package/dist/tools/backlog.d.ts.map +1 -1
- package/dist/tools/backlog.js +123 -1
- package/dist/tools/backlog.js.map +1 -1
- package/dist/tools/claudeSessions.d.ts +83 -0
- package/dist/tools/claudeSessions.d.ts.map +1 -0
- package/dist/tools/claudeSessions.js +330 -0
- package/dist/tools/claudeSessions.js.map +1 -0
- package/dist/tools/index.d.ts +1 -6
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +166 -37
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/sessionIndex.d.ts +66 -0
- package/dist/tools/sessionIndex.d.ts.map +1 -0
- package/dist/tools/sessionIndex.js +241 -0
- package/dist/tools/sessionIndex.js.map +1 -0
- package/package.json +1 -1
- package/scripts/noesis-capture-watcher.mjs +722 -107
- package/scripts/start-agent.sh +51 -12
- package/skill-templates/noesis-refine-relations.md +163 -0
- package/skill-templates/noesis-ticket.md +79 -0
- package/templates/claude-md-block.md +7 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type ClaudeSessionRef } from './claudeSessions.js';
|
|
2
|
+
export interface SessionIndexEntry {
|
|
3
|
+
file: string;
|
|
4
|
+
size: number;
|
|
5
|
+
mtimeMs: number;
|
|
6
|
+
cwd: string | null;
|
|
7
|
+
branch: string | null;
|
|
8
|
+
title: string | null;
|
|
9
|
+
lastActive: string | null;
|
|
10
|
+
paths: string[];
|
|
11
|
+
}
|
|
12
|
+
export interface SessionIndex {
|
|
13
|
+
version: number;
|
|
14
|
+
entries: Record<string, SessionIndexEntry>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Deliberately in the Claude config dir, NOT in a Noesis root — an index that synced itself to the
|
|
18
|
+
* cloud would be both useless there and a privacy leak (it lists local paths).
|
|
19
|
+
*/
|
|
20
|
+
export declare function indexPath(): string;
|
|
21
|
+
export declare function loadIndex(): SessionIndex;
|
|
22
|
+
export declare function saveIndex(index: SessionIndex): void;
|
|
23
|
+
/**
|
|
24
|
+
* Every real session transcript, and nothing else.
|
|
25
|
+
*
|
|
26
|
+
* Two filters, both load-bearing. Depth 1 skips the newer `<session-id>/subagents/` layout. The
|
|
27
|
+
* UUID test drops the ~1,500 legacy `agent-<hex>.jsonl` subagent files that sit as SIBLINGS of
|
|
28
|
+
* real sessions — the bug that makes the capture watcher's own scan mostly wasted work.
|
|
29
|
+
*/
|
|
30
|
+
export declare function listSessionTranscripts(): Array<{
|
|
31
|
+
sessionId: string;
|
|
32
|
+
file: string;
|
|
33
|
+
size: number;
|
|
34
|
+
mtimeMs: number;
|
|
35
|
+
}>;
|
|
36
|
+
export interface BuildResult {
|
|
37
|
+
index: SessionIndex;
|
|
38
|
+
scanned: number;
|
|
39
|
+
reused: number;
|
|
40
|
+
skippedOld: number;
|
|
41
|
+
total: number;
|
|
42
|
+
truncated: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Refresh the index incrementally. An entry is reused when BOTH size and mtime match, so the
|
|
46
|
+
* steady-state cost is only the transcripts appended to since the last run.
|
|
47
|
+
*/
|
|
48
|
+
export declare function buildIndex(opts?: {
|
|
49
|
+
since?: Date;
|
|
50
|
+
timeBudgetMs?: number;
|
|
51
|
+
}): Promise<BuildResult>;
|
|
52
|
+
export type MatchConfidence = 'absolute' | 'relative' | 'basename';
|
|
53
|
+
export interface SessionMatch extends ClaudeSessionRef {
|
|
54
|
+
confidence: MatchConfidence;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Find sessions that mention a note.
|
|
58
|
+
*
|
|
59
|
+
* Three tiers, strongest first. A basename-only hit is genuinely weak — two notes in different
|
|
60
|
+
* roots can share a filename — so it is reported as such rather than silently mixed in.
|
|
61
|
+
*/
|
|
62
|
+
export declare function matchSessions(index: SessionIndex, opts: {
|
|
63
|
+
absolutePath?: string;
|
|
64
|
+
relativePath?: string;
|
|
65
|
+
}): SessionMatch[];
|
|
66
|
+
//# sourceMappingURL=sessionIndex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionIndex.d.ts","sourceRoot":"","sources":["../../src/tools/sessionIndex.ts"],"names":[],"mappings":"AAeA,OAAO,EAA8C,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAkCxG,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,MAAM,GAAG,IA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CAAA;CAAE,GACrD,YAAY,EAAE,CAiChB"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recovering which Claude Code sessions touched a note that predates session stamping.
|
|
3
|
+
*
|
|
4
|
+
* Forward stamping (claudeSessions.ts) only helps notes synced from now on. This scans the
|
|
5
|
+
* transcript corpus for mentions of a note's path and reconstructs {id, cwd, last_active} for the
|
|
6
|
+
* sessions that worked on it — the same search that, done by hand, is what motivated the feature.
|
|
7
|
+
*
|
|
8
|
+
* Cost is the whole design problem here: the corpus on a working machine is ~470 MB across ~600
|
|
9
|
+
* session transcripts, with a single file reaching 30 MB. So: filter before opening, stream
|
|
10
|
+
* instead of reading whole files, cache by (size, mtime), and stop at a time budget.
|
|
11
|
+
*/
|
|
12
|
+
import * as fs from 'fs';
|
|
13
|
+
import * as os from 'os';
|
|
14
|
+
import * as path from 'path';
|
|
15
|
+
import * as readline from 'readline';
|
|
16
|
+
import { claudeConfigDir, projectsDir, normalizeCwd } from './claudeSessions.js';
|
|
17
|
+
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
18
|
+
/** Characters that cannot appear inside a path, used to find where one starts. */
|
|
19
|
+
const PATH_STOP = new Set(['"', "'", ' ', '\t', ',', '[', ']', '{', '}', '(', ')', '=', ';', '`', '*', '?', '<', '>', '|']);
|
|
20
|
+
/**
|
|
21
|
+
* Absolute Windows or POSIX .md paths mentioned on one line.
|
|
22
|
+
*
|
|
23
|
+
* Deliberately NOT a regex. Transcript lines routinely run to hundreds of KB (tool-result dumps),
|
|
24
|
+
* and a lazy-quantified pattern backtracks catastrophically on them — measured at ~8 s per
|
|
25
|
+
* transcript, which made a full index take over an hour. Scanning from each '.md' backwards to
|
|
26
|
+
* the first impossible character is linear with a tiny constant.
|
|
27
|
+
*/
|
|
28
|
+
function extractMdPaths(line, into, limit) {
|
|
29
|
+
let idx = line.indexOf('.md');
|
|
30
|
+
while (idx !== -1 && into.size < limit) {
|
|
31
|
+
let start = idx;
|
|
32
|
+
while (start > 0 && !PATH_STOP.has(line[start - 1]))
|
|
33
|
+
start--;
|
|
34
|
+
const cand = line.slice(start, idx + 3);
|
|
35
|
+
// Absolute only: a bare 'foo.md' says nothing about which note it is.
|
|
36
|
+
if (/^(?:[A-Za-z]:[\\/]|\/)/.test(cand)) {
|
|
37
|
+
into.add(normalizeCwd(cand.replace(/\\\\/g, '/')).toLowerCase());
|
|
38
|
+
}
|
|
39
|
+
idx = line.indexOf('.md', idx + 3);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/** A runaway note-heavy session should not blow up the index file. */
|
|
43
|
+
const MAX_PATHS_PER_SESSION = 200;
|
|
44
|
+
const INDEX_VERSION = 1;
|
|
45
|
+
/**
|
|
46
|
+
* Deliberately in the Claude config dir, NOT in a Noesis root — an index that synced itself to the
|
|
47
|
+
* cloud would be both useless there and a privacy leak (it lists local paths).
|
|
48
|
+
*/
|
|
49
|
+
export function indexPath() {
|
|
50
|
+
return path.join(claudeConfigDir(), '.noesis-session-index.json');
|
|
51
|
+
}
|
|
52
|
+
export function loadIndex() {
|
|
53
|
+
try {
|
|
54
|
+
const raw = JSON.parse(fs.readFileSync(indexPath(), 'utf-8'));
|
|
55
|
+
if (raw && raw.version === INDEX_VERSION && raw.entries)
|
|
56
|
+
return raw;
|
|
57
|
+
}
|
|
58
|
+
catch { /* absent or corrupt — rebuild from scratch */ }
|
|
59
|
+
return { version: INDEX_VERSION, entries: {} };
|
|
60
|
+
}
|
|
61
|
+
export function saveIndex(index) {
|
|
62
|
+
try {
|
|
63
|
+
fs.writeFileSync(indexPath(), JSON.stringify(index), 'utf-8');
|
|
64
|
+
}
|
|
65
|
+
catch { /* an unwritable index costs a rescan, nothing more */ }
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Every real session transcript, and nothing else.
|
|
69
|
+
*
|
|
70
|
+
* Two filters, both load-bearing. Depth 1 skips the newer `<session-id>/subagents/` layout. The
|
|
71
|
+
* UUID test drops the ~1,500 legacy `agent-<hex>.jsonl` subagent files that sit as SIBLINGS of
|
|
72
|
+
* real sessions — the bug that makes the capture watcher's own scan mostly wasted work.
|
|
73
|
+
*/
|
|
74
|
+
export function listSessionTranscripts() {
|
|
75
|
+
const out = [];
|
|
76
|
+
let dirs;
|
|
77
|
+
try {
|
|
78
|
+
dirs = fs.readdirSync(projectsDir(), { withFileTypes: true });
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
return out;
|
|
82
|
+
}
|
|
83
|
+
for (const d of dirs) {
|
|
84
|
+
if (!d.isDirectory())
|
|
85
|
+
continue;
|
|
86
|
+
const dir = path.join(projectsDir(), d.name);
|
|
87
|
+
let files;
|
|
88
|
+
try {
|
|
89
|
+
files = fs.readdirSync(dir, { withFileTypes: true });
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
for (const f of files) {
|
|
95
|
+
if (!f.isFile() || !f.name.endsWith('.jsonl'))
|
|
96
|
+
continue;
|
|
97
|
+
const sessionId = f.name.slice(0, -6);
|
|
98
|
+
if (!UUID_RE.test(sessionId))
|
|
99
|
+
continue;
|
|
100
|
+
const file = path.join(dir, f.name);
|
|
101
|
+
try {
|
|
102
|
+
const st = fs.statSync(file);
|
|
103
|
+
out.push({ sessionId, file, size: st.size, mtimeMs: st.mtimeMs });
|
|
104
|
+
}
|
|
105
|
+
catch { /* vanished mid-scan */ }
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return out;
|
|
109
|
+
}
|
|
110
|
+
async function scanTranscript(file) {
|
|
111
|
+
const paths = new Set();
|
|
112
|
+
let cwd = null;
|
|
113
|
+
let branch = null;
|
|
114
|
+
let title = null;
|
|
115
|
+
let lastActive = null;
|
|
116
|
+
const rl = readline.createInterface({
|
|
117
|
+
input: fs.createReadStream(file, { encoding: 'utf-8' }),
|
|
118
|
+
crlfDelay: Infinity,
|
|
119
|
+
});
|
|
120
|
+
for await (const line of rl) {
|
|
121
|
+
if (!line.startsWith('{'))
|
|
122
|
+
continue;
|
|
123
|
+
// Cheap first: this runs on the raw line, so a session that never mentions a .md file costs
|
|
124
|
+
// no JSON parsing at all beyond the metadata sniff below.
|
|
125
|
+
if (paths.size < MAX_PATHS_PER_SESSION) {
|
|
126
|
+
extractMdPaths(line, paths, MAX_PATHS_PER_SESSION);
|
|
127
|
+
}
|
|
128
|
+
// Metadata only needs a handful of fields; parse only lines that plausibly carry them.
|
|
129
|
+
if (cwd === null && line.includes('"cwd"')) {
|
|
130
|
+
try {
|
|
131
|
+
const e = JSON.parse(line);
|
|
132
|
+
if (typeof e.cwd === 'string' && e.cwd)
|
|
133
|
+
cwd = e.cwd;
|
|
134
|
+
if (branch === null && typeof e.gitBranch === 'string')
|
|
135
|
+
branch = e.gitBranch;
|
|
136
|
+
}
|
|
137
|
+
catch { /* truncated line */ }
|
|
138
|
+
}
|
|
139
|
+
if (line.includes('"timestamp"')) {
|
|
140
|
+
const m = /"timestamp":"([^"]+)"/.exec(line);
|
|
141
|
+
if (m && (lastActive === null || m[1] > lastActive))
|
|
142
|
+
lastActive = m[1];
|
|
143
|
+
}
|
|
144
|
+
if (line.includes('"ai-title"')) {
|
|
145
|
+
const m = /"aiTitle":"((?:[^"\\]|\\.)*)"/.exec(line);
|
|
146
|
+
if (m) {
|
|
147
|
+
try {
|
|
148
|
+
title = JSON.parse(`"${m[1]}"`);
|
|
149
|
+
}
|
|
150
|
+
catch { /* keep previous */ }
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
rl.close();
|
|
155
|
+
return { cwd, branch, title, lastActive, paths: [...paths] };
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Refresh the index incrementally. An entry is reused when BOTH size and mtime match, so the
|
|
159
|
+
* steady-state cost is only the transcripts appended to since the last run.
|
|
160
|
+
*/
|
|
161
|
+
export async function buildIndex(opts = {}) {
|
|
162
|
+
const started = Date.now();
|
|
163
|
+
const budget = opts.timeBudgetMs ?? 20_000;
|
|
164
|
+
const sinceMs = opts.since ? opts.since.getTime() : 0;
|
|
165
|
+
const index = loadIndex();
|
|
166
|
+
const transcripts = listSessionTranscripts();
|
|
167
|
+
// Newest first: if the budget runs out, the sessions most likely to be relevant are already in.
|
|
168
|
+
transcripts.sort((a, b) => b.mtimeMs - a.mtimeMs);
|
|
169
|
+
let scanned = 0, reused = 0, skippedOld = 0, truncated = false;
|
|
170
|
+
for (const t of transcripts) {
|
|
171
|
+
if (t.mtimeMs < sinceMs) {
|
|
172
|
+
skippedOld++;
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
const prev = index.entries[t.sessionId];
|
|
176
|
+
if (prev && prev.size === t.size && prev.mtimeMs === t.mtimeMs) {
|
|
177
|
+
reused++;
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
if (Date.now() - started > budget) {
|
|
181
|
+
truncated = true;
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
try {
|
|
185
|
+
const meta = await scanTranscript(t.file);
|
|
186
|
+
index.entries[t.sessionId] = { file: t.file, size: t.size, mtimeMs: t.mtimeMs, ...meta };
|
|
187
|
+
scanned++;
|
|
188
|
+
}
|
|
189
|
+
catch { /* unreadable transcript — skip it, do not abort the run */ }
|
|
190
|
+
}
|
|
191
|
+
// Saved even on a truncated run, so re-running resumes instead of starting over.
|
|
192
|
+
saveIndex(index);
|
|
193
|
+
return { index, scanned, reused, skippedOld, total: transcripts.length, truncated };
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Find sessions that mention a note.
|
|
197
|
+
*
|
|
198
|
+
* Three tiers, strongest first. A basename-only hit is genuinely weak — two notes in different
|
|
199
|
+
* roots can share a filename — so it is reported as such rather than silently mixed in.
|
|
200
|
+
*/
|
|
201
|
+
export function matchSessions(index, opts) {
|
|
202
|
+
const abs = opts.absolutePath ? normalizeCwd(opts.absolutePath).toLowerCase() : null;
|
|
203
|
+
const rel = opts.relativePath ? normalizeCwd(opts.relativePath).toLowerCase() : null;
|
|
204
|
+
const base = (abs || rel || '').split('/').pop() || '';
|
|
205
|
+
if (!abs && !rel)
|
|
206
|
+
return [];
|
|
207
|
+
const out = [];
|
|
208
|
+
for (const [sessionId, e] of Object.entries(index.entries)) {
|
|
209
|
+
let confidence = null;
|
|
210
|
+
for (const p of e.paths) {
|
|
211
|
+
if (abs && p === abs) {
|
|
212
|
+
confidence = 'absolute';
|
|
213
|
+
break;
|
|
214
|
+
}
|
|
215
|
+
if (rel && p.endsWith('/' + rel)) {
|
|
216
|
+
confidence = confidence === null ? 'relative' : confidence;
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
if (base && confidence === null && p.endsWith('/' + base))
|
|
220
|
+
confidence = 'basename';
|
|
221
|
+
}
|
|
222
|
+
if (!confidence)
|
|
223
|
+
continue;
|
|
224
|
+
out.push({
|
|
225
|
+
id: sessionId,
|
|
226
|
+
cwd: normalizeCwd(e.cwd || ''),
|
|
227
|
+
last_active: e.lastActive || new Date(e.mtimeMs).toISOString(),
|
|
228
|
+
// The index only ever scans THIS machine's ~/.claude/projects, so anything it finds is
|
|
229
|
+
// resumable here by construction.
|
|
230
|
+
machine_name: os.hostname(),
|
|
231
|
+
...(e.title ? { title: e.title } : {}),
|
|
232
|
+
...(e.branch ? { branch: e.branch } : {}),
|
|
233
|
+
confidence,
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
const rank = { absolute: 0, relative: 1, basename: 2 };
|
|
237
|
+
return out.sort((a, b) => rank[a.confidence] !== rank[b.confidence]
|
|
238
|
+
? rank[a.confidence] - rank[b.confidence]
|
|
239
|
+
: (a.last_active < b.last_active ? 1 : -1));
|
|
240
|
+
}
|
|
241
|
+
//# sourceMappingURL=sessionIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionIndex.js","sourceRoot":"","s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C,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noesis-brain/mcp-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Official MCP server for Noesis — the markdown notes manager for Claude Code. Search, sync, and manage your .md knowledge base via 19 AI-powered tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|