@letta-ai/letta-code 0.26.6 → 0.26.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Resume tail fast path plan
|
|
2
|
+
|
|
3
|
+
## Contract
|
|
4
|
+
|
|
5
|
+
Boot/resume should use one small-tail algorithm for local and API backends:
|
|
6
|
+
|
|
7
|
+
1. Resolve the active agent and conversation using existing Letta CLI behavior.
|
|
8
|
+
2. If resuming, fetch a bounded tail for that exact conversation.
|
|
9
|
+
3. Convert that tail into TUI buffer lines.
|
|
10
|
+
4. Detect pending approvals from the literal tail.
|
|
11
|
+
5. Render the tail and show either the approval UI or the normal input.
|
|
12
|
+
|
|
13
|
+
Default Letta behavior stays stateful: normal startup resumes the default/last conversation.
|
|
14
|
+
|
|
15
|
+
## Backend boundary
|
|
16
|
+
|
|
17
|
+
Add a backend-level resume-tail operation, conceptually:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
type ResumeTail = {
|
|
21
|
+
messages: Message[];
|
|
22
|
+
pendingApprovals: ApprovalRequest[];
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
getConversationResumeTail(agentId: string, conversationId: string, limit: number): Promise<ResumeTail>;
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- API backend: uses bounded conversation message APIs and any required conversation metadata lookup.
|
|
29
|
+
- Local backend: reads only the active conversation transcript tail from local storage.
|
|
30
|
+
- Selectors/search may enumerate conversations; normal boot must not.
|
|
31
|
+
|
|
32
|
+
## Decisions
|
|
33
|
+
|
|
34
|
+
- Tail size should be small and bounded. Start with the existing visual target: enough for recent context, not hundreds of raw messages.
|
|
35
|
+
- Pending approval is determined by unresolved approval/tool-call state in the tail: approval request exists and no matching tool result/approval response follows it.
|
|
36
|
+
- The UI should not become `ready` and then do an expensive post-ready transcript replay.
|
|
37
|
+
- The local fast path must not call APIs that rebuild global message indexes or scan unrelated conversations.
|
|
38
|
+
- Keep existing hosted/API semantics, but route them through the same tail contract.
|
|
39
|
+
|
|
40
|
+
## Non-goals
|
|
41
|
+
|
|
42
|
+
- Do not change default resume semantics.
|
|
43
|
+
- Do not change conversation selectors/search behavior except to keep enumeration out of boot.
|
|
44
|
+
- Do not rewrite the transcript storage format in this PR.
|