Expand description
v0.4.4 — RetrievalMode typed enum + 5 starter HarnessAware
adapters.
§What this module is
A typed superset of the existing
RecallRequest::strategy: Option<String>
field, plus a new HarnessAware variant that lets the recall
response envelope be reshaped per agent harness (Claude Code,
Codex, Gemini CLI, Chronos, generic) per the framing in arXiv
2605.15184: “overall scores still depend strongly on which
harness and tool-calling style is used, even when the underlying
conversation data are the same.”
§Backwards-compatible introduction
RecallRequest gains an
optional mode: Option<RetrievalMode> field in this release. The
legacy strategy: Option<String> field stays in place; if mode
is set it takes precedence, otherwise the engine continues to
parse strategy exactly as before. Existing SDK callers
(Python mnemo-db, TypeScript @mndfreek/mnemo-sdk, Go
mnemo.Recall) continue to work unchanged because they all
marshal through the string-typed field.
§HarnessAware semantics
HarnessAware { harness, format } does NOT change which records
are retrieved — under the hood it delegates to the default
HybridRrf retrieval path. What it changes is how the
crate::query::recall::ScoredMemory hits are shaped into a
string envelope that a specific agent harness prefers (inline
fenced blocks, file-based side-channel pointers with line
numbers, generic line-numbered list, …). The
HarnessEnvelope::shape method returns the rendered envelope
string; the recall response continues to carry the typed
ScoredMemory hits so downstream consumers that want the typed
payload are not blocked.
§Not in scope for v0.4.4
- No SDK ripple. The Python / TypeScript / Go SDKs are NOT
updated in this release. They continue to use the string-typed
strategyfield. SDK migration to a typedmodefield is a follow-up tracked separately. - No REST / gRPC / pgwire schema bump. The new
modefield serialises through the sameRecallRequestSerde definition; inbound JSON that omitsmodecontinues to work. - No envelope-trait stabilisation. The
HarnessEnvelopetrait + the five adapter structs are intentionally minimal — each adapter produces a deterministic string with the shape the corresponding harness expects, but the contents of those strings are not a stability surface in v0.4.4. Operators relying on a specific envelope shape should pin the mnemo minor version.
Structs§
- Chronos
Envelope - Chronos envelope — timeline-shaped: one line per hit with the hit
id, score, and the first line of content. Chronos prefers temporally-anchored single-line summaries. - Claude
Code Envelope - Claude Code envelope — fenced markdown blocks with
recall://<id>anchors for inline; line-numbered file-pointer summary for the non-inline branch. - Codex
Envelope - Codex envelope — file-based by default (writes hits to a path-root the caller chose), with an inline JSON pointer summary in the response. The Inline branch keeps the raw content in the response.
- Gemini
CliEnvelope - Gemini CLI envelope — plain numbered list with
[N]markers + the hit content; tool-call-style framing the Gemini CLI surfaces well. - Generic
Envelope - Generic envelope — minimal
id\tscore\tcontentTSV one line per hit. The fallback when no harness-specific adapter applies.
Enums§
- Envelope
Format - Where the envelope payload lives — inline in the response, written to a file the harness reads via a side-channel pointer, or written to a side-channel out-of-band stream.
- Harness
Kind - Which agent harness the response envelope should be shaped for.
- Retrieval
Mode - Typed recall strategy. Superset of the legacy
RecallRequest.strategy: Option<String>API — the variant ↔ string mapping is documented on each variant.
Traits§
- Harness
Envelope - Trait implemented by each per-harness adapter. The contract is
minimal: take a slice of typed
ScoredMemoryhits and return a rendered string envelope shaped for the harness.