[Feature]: Add a MiMo / MiMoCode ingest harness source
Observed or reproduced in a real environment.
Problem Statement
Xiaomi MiMo Desktop / MiMoCode stores conversations in a local SQLite database
(~/.local/share/mimocode/mimocode.db, WAL), not in append-only JSONL. There is
currently no ingest harness source for it, so MiMo sessions cannot be replayed
into OpenViking memory.
Schema (MiMoCode desktop-5198ff5, still OpenCode-family):
session(id, title, directory, version, time_created, …)message(id, session_id, agent_id, time_created, data JSON)part(id, message_id, session_id, time_created, data JSON)
message.time_created is epoch milliseconds. Conversation text lives in
part rows with type == "text".
Three pollution traps on a real corpus that a naive adapter hits:
- Every user
message.datacarries a full system prompt insystem(~28 KB). - Host-injected context is written as
partrows withtype=textandsynthetic=true(runtime notes, MCP tool lists, skill bodies). - Residual
<system-reminder>…</system-reminder>can still appear inside a non-synthetic text block.
Proposed Solution
Add a mimo harness source based on the existing SqliteLogSource base
(same (time_created, id) cursor model as opencode):
- discover sessions from
session - read
messagerows withagent_id = 'main' - reassemble text from non-synthetic
part.type == "text"only - strip residual
<system-reminder>blocks - treat an assistant row as complete only when
time.completedorfinishis set - default path
~/.local/share/mimocode/mimocode.db
Register it in openviking/ingest/sources/__init__.py and document it in
docs/{en,zh}/agent-integrations/09-log-ingestion.md.
Expected config:
{
"ingest": {
"enabled": true,
"harnesses": {
"mimo": { "enabled": true, "mode": "both" }
}
}
}
Alternatives Considered
- Manual
add-memory/rememberonly — not automatic, does not cover history. - Treating the DB as a generic SQLite dump without filtering
syntheticparts — archives host system prompts as memory.
Feature Area
Session Management
Use Case
A MiMo Desktop / MiMoCode user enables ingest.harnesses.mimo and backfills
local sessions so OpenViking can extract long-term memory from those
conversations, then watches for new turns.
Example API (Optional)
No public API change. New registry name mimo only
(IngestConfig.harnesses is already a free-form dict).
Additional Context
Local dry-run against a real MiMoCode DB: 4 sessions / 48 messages; after
stripping, 0 messages retained host system-prompt or system-reminder text.
Assistant peer shape matches existing convention
({harness}__{provider}__{model}).
Contribution
- [x] I am willing to contribute to implementing this feature