claude-code-infinite 1.0.32 → 1.0.34
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 +34 -11
- package/dist/cli-args.d.ts +7 -0
- package/dist/cli-args.d.ts.map +1 -1
- package/dist/cli-args.js +19 -0
- package/dist/cli-args.js.map +1 -1
- package/dist/cli-main.js +28 -10
- package/dist/cli-main.js.map +1 -1
- package/dist/count-tokens.d.ts +7 -3
- package/dist/count-tokens.d.ts.map +1 -1
- package/dist/count-tokens.js +6 -2
- package/dist/count-tokens.js.map +1 -1
- package/dist/hooks.d.ts +21 -1
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +36 -6
- package/dist/hooks.js.map +1 -1
- package/dist/host-session.d.ts +12 -0
- package/dist/host-session.d.ts.map +1 -0
- package/dist/host-session.js +12 -0
- package/dist/host-session.js.map +1 -0
- package/dist/image-refs.d.ts +24 -2
- package/dist/image-refs.d.ts.map +1 -1
- package/dist/image-refs.js +67 -20
- package/dist/image-refs.js.map +1 -1
- package/dist/index-wait-413.d.ts +26 -0
- package/dist/index-wait-413.d.ts.map +1 -0
- package/dist/index-wait-413.js +113 -0
- package/dist/index-wait-413.js.map +1 -0
- package/dist/memtree-finder.d.ts +70 -6
- package/dist/memtree-finder.d.ts.map +1 -1
- package/dist/memtree-finder.js +150 -20
- package/dist/memtree-finder.js.map +1 -1
- package/dist/memtree-handover.d.ts +13 -0
- package/dist/memtree-handover.d.ts.map +1 -0
- package/dist/memtree-handover.js +231 -0
- package/dist/memtree-handover.js.map +1 -0
- package/dist/memtree-mcp-config.d.ts +2 -2
- package/dist/memtree-mcp-config.d.ts.map +1 -1
- package/dist/memtree-mcp-config.js +8 -5
- package/dist/memtree-mcp-config.js.map +1 -1
- package/dist/memtree-mcp.d.ts +182 -2
- package/dist/memtree-mcp.d.ts.map +1 -1
- package/dist/memtree-mcp.js +357 -38
- package/dist/memtree-mcp.js.map +1 -1
- package/dist/memtree-newest.d.ts +21 -3
- package/dist/memtree-newest.d.ts.map +1 -1
- package/dist/memtree-newest.js +43 -11
- package/dist/memtree-newest.js.map +1 -1
- package/dist/memtree-times.d.ts +33 -0
- package/dist/memtree-times.d.ts.map +1 -1
- package/dist/memtree-times.js +77 -0
- package/dist/memtree-times.js.map +1 -1
- package/dist/memtree-tools.d.ts +19 -5
- package/dist/memtree-tools.d.ts.map +1 -1
- package/dist/memtree-tools.js +97 -23
- package/dist/memtree-tools.js.map +1 -1
- package/dist/memtree.d.ts +109 -3
- package/dist/memtree.d.ts.map +1 -1
- package/dist/memtree.js +382 -21
- package/dist/memtree.js.map +1 -1
- package/dist/network-failure.d.ts +28 -0
- package/dist/network-failure.d.ts.map +1 -0
- package/dist/network-failure.js +67 -0
- package/dist/network-failure.js.map +1 -0
- package/dist/open-url.d.ts +49 -0
- package/dist/open-url.d.ts.map +1 -0
- package/dist/open-url.js +100 -0
- package/dist/open-url.js.map +1 -0
- package/dist/prefix-store.d.ts +4 -0
- package/dist/prefix-store.d.ts.map +1 -1
- package/dist/prefix-store.js +8 -4
- package/dist/prefix-store.js.map +1 -1
- package/dist/project-trees.d.ts +15 -7
- package/dist/project-trees.d.ts.map +1 -1
- package/dist/project-trees.js +20 -9
- package/dist/project-trees.js.map +1 -1
- package/dist/proxy.d.ts +125 -1
- package/dist/proxy.d.ts.map +1 -1
- package/dist/proxy.js +838 -74
- package/dist/proxy.js.map +1 -1
- package/dist/reqlog.d.ts +34 -0
- package/dist/reqlog.d.ts.map +1 -1
- package/dist/reqlog.js.map +1 -1
- package/dist/resume-guidance.d.ts +9 -3
- package/dist/resume-guidance.d.ts.map +1 -1
- package/dist/resume-guidance.js +9 -3
- package/dist/resume-guidance.js.map +1 -1
- package/dist/route-fallback.d.ts +77 -11
- package/dist/route-fallback.d.ts.map +1 -1
- package/dist/route-fallback.js +157 -33
- package/dist/route-fallback.js.map +1 -1
- package/dist/route-identity.d.ts +6 -2
- package/dist/route-identity.d.ts.map +1 -1
- package/dist/route-identity.js +209 -16
- package/dist/route-identity.js.map +1 -1
- package/dist/subagent-hint.d.ts +28 -0
- package/dist/subagent-hint.d.ts.map +1 -1
- package/dist/subagent-hint.js +37 -0
- package/dist/subagent-hint.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `user_messages` and `handover` tools: the person's own messages over a time
|
|
3
|
+
* range, and a handover pack (their recent messages, how the session ended, and a
|
|
4
|
+
* model's reading of their goals, instructions, decisions and open questions).
|
|
5
|
+
*
|
|
6
|
+
* The server builds both (polychat `routes/memtree_handover.py`); this module turns its
|
|
7
|
+
* JSON into the tool's text and its arguments into the query string. Why: a new agent
|
|
8
|
+
* taking over a long session needs what the person asked for, decided and corrected, and
|
|
9
|
+
* the tree mixes those with every tool result (polychat
|
|
10
|
+
* reports/2026-11-08_memtree_orchestrator_handover.md).
|
|
11
|
+
*/
|
|
12
|
+
import { formatTime } from "./memtree-times.js";
|
|
13
|
+
import { ToolInputError } from "./memtree-tools.js";
|
|
14
|
+
/** Days of messages a pack covers by default, and at most (the server's bounds). */
|
|
15
|
+
export const HANDOVER_DEFAULT_DAYS = 3;
|
|
16
|
+
export const HANDOVER_MAX_DAYS = 60;
|
|
17
|
+
export const USER_MESSAGES_MAX_LIMIT = 200;
|
|
18
|
+
/** `user_messages` arguments as the server's query string; throws on bad input. */
|
|
19
|
+
export function userMessagesQuery(args) {
|
|
20
|
+
const params = new URLSearchParams();
|
|
21
|
+
for (const key of ["since", "until", "cursor"])
|
|
22
|
+
setString("user_messages", params, args, key, key);
|
|
23
|
+
setString("user_messages", params, args, "query", "q");
|
|
24
|
+
if (args.limit !== undefined && args.limit !== null) {
|
|
25
|
+
const limit = integer(args.limit);
|
|
26
|
+
if (limit === undefined || limit < 1) {
|
|
27
|
+
throw new ToolInputError(`user_messages: limit must be 1 to ${USER_MESSAGES_MAX_LIMIT}`);
|
|
28
|
+
}
|
|
29
|
+
params.set("limit", String(Math.min(limit, USER_MESSAGES_MAX_LIMIT)));
|
|
30
|
+
}
|
|
31
|
+
for (const flag of ["full", "context"]) {
|
|
32
|
+
if (args[flag] === undefined || args[flag] === null)
|
|
33
|
+
continue;
|
|
34
|
+
if (typeof args[flag] !== "boolean")
|
|
35
|
+
throw new ToolInputError(`user_messages: ${flag} must be true or false`);
|
|
36
|
+
if (args[flag])
|
|
37
|
+
params.set(flag, "true");
|
|
38
|
+
}
|
|
39
|
+
return params;
|
|
40
|
+
}
|
|
41
|
+
/** `handover` arguments as the server's query string; throws on bad input. */
|
|
42
|
+
export function handoverQuery(args) {
|
|
43
|
+
const params = new URLSearchParams();
|
|
44
|
+
setString("handover", params, args, "since", "since");
|
|
45
|
+
setString("handover", params, args, "until", "until");
|
|
46
|
+
if (args.days !== undefined && args.days !== null) {
|
|
47
|
+
const days = integer(args.days);
|
|
48
|
+
if (days === undefined || days < 1 || days > HANDOVER_MAX_DAYS) {
|
|
49
|
+
throw new ToolInputError(`handover: days must be 1 to ${HANDOVER_MAX_DAYS}`);
|
|
50
|
+
}
|
|
51
|
+
params.set("days", String(days));
|
|
52
|
+
}
|
|
53
|
+
return params;
|
|
54
|
+
}
|
|
55
|
+
/** The user_messages answer as text. */
|
|
56
|
+
export function formatUserMessages(body, args, tree) {
|
|
57
|
+
const page = (body ?? {});
|
|
58
|
+
const messages = Array.isArray(page.messages) ? page.messages : [];
|
|
59
|
+
const where = windowText(page.window);
|
|
60
|
+
if (!messages.length) {
|
|
61
|
+
const none = `No messages from the person${where}${args.query ? ` with ${JSON.stringify(args.query)}` : ""}.`;
|
|
62
|
+
const notes = pageNotes(page, args);
|
|
63
|
+
return notes.length ? `${none}\n[${notes.join("; ")}]` : none;
|
|
64
|
+
}
|
|
65
|
+
const out = [
|
|
66
|
+
`The person's own messages${where}: ${messages.length} of ${page.total ?? messages.length}, oldest first ` +
|
|
67
|
+
"(typed, commands, words sent mid-turn, board messages; tool results and other agents' messages left out).",
|
|
68
|
+
];
|
|
69
|
+
for (const m of messages)
|
|
70
|
+
out.push("", ...messageLines(m));
|
|
71
|
+
out.push("", ...footer(page, args, tree));
|
|
72
|
+
return out.join("\n");
|
|
73
|
+
}
|
|
74
|
+
/** The handover pack as text: how it ended, the model's lists, then the messages. */
|
|
75
|
+
export function formatHandover(body, tree) {
|
|
76
|
+
const pack = (body ?? {});
|
|
77
|
+
const out = [
|
|
78
|
+
`Handover pack${tree ? ` for ${tree}` : " for this session"}${windowText(pack.window)}.`,
|
|
79
|
+
];
|
|
80
|
+
out.push(...endingLines(pack.ending));
|
|
81
|
+
if (pack.llm === "ok") {
|
|
82
|
+
out.push("", "Goals, instructions, decisions and open questions below are a model's reading of the " +
|
|
83
|
+
"person's messages: check one against the messages it cites (n) before acting on it.");
|
|
84
|
+
out.push(...listLines("Goals", pack.goals, (i) => i.text));
|
|
85
|
+
out.push(...listLines("Standing instructions", pack.instructions, (i) => i.text));
|
|
86
|
+
out.push(...listLines("Decisions (newest first)", pack.decisions, (i) => `${i.decision}${i.reason ? ` (why: ${i.reason})` : ""}`));
|
|
87
|
+
out.push(...listLines("Open questions", pack.open_questions, (i) => `${i.question}${i.context ? ` (${i.context})` : ""}`));
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
out.push("", `(No model summary this time: ${llmNote(pack.llm)}. The messages below are the person's own words.)`);
|
|
91
|
+
}
|
|
92
|
+
const messages = Array.isArray(pack.messages) ? pack.messages : [];
|
|
93
|
+
out.push("", `The person's messages in the window (${messages.length} of ${pack.messages_total ?? messages.length}, ` +
|
|
94
|
+
"oldest first; each with the agent's words it answered):");
|
|
95
|
+
for (const m of messages)
|
|
96
|
+
out.push("", ...messageLines(m));
|
|
97
|
+
const cursor = pack.messages_cursor;
|
|
98
|
+
if (typeof cursor === "string" && cursor) {
|
|
99
|
+
out.push("", `[older messages in the window: user_messages {${treeArg(tree)}"cursor": ${JSON.stringify(cursor)}${sinceArg(pack.window)}, "context": true}]`);
|
|
100
|
+
}
|
|
101
|
+
out.push("", readHint(tree));
|
|
102
|
+
const newest = pack.newest?.note;
|
|
103
|
+
if (newest)
|
|
104
|
+
out.push(`(${newest})`);
|
|
105
|
+
return out.join("\n");
|
|
106
|
+
}
|
|
107
|
+
// --- helpers -----------------------------------------------------------------
|
|
108
|
+
function setString(tool, params, args, key, param) {
|
|
109
|
+
const value = args[key];
|
|
110
|
+
if (value === undefined || value === null)
|
|
111
|
+
return;
|
|
112
|
+
if (typeof value !== "string")
|
|
113
|
+
throw new ToolInputError(`${tool}: ${key} must be a string`);
|
|
114
|
+
if (value.trim())
|
|
115
|
+
params.set(param, value.trim());
|
|
116
|
+
}
|
|
117
|
+
/** An integer given as a number or a numeric string; undefined for anything else. */
|
|
118
|
+
function integer(value) {
|
|
119
|
+
if (typeof value === "number")
|
|
120
|
+
return Number.isInteger(value) ? value : undefined;
|
|
121
|
+
if (typeof value === "string" && /^\s*-?\d+\s*$/.test(value))
|
|
122
|
+
return Number(value);
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
function messageLines(m) {
|
|
126
|
+
const at = m.at ? formatTime(m.at) ?? m.at : m.approx ? `~${formatTime(m.approx[0]) ?? m.approx[0]}` : "time unknown";
|
|
127
|
+
const board = m.board?.title ? ` (${m.board.title})` : "";
|
|
128
|
+
const cut = m.shortened ? ` · shortened from ${m.chars ?? "?"} chars` : "";
|
|
129
|
+
const head = `[n ${m.n} · ${at} · ${m.kind ?? "typed"}${board} · ${readRef(m.read)}${cut}]`;
|
|
130
|
+
const lines = [head];
|
|
131
|
+
if (m.reply_to)
|
|
132
|
+
lines.push(`↳ answering: ${m.reply_to.replace(/\s+/g, " ").trim()}`);
|
|
133
|
+
lines.push(m.text ?? "");
|
|
134
|
+
return lines;
|
|
135
|
+
}
|
|
136
|
+
function readRef(read) {
|
|
137
|
+
if (!read)
|
|
138
|
+
return "?";
|
|
139
|
+
if (typeof read.tail === "number")
|
|
140
|
+
return `tail ${read.tail}`;
|
|
141
|
+
const more = read.continues ? ` + block ${read.continues.block} lines ${read.continues.start}-${read.continues.end}` : "";
|
|
142
|
+
return `block ${read.block} lines ${read.start}-${read.end}${more}`;
|
|
143
|
+
}
|
|
144
|
+
function footer(page, args, tree) {
|
|
145
|
+
const notes = [];
|
|
146
|
+
if (page.next_cursor) {
|
|
147
|
+
const rest = ["since", "until", "query", "limit", "full", "context"]
|
|
148
|
+
.filter((k) => args[k] !== undefined && args[k] !== null && args[k] !== "" && args[k] !== false)
|
|
149
|
+
.map((k) => `, ${JSON.stringify(k)}: ${JSON.stringify(args[k])}`).join("");
|
|
150
|
+
notes.push(`older: user_messages {${treeArg(tree)}"cursor": ${JSON.stringify(page.next_cursor)}${rest}}`);
|
|
151
|
+
}
|
|
152
|
+
notes.push(...pageNotes(page, args));
|
|
153
|
+
const out = notes.length ? [`[${notes.join("; ")}]`] : [];
|
|
154
|
+
out.push(readHint(tree));
|
|
155
|
+
return out;
|
|
156
|
+
}
|
|
157
|
+
function pageNotes(page, _args) {
|
|
158
|
+
const notes = [];
|
|
159
|
+
if (page.untimed)
|
|
160
|
+
notes.push(`${page.untimed} older message(s) have no recorded time and are only listed without since/until`);
|
|
161
|
+
if (page.newest?.note)
|
|
162
|
+
notes.push(page.newest.note);
|
|
163
|
+
return notes;
|
|
164
|
+
}
|
|
165
|
+
function readHint(tree) {
|
|
166
|
+
return `Context of one message: read_lines {${treeArg(tree)}"block": B, "start": S, "end": E} for "block B lines S-E", ` +
|
|
167
|
+
`read_lines {${treeArg(tree)}"tail": true, "start": N, "end": N} for "tail N".`;
|
|
168
|
+
}
|
|
169
|
+
function endingLines(ending) {
|
|
170
|
+
if (!ending || typeof ending !== "object" || !Object.keys(ending).length)
|
|
171
|
+
return [];
|
|
172
|
+
const at = typeof ending.at === "string" ? ` (newest message ${formatTime(ending.at) ?? ending.at})` : "";
|
|
173
|
+
const out = ["", `How it ended${at}:`];
|
|
174
|
+
if (typeof ending.summary === "string")
|
|
175
|
+
out.push(ending.summary);
|
|
176
|
+
const last = ending.last_message;
|
|
177
|
+
if (last?.text) {
|
|
178
|
+
const when = last.at ? ` at ${formatTime(last.at) ?? last.at}` : "";
|
|
179
|
+
out.push(`The person's last message (n ${last.n}${when}): ${last.text}`);
|
|
180
|
+
}
|
|
181
|
+
if (Array.isArray(ending.tools_after) && ending.tools_after.length) {
|
|
182
|
+
out.push(`Then the agent ran: ${countRuns(ending.tools_after)}`);
|
|
183
|
+
}
|
|
184
|
+
if (typeof ending.last_words === "string")
|
|
185
|
+
out.push(`The agent's last words: ${ending.last_words}`);
|
|
186
|
+
return out;
|
|
187
|
+
}
|
|
188
|
+
function countRuns(tools) {
|
|
189
|
+
const runs = [];
|
|
190
|
+
for (let i = 0; i < tools.length;) {
|
|
191
|
+
let j = i;
|
|
192
|
+
while (j < tools.length && tools[j] === tools[i])
|
|
193
|
+
j++;
|
|
194
|
+
runs.push(j - i > 1 ? `${tools[i]} ×${j - i}` : tools[i]);
|
|
195
|
+
i = j;
|
|
196
|
+
}
|
|
197
|
+
return runs.join(", ");
|
|
198
|
+
}
|
|
199
|
+
function listLines(title, raw, text) {
|
|
200
|
+
const items = Array.isArray(raw) ? raw : [];
|
|
201
|
+
if (!items.length)
|
|
202
|
+
return ["", `${title}: none found.`];
|
|
203
|
+
const out = ["", `${title}:`];
|
|
204
|
+
for (const item of items) {
|
|
205
|
+
const refs = Array.isArray(item.refs) && item.refs.length ? ` (n ${item.refs.join(", ")})` : "";
|
|
206
|
+
out.push(`- ${text(item) ?? ""}${refs}`);
|
|
207
|
+
}
|
|
208
|
+
return out;
|
|
209
|
+
}
|
|
210
|
+
function llmNote(status) {
|
|
211
|
+
switch (status) {
|
|
212
|
+
case "off": return "the summary is switched off on this server";
|
|
213
|
+
case "rate_limited": return "too many packs this hour; try again later";
|
|
214
|
+
default: return "the summary model failed; try again in a minute";
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
function windowText(window) {
|
|
218
|
+
if (!window || (!window.since && !window.until))
|
|
219
|
+
return "";
|
|
220
|
+
const from = window.since ? formatTime(window.since) ?? window.since : "the start";
|
|
221
|
+
const to = window.until ? formatTime(window.until) ?? window.until : "now";
|
|
222
|
+
return ` from ${from} to ${to}`;
|
|
223
|
+
}
|
|
224
|
+
function sinceArg(window) {
|
|
225
|
+
const w = window;
|
|
226
|
+
return [w?.since ? `, "since": ${JSON.stringify(w.since)}` : "", w?.until ? `, "until": ${JSON.stringify(w.until)}` : ""].join("");
|
|
227
|
+
}
|
|
228
|
+
function treeArg(tree) {
|
|
229
|
+
return tree ? `"tree": ${JSON.stringify(tree)}, ` : "";
|
|
230
|
+
}
|
|
231
|
+
//# sourceMappingURL=memtree-handover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memtree-handover.js","sourceRoot":"","sources":["../src/memtree-handover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,oFAAoF;AACpF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AACvC,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC;AACpC,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AA2B3C,mFAAmF;AACnF,MAAM,UAAU,iBAAiB,CAAC,IAA6B;IAC7D,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;IACrC,KAAK,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAU;QAAE,SAAS,CAAC,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAC5G,SAAS,CAAC,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;IACvD,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,KAAK,IA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AE,CAAC;IAC3D,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC;IACnF,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IAC3E,OAAO,SAAS,IAAI,OAAO,EAAE,EAAE,CAAC;AAClC,CAAC;AAED,SAAS,QAAQ,CAAC,MAAe;IAC/B,MAAM,CAAC,GAAG,MAAsE,CAAC;IACjF,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACrI,CAAC;AAED,SAAS,OAAO,CAAC,IAAa;IAC5B,OAAO,IAAI,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AACzD,CAAC"}
|
|
@@ -5,12 +5,12 @@ export declare const MEMTREE_ALLOWED_TOOLS: string[];
|
|
|
5
5
|
export declare const MEMTREE_MCP_SCRIPT: string;
|
|
6
6
|
export declare function memtreeMcpEnabledByEnv(env: NodeJS.ProcessEnv): boolean;
|
|
7
7
|
/** The `--mcp-config` JSON for this ccc's server, bound to its proxy. */
|
|
8
|
-
export declare function memtreeMcpConfig(proxyUrl: string): object;
|
|
8
|
+
export declare function memtreeMcpConfig(proxyUrl: string, hostToken?: string): object;
|
|
9
9
|
export interface MemtreeMcpConfigFile {
|
|
10
10
|
path: string;
|
|
11
11
|
close(): void;
|
|
12
12
|
}
|
|
13
|
-
export declare function writeMemtreeMcpConfig(proxyUrl: string, tempRoot?: string): MemtreeMcpConfigFile;
|
|
13
|
+
export declare function writeMemtreeMcpConfig(proxyUrl: string, tempRoot?: string, hostToken?: string): MemtreeMcpConfigFile;
|
|
14
14
|
export interface MemtreeMcpPlan {
|
|
15
15
|
/** ccc registers its own server (`--mcp-config` + `--allowedTools`). */
|
|
16
16
|
register: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memtree-mcp-config.d.ts","sourceRoot":"","sources":["../src/memtree-mcp-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"memtree-mcp-config.d.ts","sourceRoot":"","sources":["../src/memtree-mcp-config.ts"],"names":[],"mappings":"AA6CA,+BAA+B;AAC/B,eAAO,MAAM,0BAA0B,QAA+B,CAAC;AACvE,+DAA+D;AAC/D,eAAO,MAAM,qBAAqB,UAA0C,CAAC;AAC7E,eAAO,MAAM,kBAAkB,QAA8D,CAAC;AAE9F,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,OAAO,CAEtE;AAED,yEAAyE;AACzE,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAe7E;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;CACf;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,QAAQ,GAAE,MAAoB,EAC9B,SAAS,CAAC,EAAE,MAAM,GACjB,oBAAoB,CAatB;AAED,MAAM,WAAW,cAAc;IAC7B,wEAAwE;IACxE,QAAQ,EAAE,OAAO,CAAC;IAClB;6EACyE;IACzE,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,GAAG,GAAE,MAAsB,GAC1B,cAAc,CAShB;AAED,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,SAAS,MAAM,EAAuB,GAC5C,MAAM,EAAE,CAMV;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAOxE;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAE/D;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,GAAE,MAAsB,GAC1B,KAAK,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAQtC"}
|
|
@@ -28,9 +28,10 @@
|
|
|
28
28
|
* pre-allows nothing (if it runs `ccc memtree-mcp` the header is still
|
|
29
29
|
* sent); tools named by `--disallowedTools` (a tool, `mcp__memtree`,
|
|
30
30
|
* or a `*` pattern) are neither pre-allowed nor named in the header, and
|
|
31
|
-
* with all
|
|
31
|
+
* with all of them disallowed ccc registers nothing. Claude Code applies a
|
|
32
32
|
* deny over an allow in any case.
|
|
33
33
|
*/
|
|
34
|
+
import { HOST_TOKEN_ENV } from "./host-session.js";
|
|
34
35
|
import fs from "node:fs";
|
|
35
36
|
import os from "node:os";
|
|
36
37
|
import path from "node:path";
|
|
@@ -46,7 +47,7 @@ export function memtreeMcpEnabledByEnv(env) {
|
|
|
46
47
|
return env.CCC_MEMTREE_MCP !== "0";
|
|
47
48
|
}
|
|
48
49
|
/** The `--mcp-config` JSON for this ccc's server, bound to its proxy. */
|
|
49
|
-
export function memtreeMcpConfig(proxyUrl) {
|
|
50
|
+
export function memtreeMcpConfig(proxyUrl, hostToken) {
|
|
50
51
|
return {
|
|
51
52
|
mcpServers: {
|
|
52
53
|
[MEMTREE_MCP_SERVER_NAME]: {
|
|
@@ -54,16 +55,18 @@ export function memtreeMcpConfig(proxyUrl) {
|
|
|
54
55
|
command: process.execPath,
|
|
55
56
|
args: [MEMTREE_MCP_SCRIPT],
|
|
56
57
|
// The proxy's version, so a server started after an update can tell.
|
|
57
|
-
|
|
58
|
+
// The host token lets this server ask which session its process is on.
|
|
59
|
+
env: { CCC_MEMTREE_PROXY: proxyUrl, [PROXY_VERSION_ENV]: CLIENT_VERSION,
|
|
60
|
+
...(hostToken ? { [HOST_TOKEN_ENV]: hostToken } : {}) },
|
|
58
61
|
alwaysLoad: true,
|
|
59
62
|
},
|
|
60
63
|
},
|
|
61
64
|
};
|
|
62
65
|
}
|
|
63
|
-
export function writeMemtreeMcpConfig(proxyUrl, tempRoot = os.tmpdir()) {
|
|
66
|
+
export function writeMemtreeMcpConfig(proxyUrl, tempRoot = os.tmpdir(), hostToken) {
|
|
64
67
|
const dir = fs.mkdtempSync(path.join(tempRoot, "ccc-memtree-mcp-"));
|
|
65
68
|
const file = path.join(dir, "mcp.json");
|
|
66
|
-
fs.writeFileSync(file, JSON.stringify(memtreeMcpConfig(proxyUrl)), { mode: 0o600 });
|
|
69
|
+
fs.writeFileSync(file, JSON.stringify(memtreeMcpConfig(proxyUrl, hostToken)), { mode: 0o600 });
|
|
67
70
|
let closed = false;
|
|
68
71
|
return {
|
|
69
72
|
path: file,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memtree-mcp-config.js","sourceRoot":"","sources":["../src/memtree-mcp-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM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AC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;AAChE,CAAC;AAED,SAAS,YAAY,CAAC,IAAY;IAChC,OAAO,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AACrD,CAAC"}
|
package/dist/memtree-mcp.d.ts
CHANGED
|
@@ -11,8 +11,27 @@ export declare const MEMTREE_MCP_SERVER_NAME = "memtree";
|
|
|
11
11
|
export declare const PROXY_VERSION_ENV = "CCC_PROXY_VERSION";
|
|
12
12
|
/** The note added to failed tool calls when this server and its proxy differ. */
|
|
13
13
|
export declare function versionMismatchNote(proxyVersion: string | undefined, ownVersion?: string): string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Says once per session, after a tool's answer, that ccc was updated on disk since
|
|
16
|
+
* this server started: Claude Code keeps an MCP server for the whole session, so
|
|
17
|
+
* the tools stay the version it loaded (an older one may lack message times) until
|
|
18
|
+
* ccc restarts. Silent when the versions match or package.json is unreadable.
|
|
19
|
+
*/
|
|
20
|
+
export declare class StaleToolsNotice {
|
|
21
|
+
private readonly readInstalled;
|
|
22
|
+
private readonly own;
|
|
23
|
+
private readonly now;
|
|
24
|
+
private readonly startedAt;
|
|
25
|
+
private said;
|
|
26
|
+
private checkedAt;
|
|
27
|
+
constructor(readInstalled?: () => string | undefined, own?: string, now?: () => number, startedAt?: Date);
|
|
28
|
+
next(): string | undefined;
|
|
29
|
+
}
|
|
30
|
+
export declare function staleToolsNote(installed: string, own: string, startedAt: Date): string;
|
|
31
|
+
/** The version in this install's package.json now (ccc may have been updated since it started). */
|
|
32
|
+
export declare function installedVersion(): string | undefined;
|
|
14
33
|
/** Sent to MemTree as `x-memtree-tools` when this server is configured. */
|
|
15
|
-
export declare const MEMTREE_TOOL_NAMES: readonly ["search", "read_node", "read_lines", "list"];
|
|
34
|
+
export declare const MEMTREE_TOOL_NAMES: readonly ["search", "read_node", "read_lines", "list", "user_messages", "handover"];
|
|
16
35
|
/** `tree` value naming this session's own current tree. */
|
|
17
36
|
export declare const CURRENT_TREE = "current";
|
|
18
37
|
/**
|
|
@@ -87,6 +106,8 @@ export declare const MEMTREE_TOOLS: ({
|
|
|
87
106
|
tail?: undefined;
|
|
88
107
|
full?: undefined;
|
|
89
108
|
q?: undefined;
|
|
109
|
+
context?: undefined;
|
|
110
|
+
days?: undefined;
|
|
90
111
|
};
|
|
91
112
|
required: string[];
|
|
92
113
|
};
|
|
@@ -124,6 +145,8 @@ export declare const MEMTREE_TOOLS: ({
|
|
|
124
145
|
tail?: undefined;
|
|
125
146
|
full?: undefined;
|
|
126
147
|
q?: undefined;
|
|
148
|
+
context?: undefined;
|
|
149
|
+
days?: undefined;
|
|
127
150
|
};
|
|
128
151
|
required?: undefined;
|
|
129
152
|
};
|
|
@@ -173,6 +196,8 @@ export declare const MEMTREE_TOOLS: ({
|
|
|
173
196
|
limit?: undefined;
|
|
174
197
|
id?: undefined;
|
|
175
198
|
q?: undefined;
|
|
199
|
+
context?: undefined;
|
|
200
|
+
days?: undefined;
|
|
176
201
|
};
|
|
177
202
|
required?: undefined;
|
|
178
203
|
};
|
|
@@ -219,6 +244,104 @@ export declare const MEMTREE_TOOLS: ({
|
|
|
219
244
|
end?: undefined;
|
|
220
245
|
tail?: undefined;
|
|
221
246
|
full?: undefined;
|
|
247
|
+
context?: undefined;
|
|
248
|
+
days?: undefined;
|
|
249
|
+
};
|
|
250
|
+
required?: undefined;
|
|
251
|
+
};
|
|
252
|
+
} | {
|
|
253
|
+
_meta: {
|
|
254
|
+
readonly "anthropic/alwaysLoad": true;
|
|
255
|
+
};
|
|
256
|
+
name: string;
|
|
257
|
+
description: string;
|
|
258
|
+
inputSchema: {
|
|
259
|
+
type: string;
|
|
260
|
+
properties: {
|
|
261
|
+
tree: {
|
|
262
|
+
type: string;
|
|
263
|
+
description: string;
|
|
264
|
+
};
|
|
265
|
+
since: {
|
|
266
|
+
type: string;
|
|
267
|
+
description: string;
|
|
268
|
+
};
|
|
269
|
+
until: {
|
|
270
|
+
type: string;
|
|
271
|
+
description: string;
|
|
272
|
+
};
|
|
273
|
+
query: {
|
|
274
|
+
type: string;
|
|
275
|
+
description: string;
|
|
276
|
+
};
|
|
277
|
+
cursor: {
|
|
278
|
+
type: string;
|
|
279
|
+
description: string;
|
|
280
|
+
};
|
|
281
|
+
limit: {
|
|
282
|
+
type: string;
|
|
283
|
+
description: string;
|
|
284
|
+
};
|
|
285
|
+
full: {
|
|
286
|
+
type: string;
|
|
287
|
+
description: string;
|
|
288
|
+
};
|
|
289
|
+
context: {
|
|
290
|
+
type: string;
|
|
291
|
+
description: string;
|
|
292
|
+
};
|
|
293
|
+
mode?: undefined;
|
|
294
|
+
project?: undefined;
|
|
295
|
+
node?: undefined;
|
|
296
|
+
id?: undefined;
|
|
297
|
+
block?: undefined;
|
|
298
|
+
start?: undefined;
|
|
299
|
+
end?: undefined;
|
|
300
|
+
tail?: undefined;
|
|
301
|
+
q?: undefined;
|
|
302
|
+
days?: undefined;
|
|
303
|
+
};
|
|
304
|
+
required?: undefined;
|
|
305
|
+
};
|
|
306
|
+
} | {
|
|
307
|
+
_meta: {
|
|
308
|
+
readonly "anthropic/alwaysLoad": true;
|
|
309
|
+
};
|
|
310
|
+
name: string;
|
|
311
|
+
description: string;
|
|
312
|
+
inputSchema: {
|
|
313
|
+
type: string;
|
|
314
|
+
properties: {
|
|
315
|
+
tree: {
|
|
316
|
+
type: string;
|
|
317
|
+
description: string;
|
|
318
|
+
};
|
|
319
|
+
days: {
|
|
320
|
+
type: string;
|
|
321
|
+
description: string;
|
|
322
|
+
};
|
|
323
|
+
since: {
|
|
324
|
+
type: string;
|
|
325
|
+
description: string;
|
|
326
|
+
};
|
|
327
|
+
until: {
|
|
328
|
+
type: string;
|
|
329
|
+
description: string;
|
|
330
|
+
};
|
|
331
|
+
query?: undefined;
|
|
332
|
+
mode?: undefined;
|
|
333
|
+
project?: undefined;
|
|
334
|
+
cursor?: undefined;
|
|
335
|
+
limit?: undefined;
|
|
336
|
+
node?: undefined;
|
|
337
|
+
id?: undefined;
|
|
338
|
+
block?: undefined;
|
|
339
|
+
start?: undefined;
|
|
340
|
+
end?: undefined;
|
|
341
|
+
tail?: undefined;
|
|
342
|
+
full?: undefined;
|
|
343
|
+
q?: undefined;
|
|
344
|
+
context?: undefined;
|
|
222
345
|
};
|
|
223
346
|
required?: undefined;
|
|
224
347
|
};
|
|
@@ -227,9 +350,31 @@ export interface MemtreeMcpDeps {
|
|
|
227
350
|
/** The ccc loopback proxy, e.g. http://127.0.0.1:1234. */
|
|
228
351
|
proxyUrl?: string;
|
|
229
352
|
sessionId?: string;
|
|
353
|
+
/** HOST_TOKEN_ENV: set by a ccc whose proxy answers `/memtree/host-session`. */
|
|
354
|
+
hostToken?: string;
|
|
230
355
|
fetch?: typeof fetch;
|
|
231
356
|
now?: () => number;
|
|
232
357
|
}
|
|
358
|
+
/**
|
|
359
|
+
* Sent with each tool's proxy reads: which tool (`page` is a whole tree's `.json`) and
|
|
360
|
+
* the calling session, which the proxy passes on so the server's one content-free log
|
|
361
|
+
* line per call can say which tool read what (polychat memtree_tool_log.py). Not to be
|
|
362
|
+
* confused with `x-memtree-tools`, the list of configured tools sent on compress calls.
|
|
363
|
+
*/
|
|
364
|
+
export declare const MEMTREE_TOOL_HEADER = "x-memtree-tool";
|
|
365
|
+
export declare function toolHeaders(tool: string, deps: MemtreeMcpDeps): Record<string, string>;
|
|
366
|
+
/**
|
|
367
|
+
* Point `deps.sessionId` at the session this server's Claude Code process is on now.
|
|
368
|
+
* Claude Code starts the server with the session id it had at launch and does not
|
|
369
|
+
* restart it when the process moves to another session (a resume through the picker,
|
|
370
|
+
* /resume, /clear), so that id can name a session with no page ("no MemTree yet",
|
|
371
|
+
* 2026-11-09). The proxy of the ccc that launched this Claude Code knows the process's
|
|
372
|
+
* session from its SessionStart hook and answers only that process (`hostPid`: this
|
|
373
|
+
* server's parent, with the token from ccc's MCP config). Without a token (an older
|
|
374
|
+
* ccc's config: its proxy has no such route) nothing is asked; any other answer
|
|
375
|
+
* (another process, no session start seen) leaves the id as it is.
|
|
376
|
+
*/
|
|
377
|
+
export declare function refreshHostSession(deps: MemtreeMcpDeps, hostPid?: number): Promise<void>;
|
|
233
378
|
/** What the tree tools read: this session's current tree, or another one by id. */
|
|
234
379
|
export interface TreeSource {
|
|
235
380
|
get(tree?: string): Promise<MemtreeIndex>;
|
|
@@ -239,7 +384,11 @@ export interface TreeSource {
|
|
|
239
384
|
search?(query: string, limit: number | undefined, tree?: string): Promise<string>;
|
|
240
385
|
/** The un-indexed messages after the tree, read fresh from the server; `full`: tool calls whole. */
|
|
241
386
|
tail?(tree: string | undefined, start?: number, end?: number, full?: boolean): Promise<string>;
|
|
387
|
+
/** A tree's `user_messages` or `handover` answer (JSON), read fresh from the server. */
|
|
388
|
+
serverRead?(route: TreeRoute, tree: string | undefined, params: URLSearchParams): Promise<unknown>;
|
|
242
389
|
}
|
|
390
|
+
/** Per-tree server reads that are not page JSON: the person's messages, the handover pack. */
|
|
391
|
+
export type TreeRoute = "user_messages" | "handover";
|
|
243
392
|
/**
|
|
244
393
|
* Resolves, fetches and caches the current page, and other sessions' pages
|
|
245
394
|
* by request id.
|
|
@@ -247,6 +396,8 @@ export interface TreeSource {
|
|
|
247
396
|
export declare class CurrentTree implements TreeSource {
|
|
248
397
|
private readonly deps;
|
|
249
398
|
private cached?;
|
|
399
|
+
/** The session `cached` was read for: a page is never reused across sessions. */
|
|
400
|
+
private cachedSession?;
|
|
250
401
|
/** Temporary prefix pages: when each may be fetched again. */
|
|
251
402
|
private readonly prefixRetryAt;
|
|
252
403
|
/** The last fetched temporary prefix per page, served during its cooldown. */
|
|
@@ -254,6 +405,8 @@ export declare class CurrentTree implements TreeSource {
|
|
|
254
405
|
private inFlight?;
|
|
255
406
|
/** Other trees, least recently used first. */
|
|
256
407
|
private readonly others;
|
|
408
|
+
/** Pages whose per-message times were incomplete: when to refetch them (timesDue). */
|
|
409
|
+
private readonly timesRetryAt;
|
|
257
410
|
/** Set once the server answered 404 to a tree search the page JSON could answer. */
|
|
258
411
|
private serverSearchMissing;
|
|
259
412
|
private readonly fetchImpl;
|
|
@@ -270,7 +423,21 @@ export declare class CurrentTree implements TreeSource {
|
|
|
270
423
|
* it grows with the conversation. With no range, the newest messages.
|
|
271
424
|
*/
|
|
272
425
|
tail(tree: string | undefined, start?: number, end?: number, full?: boolean): Promise<string>;
|
|
426
|
+
/**
|
|
427
|
+
* `/memtree/<id>/<route>`, never cached (the newest messages grow). This session's
|
|
428
|
+
* tree must be this session's (as tail); a 404 without the server's own detail means
|
|
429
|
+
* the server or this ccc's proxy predates the route.
|
|
430
|
+
*/
|
|
431
|
+
serverRead(route: TreeRoute, tree: string | undefined, params: URLSearchParams): Promise<unknown>;
|
|
273
432
|
private loadCurrent;
|
|
433
|
+
/**
|
|
434
|
+
* Whether a cached page's per-message times were incomplete (`line_times_incomplete`:
|
|
435
|
+
* the server's times lookup was slow) and are due a refetch. The page itself is
|
|
436
|
+
* readable meanwhile, so it stays cached; only its times are retried.
|
|
437
|
+
*/
|
|
438
|
+
private timesDue;
|
|
439
|
+
/** `load()`, or the readable `stale` copy when that fails (its times retried later). */
|
|
440
|
+
private refreshed;
|
|
274
441
|
private requireSessionId;
|
|
275
442
|
/** The proxy's current page for the calling session; fails closed on any other session. */
|
|
276
443
|
currentId(validatePage?: boolean): Promise<string>;
|
|
@@ -290,6 +457,8 @@ export declare class CurrentTree implements TreeSource {
|
|
|
290
457
|
/** The cross-session tools: formatted text from the proxy's finder relay. */
|
|
291
458
|
export interface SessionFinderSource {
|
|
292
459
|
listSessions(args: Record<string, unknown>): Promise<string>;
|
|
460
|
+
/** The newest tree of the user's session `sessionId`, or undefined (none, or not a session). */
|
|
461
|
+
sessionTree?(sessionId: string): Promise<string | undefined>;
|
|
293
462
|
/** Server search across sessions, or within ``tree`` (any mode). */
|
|
294
463
|
searchSessions(args: Record<string, unknown>, tree?: string): Promise<string>;
|
|
295
464
|
}
|
|
@@ -298,8 +467,15 @@ export declare class SessionFinder implements SessionFinderSource {
|
|
|
298
467
|
private readonly fetchImpl;
|
|
299
468
|
constructor(deps: MemtreeMcpDeps);
|
|
300
469
|
listSessions(args: Record<string, unknown>): Promise<string>;
|
|
470
|
+
private readonly sessionTrees;
|
|
471
|
+
/** sessionTree, remembered for SESSION_TREE_TTL_MS (hits and misses: legacy ids repeat). */
|
|
472
|
+
sessionTree(sessionId: string): Promise<string | undefined>;
|
|
473
|
+
private lookupSessionTree;
|
|
301
474
|
searchSessions(args: Record<string, unknown>, tree?: string): Promise<string>;
|
|
475
|
+
private now;
|
|
302
476
|
private get;
|
|
477
|
+
private fetch;
|
|
478
|
+
private bodyOf;
|
|
303
479
|
}
|
|
304
480
|
/**
|
|
305
481
|
* One JSON-RPC message in, the response out (undefined for notifications).
|
|
@@ -307,7 +483,11 @@ export declare class SessionFinder implements SessionFinderSource {
|
|
|
307
483
|
*/
|
|
308
484
|
export declare function handleMcpMessage(input: unknown, tree: TreeSource, finder?: SessionFinderSource,
|
|
309
485
|
/** versionMismatchNote: appended to failed tool calls. */
|
|
310
|
-
versionNote?: string
|
|
486
|
+
versionNote?: string,
|
|
487
|
+
/** A note to append once, to whichever tool answer comes first (StaleToolsNotice). */
|
|
488
|
+
notice?: {
|
|
489
|
+
next(): string | undefined;
|
|
490
|
+
}): Promise<object | undefined>;
|
|
311
491
|
/** Serve MCP over this process's stdin/stdout until stdin closes. */
|
|
312
492
|
export declare function runMemtreeMcpServer(env?: NodeJS.ProcessEnv): void;
|
|
313
493
|
//# sourceMappingURL=memtree-mcp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memtree-mcp.d.ts","sourceRoot":"","sources":["../src/memtree-mcp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"memtree-mcp.d.ts","sourceRoot":"","sources":["../src/memtree-mcp.ts"],"names":[],"mappings":"AAqDA,OAAO,EAML,YAAY,EAUb,MAAM,oBAAoB,CAAC;AAa5B,eAAO,MA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