mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 00:03:00 +00:00
Refactor session manager: migration chain, validation, tests
- Add migrateV1ToV2/migrateToCurrentVersion for extensible migrations - createSummaryMessage now takes timestamp from entry - loadEntriesFromFile validates session header - findMostRecentSession only returns valid session files (reads first 512 bytes) - Remove ConversationEntry alias - Fix mom context.ts TreeNode type Tests: - migration.test.ts: v1 migration, idempotency - build-context.test.ts: 14 tests covering trivial, compaction, branches - file-operations.test.ts: loadEntriesFromFile, findMostRecentSession
This commit is contained in:
parent
95312e00bb
commit
beb70f126d
7 changed files with 606 additions and 102 deletions
|
|
@ -112,8 +112,6 @@ export {
|
|||
buildSessionContext,
|
||||
type CompactionContent,
|
||||
type CompactionEntry,
|
||||
type ConversationContent,
|
||||
type ConversationEntry,
|
||||
CURRENT_SESSION_VERSION,
|
||||
createSummaryMessage,
|
||||
type FileEntry,
|
||||
|
|
@ -123,6 +121,7 @@ export {
|
|||
type ModelChangeEntry,
|
||||
migrateSessionEntries,
|
||||
parseSessionEntries,
|
||||
type SessionContent as ConversationContent,
|
||||
type SessionContext as LoadedSession,
|
||||
type SessionEntry,
|
||||
type SessionHeader,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue