summaryrefslogtreecommitdiffhomepage
path: root/packages/kernel/src/runtime
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-06-22 01:09:26 +0900
committerAdam Malczewski <[email protected]>2026-06-22 01:09:26 +0900
commit5af664777bd64cddd168679d6369cd188212201a (patch)
tree8e72022183b8d72eccdb568de5776d74cd91f1aa /packages/kernel/src/runtime
parent28154825fb47248be21a0d64fc36492fb01c9a42 (diff)
downloaddispatch-5af664777bd64cddd168679d6369cd188212201a.tar.gz
dispatch-5af664777bd64cddd168679d6369cd188212201a.zip
feat: non-destructive compaction — fork history to archive before replacing
Compaction now preserves the full pre-compaction history: 1. Forks the conversation to a new archive ID (complete copy: chunks, metadata, cwd, reasoning-effort). Archive gets status=closed, title='Archive: <original>', compactedFrom=<originalId>. 2. Replaces the original conversation's history with [system: summary] + recent N messages (same as before). 3. Sets compactedFrom=<archiveId> on the original conversation's metadata. The original history is never destroyed. The archive is accessible via GET /conversations/:id using the archive ID. Wire/contract changes: - ConversationMeta: add compactedFrom?: string - CompactionResult: add archiveId: string - ConversationCompactedMessage: add archiveId - CompactResponse: add archiveId Conversation store: - forkHistory(sourceId, targetId): copies all chunks + metadata to a new conversation ID - setCompactedFrom(conversationId, archiveId): marks the conversation
Diffstat (limited to 'packages/kernel/src/runtime')
0 files changed, 0 insertions, 0 deletions