@ellipsis-dev/sdk 0.28.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 { cp as SessionRecord, L as CodexFileChangeItem, J as CodexEvent, Y as CodexMcpToolCallItem, bK as SdkRecord, bW as Session, cj as SessionMessage, cO as StreamFrame } from '../types-B-jIFh4_.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;
@@ -155,8 +184,10 @@ declare function toolRunMembers(items: readonly TranscriptItem[]): Map<string, T
155
184
  interface LedgerEntry {
156
185
  key: string;
157
186
  prompt: string;
187
+ createdAt?: string | null;
158
188
  cancelled: boolean;
159
189
  turns: ChatTurn[];
190
+ progress?: MessageProgress;
160
191
  }
161
192
  declare function splitLedger(turns: readonly ChatTurn[]): {
162
193
  preamble: ChatTurn[];
@@ -166,13 +197,25 @@ declare function entrySeconds(entry: LedgerEntry, now: number): number;
166
197
  type EntryBody = {
167
198
  items: TranscriptItem[];
168
199
  members: Map<string, TranscriptItem[]>;
200
+ seconds: number | null;
169
201
  };
170
- 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, }: {
171
205
  live: boolean;
172
206
  now: number;
173
207
  liveText?: string;
208
+ liveSummary?: string;
174
209
  }): EntryBody;
175
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
+
176
219
  declare function sandboxOutputStep(payload: Record<string, unknown>): string;
177
220
  declare function sandboxOutputLines(payload: Record<string, unknown>): string[];
178
221
  declare function sandboxOutputLine(payload: Record<string, unknown>): string | null;
@@ -190,6 +233,7 @@ interface SessionTranscriptSnapshot {
190
233
  acknowledgedMessageIds: ReadonlySet<string>;
191
234
  historyTruncated: boolean;
192
235
  liveText: string;
236
+ liveSummary: string;
193
237
  liveOutputTokens: number | null;
194
238
  lastEventAt: number | null;
195
239
  conversationOver: boolean;
@@ -208,7 +252,10 @@ declare class SessionTranscriptStore {
208
252
  private inbox;
209
253
  private cursorSeq;
210
254
  private turnsFor;
255
+ private turnsSession;
211
256
  private turnsCache;
257
+ private summaryTurnId;
258
+ private summaryExecutionId;
212
259
  get cursor(): number;
213
260
  subscribe: (listener: () => void) => (() => void);
214
261
  getSnapshot: () => SessionTranscriptSnapshot;
@@ -218,4 +265,4 @@ declare class SessionTranscriptStore {
218
265
  ingest: (rawFrame: StreamFrame) => void;
219
266
  }
220
267
 
221
- 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, claudePayload, 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 };