Review cleanup: fix stale tool references, update docs, add README

- Remove unused src/context/notify.ts (never wired up)
- Fix format.ts/search.ts: update memory_messages references to router pattern
- Update AGENTS.md: reflect current state, add recommended consumer additions
- Update docs/architecture.md: match router pattern, remove stale phases
- Add README.md: problem/solution, install, tools, agent guidance
This commit is contained in:
2026-04-21 12:41:14 +00:00
parent 97a472c5f8
commit 3dceb30ce9
6 changed files with 262 additions and 134 deletions

View File

@@ -1,26 +0,0 @@
export const formatAnomalyNotification = (
sessionID: string,
_type: string,
percentage: number,
status: string,
): string => {
const lines: string[] = [];
lines.push(`Context threshold reached [${status}]`);
lines.push("");
lines.push(`Session: ${sessionID}`);
lines.push(`Context: ${percentage}% used`);
if (status === "critical") {
lines.push("");
lines.push("Imminent automatic compaction. Consider triggering memory_compact now.");
} else if (status === "red") {
lines.push("");
lines.push("Context is running low. Use memory_compact at your next natural break point.");
} else if (status === "yellow") {
lines.push("");
lines.push("Context usage is getting high. Consider memory_compact when convenient.");
}
return lines.join("\n");
};

View File

@@ -15,7 +15,9 @@ export const formatSessionList = (rows: Record<string, unknown>[]): string => {
}
lines.push("");
lines.push("Use memory_messages with a session ID to read the full conversation.");
lines.push(
'Use memory({tool: "messages", args: {sessionId: "..."}}) to read the full conversation.',
);
return lines.join("\n");
};

View File

@@ -51,7 +51,9 @@ export const searchConversations = (searchTerm: string, limit: number): string =
lines.push("");
}
lines.push("Use memory_messages with a session ID to read the full conversation.");
lines.push(
'Use memory({tool: "messages", args: {sessionId: "..."}}) to read the full conversation.',
);
return lines.join("\n");
} catch (err) {
return `Search failed: ${err instanceof Error ? err.message : String(err)}`;