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:
@@ -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");
|
||||
};
|
||||
@@ -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");
|
||||
};
|
||||
|
||||
@@ -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)}`;
|
||||
|
||||
Reference in New Issue
Block a user