Skip to main content

Module process_turn

Module process_turn 

Source
Expand description

Unified process_turn orchestration. Unified process_turn orchestration.

This module provides a single MenteDb::process_turn() method that implements the full conversation-turn pipeline used by MCP servers, cloud APIs, and any other client. The steps are:

  1. Embed query + retrieve context (speculative cache → hybrid search)
  2. Check pain signals
  3. Store episodic memory (with write inference)
  4. Detect actions, proactive recall, corrections, sentiment
  5. Detect phantoms + stream contradiction check
  6. Update trajectory + ghost memories
  7. Update speculative cache
  8. Extract facts + link edges
  9. Auto-maintenance (decay / archival / consolidation on intervals)

LLM-powered features (entity resolution, topic canonicalization, contradiction verification, memory extraction) are not included here — they are client-specific and should be layered on top of the ProcessTurnResult by the caller.

Structs§

DetectedAction
A detected action from the conversation.
PainWarning
A pain warning matched against the current context.
ProactiveRecall
A proactively recalled memory relevant to detected actions.
ProcessTurnInput
Input for a single conversation turn.
ProcessTurnResult
Result of processing a conversation turn.