feat(tui): add safe session resume flow

This commit is contained in:
NI0317
2026-07-24 01:29:35 -07:00
committed by ZiyaZhang
parent 65d29da8a1
commit 2ae9f4fdf3
57 files changed
+2312 -192

No files matched your search

+12
View File
@@ -34,6 +34,18 @@ interface SessionLocation {
}
```
## `SessionLiveLease` — live ownership capability
`claimLive(id)` returns one idempotent release capability. The base service tracks only its own process; first-party backends additionally reject another live process and reclaim a dead owner's lease. `isLive(id)` reports either local or backend ownership without claiming it.
```ts type-equiv
/** Idempotent capability releasing one acquired live-session lease reference. */
interface SessionLiveLease {
/** Release this caller's lease reference after its live session reaches quiescence. */
release(): Promise<void>
}
```
## `SessionHeader` — metadata beside the log
Per-session metadata travels **separately** from the event log: format version, cwd, lineage, and the seed boundary are storage concerns, not conversation events, so they stay out of `SessionEventMap` and never reach `deriveMessages()`. The header is attached to a `Session` via `session.header`.