Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/everos_mcp/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,11 @@ async def forget_session(ctx: Context | None = None) -> str:
# missing; an enveloped not-found is a real answer from a real route.
if exc.code not in ("404", "405"):
raise
# Self-hosted EverOS has no delete endpoint yet; memories live as
# Markdown files on that server.
# Self-hosted EverOS releases from before the delete endpoint.
return conv.reply(
"This EverOS deployment does not support deleting memories through "
"the API (self-hosted servers keep them as Markdown files under "
"~/.everos/ on the server — remove them there). Nothing was deleted."
"This EverOS server is too old to delete memories: it has no "
"POST /api/v2/memory/delete. Upgrade it to a release that includes "
"that endpoint, then call forget_session again. Nothing was deleted."
)
count = result.get("count", 0)
pending_cases = ""
Expand Down
5 changes: 3 additions & 2 deletions tests/test_everos_mcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,11 @@ def test_forget_session_does_not_mistake_a_real_not_found(tool_client):
run(server.forget_session())


def test_forget_session_explains_missing_delete_on_self_hosted(tool_client):
def test_forget_session_on_an_old_self_hosted_server_says_to_upgrade(tool_client):
tool_client(respond={"detail": "Not Found"}, status=404)
reply = run(server.forget_session())
assert "does not support deleting" in reply and "Nothing was deleted" in reply
assert "Upgrade" in reply and "/api/v2/memory/delete" in reply
assert "Nothing was deleted" in reply


def test_list_memories_formats_scores_and_page(tool_client):
Expand Down
Loading