mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 18:03:50 +00:00
Session tree structure with id/parentId linking
- Add TreeNode base type with id, parentId, timestamp - Add *Content types for clean input/output separation - Entry types are now TreeNode & *Content intersections - SessionManager assigns id/parentId on save, tracks leafId - Add migrateSessionEntries() for v1 to v2 conversion - Migration runs on load, rewrites file - buildSessionContext() uses tree traversal from leaf - Compaction returns CompactionResult (content only) - Hooks return compaction content, not full entries - Add firstKeptEntryId to before_compact hook event - Update mom package for tree fields - Better error messages for compaction failures
This commit is contained in:
parent
04a764742e
commit
c58d5f20a4
12 changed files with 6778 additions and 6297 deletions
|
|
@ -107,11 +107,20 @@ export {
|
|||
readOnlyTools,
|
||||
} from "./core/sdk.js";
|
||||
export {
|
||||
type BranchSummaryContent,
|
||||
type BranchSummaryEntry,
|
||||
buildSessionContext,
|
||||
type CompactionContent,
|
||||
type CompactionEntry,
|
||||
type ConversationContent,
|
||||
type ConversationEntry,
|
||||
CURRENT_SESSION_VERSION,
|
||||
createSummaryMessage,
|
||||
getLatestCompactionEntry,
|
||||
type MessageContent,
|
||||
type ModelChangeContent,
|
||||
type ModelChangeEntry,
|
||||
migrateSessionEntries,
|
||||
parseSessionEntries,
|
||||
type SessionContext as LoadedSession,
|
||||
type SessionEntry,
|
||||
|
|
@ -122,6 +131,9 @@ export {
|
|||
SUMMARY_PREFIX,
|
||||
SUMMARY_SUFFIX,
|
||||
type ThinkingLevelChangeEntry,
|
||||
type ThinkingLevelContent,
|
||||
// Tree types (v2)
|
||||
type TreeNode,
|
||||
} from "./core/session-manager.js";
|
||||
export {
|
||||
type CompactionSettings,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue