agentcache 0.2.3 → 0.2.4
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/mcp.js +9 -4
- package/package.json +1 -1
package/dist/mcp.js
CHANGED
|
@@ -742,10 +742,15 @@ async function startMcpServer() {
|
|
|
742
742
|
}
|
|
743
743
|
if (!output) output = "No compiled knowledge yet. This will populate as you use AgentCache across sessions.\n";
|
|
744
744
|
const pendingCount = repo.getPendingCount();
|
|
745
|
-
if (pendingCount >
|
|
746
|
-
output
|
|
747
|
-
|
|
748
|
-
|
|
745
|
+
if (pendingCount > 20) {
|
|
746
|
+
output += `
|
|
747
|
+
---
|
|
748
|
+
KNOWLEDGE COMPILATION AVAILABLE: You have ${pendingCount} past sessions that haven't been compiled into knowledge yet. Ask the user: "I can compile knowledge from your past ${pendingCount} sessions (~60s). Process now or later?" If they agree, call compile_extract up to 5 times, submitting results with compile_submit after each. If they decline, move on.
|
|
749
|
+
`;
|
|
750
|
+
} else if (pendingCount > 0) {
|
|
751
|
+
output += `
|
|
752
|
+
<!-- ${pendingCount} session(s) pending compilation (below threshold, will process when backlog grows). -->
|
|
753
|
+
`;
|
|
749
754
|
}
|
|
750
755
|
output += "\n---\nIMPORTANT: Submit observations incrementally as they happen during this session.\nWhen you learn something (rule, lesson, decision, context), call compile_submit immediately.\nDo NOT wait until the end \u2014 sessions can terminate without warning.\n";
|
|
751
756
|
return { content: [{ type: "text", text: output.trim() }] };
|