mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-08-18 13:15:51 +00:00
The record stream had three services: wireRecord (durable log), record (live/facet facade), and replayBuilder (replay buffer). replayBuilder was just one more projection of the same record stream, so fold it into record and model the split as Event Store + Projection: - record now owns the replay read model: push/patchLast/removeLastMessages/ buildReplay/captureLiveRecords, plus the range/segment logic for partial resume (seeded via RecordServiceOptions). - The two onRestoredRecord handlers collapse into one; record no longer injects IAgentReplayBuilderService. - Drop the unused restore/flush/close forwarders from IAgentRecordService; orchestration keeps using wireRecord directly. - replayBuilder keeps only its shared cross-domain types (AgentReplayRecord, ResumeSessionResult) as a types-only module; the service is removed. - Update consumers (contextMemory, fullCompaction, goal, messageLegacy, agentLifecycle), the test harness, and stubs to IAgentRecordService. - Add a record>contextMemory domain-layer exception: replay message records carry ContextMessage. |
||
|---|---|---|
| .. | ||
| recordService.test.ts | ||