mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-27 21:08:00 +00:00
1.4 KiB
1.4 KiB
04.1 — Live turns write tinyagents records
Today new turns append to session_raw/*.jsonl via transcript.rs;
the tinyagents store only receives one-time imports.
Steps
- Add a session store handle (same
FileStore/JsonlAppendStorelayout assession_import:{workspace}/tinyagents_store/{kv,journal}) to the session shell; register it onRunContext.storesinassemble_turn_harness. - After each turn, append the turn's messages to
session.{stem}.messagesand upsert the session descriptor (nssessions) — dual-write alongside the legacy JSONL append insession/turn/session_io.rs. Reusesession_import/convert.rsnormalization so live and imported records are shape-identical. - Adopt
StoreChatHistoryas the in-run history mechanism where the shell currently hand-threads message vectors (evaluate: it must preserve native tool-call envelopes and XML/P-format compat suffixes verbatim — if not, keep OpenHuman assembly and only persist through the store). - Write-side parity test: run a turn, assert legacy JSONL and store stream render identical transcripts (reuse importer's JournalMessage parity helper).
Deletions
None yet (dual-write phase). Deletion lands in 04.2.
Acceptance
- Every new turn appears in the store journal with correct stem, thread_id, provider/model metadata, tool-call ids.
- Dual-write behind one flag so 04.2 can flip reads independently.