@ellipsis-dev/sdk 0.27.0 → 0.30.0

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.
@@ -1,4 +1,15 @@
1
- import { W as SessionRecord, a7 as CodexFileChangeItem, a as CodexEvent, a8 as CodexMcpToolCallItem, w as SdkRecord, J as Session, Q as SessionMessage, a4 as StreamFrame } from '../types-ClEF_IA9.js';
1
+ import { q as CodexAgentMessage, cz as SessionRecord, c1 as Session, K as CodexFileChangeItem, I as CodexEvent, X as CodexMcpToolCallItem, bQ as SdkRecord, ct as SessionMessage, cW as StreamFrame } from '../types-DrPhhfOb.js';
2
+
3
+ type WorkPhase = 'queued' | 'waking' | 'starting' | 'working';
4
+ interface TurnTiming {
5
+ id: string;
6
+ startedAt: string | null;
7
+ completedAt: string | null;
8
+ }
9
+ interface MessageProgress {
10
+ phase: WorkPhase | null;
11
+ turns: TurnTiming[];
12
+ }
2
13
 
3
14
  interface ChatToolNode {
4
15
  key: string;
@@ -7,6 +18,7 @@ interface ChatToolNode {
7
18
  input: Record<string, unknown> | null;
8
19
  summary: string;
9
20
  result: string | null;
21
+ resultDetails?: unknown;
10
22
  isError: boolean;
11
23
  startedAt: string | null;
12
24
  completedAt: string | null;
@@ -15,10 +27,13 @@ type ChatNode = {
15
27
  key: string;
16
28
  kind: 'assistant';
17
29
  text: string;
30
+ createdAt?: string;
31
+ phase?: CodexAgentMessage['phase'];
18
32
  } | {
19
33
  key: string;
20
34
  kind: 'thinking';
21
35
  text: string;
36
+ createdAt?: string;
22
37
  } | {
23
38
  key: string;
24
39
  kind: 'user';
@@ -34,6 +49,8 @@ type ChatNode = {
34
49
  } | ChatToolNode;
35
50
  interface ChatTurn {
36
51
  key: string;
52
+ messageId?: string;
53
+ turnId?: string;
37
54
  role: 'assistant' | 'user' | 'lifecycle';
38
55
  nodes: ChatNode[];
39
56
  startedAt: string | null;
@@ -43,8 +60,19 @@ interface ChatTurn {
43
60
  tokens: number | null;
44
61
  resumed: boolean;
45
62
  isError: boolean;
63
+ progress?: MessageProgress;
46
64
  }
47
- declare function groupRecordsToChatTurns(records: readonly SessionRecord[]): ChatTurn[];
65
+ declare function groupRecordsToChatTurns(records: readonly SessionRecord[], session?: {
66
+ claude_code?: {
67
+ prompt?: string | null;
68
+ } | null;
69
+ codex?: {
70
+ prompt?: string | null;
71
+ } | null;
72
+ lifecycle: {
73
+ timestamps: Pick<Session['lifecycle']['timestamps'], 'created_at'>;
74
+ };
75
+ } | null): ChatTurn[];
48
76
 
49
77
  type RecordSlice = {
50
78
  feed_seq: number;
@@ -91,6 +119,7 @@ interface TranscriptItem {
91
119
  key: string;
92
120
  kind: ItemKind;
93
121
  text: string;
122
+ createdAt?: string | null;
94
123
  detail?: string;
95
124
  gutter?: string;
96
125
  spaceBefore?: boolean;
@@ -100,6 +129,7 @@ interface TranscriptItem {
100
129
  input?: Record<string, unknown>;
101
130
  };
102
131
  loading?: boolean;
132
+ summary?: boolean;
103
133
  }
104
134
  declare function oneLine(text: string, max: number): string;
105
135
  declare function summarizeToolInput(name: string, input: unknown): string;
@@ -154,8 +184,10 @@ declare function toolRunMembers(items: readonly TranscriptItem[]): Map<string, T
154
184
  interface LedgerEntry {
155
185
  key: string;
156
186
  prompt: string;
187
+ createdAt?: string | null;
157
188
  cancelled: boolean;
158
189
  turns: ChatTurn[];
190
+ progress?: MessageProgress;
159
191
  }
160
192
  declare function splitLedger(turns: readonly ChatTurn[]): {
161
193
  preamble: ChatTurn[];
@@ -165,13 +197,25 @@ declare function entrySeconds(entry: LedgerEntry, now: number): number;
165
197
  type EntryBody = {
166
198
  items: TranscriptItem[];
167
199
  members: Map<string, TranscriptItem[]>;
200
+ seconds: number | null;
168
201
  };
169
- declare function entryBody(entry: LedgerEntry, { live, now, liveText, }: {
202
+ declare function isWorkFold(item: TranscriptItem): boolean;
203
+ declare function reasoningSummaryTitle(summary: string): string;
204
+ declare function entryBody(entry: LedgerEntry, { live, now, liveText, liveSummary, }: {
170
205
  live: boolean;
171
206
  now: number;
172
207
  liveText?: string;
208
+ liveSummary?: string;
173
209
  }): EntryBody;
174
210
 
211
+ interface ToolActivity {
212
+ kind: 'read' | 'search' | 'list' | 'edit' | 'command' | 'web' | 'tool';
213
+ label: string;
214
+ detail: string;
215
+ }
216
+ declare function toolActivities(item: TranscriptItem): ToolActivity[];
217
+ declare function activitySummary(activities: readonly ToolActivity[]): string;
218
+
175
219
  declare function sandboxOutputStep(payload: Record<string, unknown>): string;
176
220
  declare function sandboxOutputLines(payload: Record<string, unknown>): string[];
177
221
  declare function sandboxOutputLine(payload: Record<string, unknown>): string | null;
@@ -179,6 +223,8 @@ declare function cacheTierLabel(tier: unknown): string | null;
179
223
  declare function sandboxPhaseLabel(phase: unknown): string;
180
224
  declare function lifecycleText(recordType: string, payload: Record<string, unknown>): string | null;
181
225
 
226
+ declare function claudePayload(record: SessionRecord): SdkRecord | null;
227
+
182
228
  declare function isConversationOver(session: Session): boolean;
183
229
  interface SessionTranscriptSnapshot {
184
230
  session: Session | null;
@@ -187,6 +233,7 @@ interface SessionTranscriptSnapshot {
187
233
  acknowledgedMessageIds: ReadonlySet<string>;
188
234
  historyTruncated: boolean;
189
235
  liveText: string;
236
+ liveSummary: string;
190
237
  liveOutputTokens: number | null;
191
238
  lastEventAt: number | null;
192
239
  conversationOver: boolean;
@@ -205,7 +252,10 @@ declare class SessionTranscriptStore {
205
252
  private inbox;
206
253
  private cursorSeq;
207
254
  private turnsFor;
255
+ private turnsSession;
208
256
  private turnsCache;
257
+ private summaryTurnId;
258
+ private summaryExecutionId;
209
259
  get cursor(): number;
210
260
  subscribe: (listener: () => void) => (() => void);
211
261
  getSnapshot: () => SessionTranscriptSnapshot;
@@ -215,4 +265,4 @@ declare class SessionTranscriptStore {
215
265
  ingest: (rawFrame: StreamFrame) => void;
216
266
  }
217
267
 
218
- export { BRANCH_GLYPH, type ChatNode, type ChatToolNode, type ChatTurn, type EntryBody, type EventToItemsOptions, type ItemKind, LIVE_GLYPH, type LedgerEntry, type PlacedItem, type RecordSlice, SESSION_WAKING, type SandboxLogKind, type SandboxLogLine, type SandboxState, type SessionTranscriptSnapshot, SessionTranscriptStore, StreamFrame, type TranscriptItem, USER_BAR, awaitingAgentPhase, cacheTierLabel, chatTurnsToItems, clampLines, codexChangedPaths, codexEventToItems, codexMcpToolName, collapseToolRuns, deliveredUnechoedSends, deriveSandboxState, emptySessionTranscriptSnapshot, entryBody, entrySeconds, eventToItems, foldCosts, foldGutter, foldRun, formatDuration, groupRecordsToChatTurns, gutterFor, hookPhrase, humanDuration, isConnectVisibleRecord, isConversationOver, isFoldable, isToolActivity, isToolFold, lastLines, layOutItems, lifecycleText, oneLine, pendingToolCalls, recordSlice, recordToItems, resultCostUsd, sandboxOutputLine, sandboxOutputLines, sandboxOutputStep, sandboxPhaseLabel, sandboxSummary, seedTranscriptStore, sessionLogText, splitLedger, startupHeadline, startupSettled, statusActivityText, summarizeToolInput, tailLines, toolResultText, toolRunMembers };
268
+ export { BRANCH_GLYPH, type ChatNode, type ChatToolNode, type ChatTurn, type EntryBody, type EventToItemsOptions, type ItemKind, LIVE_GLYPH, type LedgerEntry, type MessageProgress, type PlacedItem, type RecordSlice, SESSION_WAKING, type SandboxLogKind, type SandboxLogLine, type SandboxState, type SessionTranscriptSnapshot, SessionTranscriptStore, StreamFrame, type ToolActivity, type TranscriptItem, type TurnTiming, USER_BAR, type WorkPhase, activitySummary, awaitingAgentPhase, cacheTierLabel, chatTurnsToItems, clampLines, claudePayload, codexChangedPaths, codexEventToItems, codexMcpToolName, collapseToolRuns, deliveredUnechoedSends, deriveSandboxState, emptySessionTranscriptSnapshot, entryBody, entrySeconds, eventToItems, foldCosts, foldGutter, foldRun, formatDuration, groupRecordsToChatTurns, gutterFor, hookPhrase, humanDuration, isConnectVisibleRecord, isConversationOver, isFoldable, isToolActivity, isToolFold, isWorkFold, lastLines, layOutItems, lifecycleText, oneLine, pendingToolCalls, reasoningSummaryTitle, recordSlice, recordToItems, resultCostUsd, sandboxOutputLine, sandboxOutputLines, sandboxOutputStep, sandboxPhaseLabel, sandboxSummary, seedTranscriptStore, sessionLogText, splitLedger, startupHeadline, startupSettled, statusActivityText, summarizeToolInput, tailLines, toolActivities, toolResultText, toolRunMembers };