Crate gestura_core_memory_bank

Crate gestura_core_memory_bank 

Source
Expand description

Durable memory-bank storage and retrieval for Gestura.

gestura-core-memory-bank owns the long-term/shared memory layer used by the runtime. It persists durable memory records as human-readable markdown with typed metadata, making them searchable across sessions while staying easy to inspect and recover manually.

§Memory model

The memory bank is the durable counterpart to session-scoped working memory:

  • short-term working memory lives with active sessions
  • durable memory-bank entries live on disk and can be reused later

Entries carry structured metadata so retrieval can be selective rather than a raw full-text search. High-signal dimensions include:

  • MemoryKind: retention/operational intent
  • MemoryType: procedural, semantic, episodic, resource, or other typed use
  • MemoryScope: task, session, directive, project, or global scope
  • provenance, tags, confidence, archival state, and promotion metadata

§Main entry points

  • MemoryBankEntry: durable memory record persisted to markdown
  • MemoryBankQuery: query builder for targeted retrieval
  • save_to_memory_bank, load_from_memory_bank, search_memory_bank_with_query
  • maintenance helpers such as listing, updating, deleting, and clearing

§Architecture role

This crate owns durable memory persistence and retrieval. Higher-level UI and operator workflows—such as the shared memory console used by CLI and GUI—live in gestura-core, which composes this crate with session working memory.

§Stable import paths

Most code should import through gestura_core::memory_bank::*.

Structs§

MemoryBankEntry
A single entry in the memory bank representing a saved conversation context
MemoryBankQuery
Filter options for targeted memory-bank retrieval.
MemoryGovernanceRefreshReport
Summary of a governance refresh pass.
MemoryGovernanceSuggestion
Persisted governance suggestion for operator review.
MemorySearchResult
Ranked result from targeted memory-bank retrieval.

Enums§

MemoryBankError
Errors that can occur during memory bank operations
MemoryGovernanceRelationship
Relationship produced by the governance-analysis pass.
MemoryGovernanceState
General governance state for durable memory curation.
MemoryKind
High-level memory retention domain.
MemoryScope
Scope for targeted durable-memory retrieval.
MemoryType
Typed classification for durable memory records.
ReflectionMemoryState
Retrieval state for reflection-derived durable memories.

Functions§

clear_memory_bank
Clear all memory bank entries in a workspace
delete_memory_bank_entry
Delete a single memory bank entry.
ensure_memory_bank_dir
Ensure the memory bank directory exists, creating it if necessary
get_memory_bank_dir
Get the memory bank directory path for a workspace
list_memory_bank
List all memory bank entries in a workspace
load_from_memory_bank
Load a memory bank entry from a markdown file
refresh_memory_bank_governance
Refresh persisted governance suggestions for durable memory entries.
save_to_memory_bank
Save a memory bank entry to disk as a markdown file
search_memory_bank
Search memory bank entries for relevant content
search_memory_bank_with_query
Search memory-bank entries using structured filters and ranking.
update_memory_bank_entry
Update a single memory bank entry in-place.