@ellipsis-dev/sdk 0.14.0 → 0.15.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.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { c as components } from './types-egqnpL5C.js';
2
- export { A as AgentConfigSource, a as AttributionType, B as BudgetSource, C as CreateReviewRequest, D as DeltaFrame, b as DoneFrame, E as ErrorFrame, F as Finding, G as GithubAccountSnippet, d as GithubAccountType, H as Harness, e as HeartbeatFrame, P as ParentKind, f as PromptBlockedReason, R as RecordsAppendFrame, g as ResolvedReviewScope, h as Review, i as ReviewConfiguration, j as ReviewCounters, k as ReviewFinding, l as ReviewRequester, m as ReviewScope, n as ReviewScopeKind, o as ReviewStage, p as ReviewedCommit, q as ReviewsListResponse, S as SendSessionMessageRequest, r as Session, s as SessionExecution, t as SessionExecutionsListResponse, u as SessionExitStatus, v as SessionFrame, w as SessionLiveness, x as SessionMessage, y as SessionMessageResponse, z as SessionMessageStatus, I as SessionPr, J as SessionPrompting, K as SessionRecord, L as SessionRecordsListResponse, M as SessionResponse, N as SessionSource, O as SessionState, Q as SessionStatus, T as SessionStreamFrame, U as SessionSurface, V as SessionsListResponse, W as SnapshotFrame, X as StreamFrame, Y as TokensInfo, Z as paths } from './types-egqnpL5C.js';
1
+ import { c as components } from './types-DtVn9Yj3.js';
2
+ export { A as AgentConfigSource, a as AttributionType, B as BudgetSource, C as ClaudeSessionRecord, b as CodexEvent, d as CodexItem, e as CodexSessionRecord, f as CreateReviewRequest, D as DeltaFrame, g as DoneFrame, E as ErrorFrame, F as Finding, G as GithubAccountSnippet, h as GithubAccountType, H as Harness, i as HeartbeatFrame, L as LifecycleSessionRecord, P as ParentKind, j as PromptBlockedReason, R as RecordsAppendFrame, k as ResolvedReviewScope, l as Review, m as ReviewConfiguration, n as ReviewCounters, o as ReviewFinding, p as ReviewRequester, q as ReviewScope, r as ReviewScopeKind, s as ReviewStage, t as ReviewedCommit, u as ReviewsListResponse, S as SdkAssistantRecord, v as SdkContentBlock, w as SdkRateLimitRecord, x as SdkRecord, y as SdkResultRecord, z as SdkSystemRecord, I as SdkUserRecord, J as SendSessionMessageRequest, K as Session, M as SessionExecution, N as SessionExecutionsListResponse, O as SessionExitStatus, Q as SessionFrame, T as SessionLiveness, U as SessionMessage, V as SessionMessageResponse, W as SessionMessageStatus, X as SessionPr, Y as SessionPrompting, Z as SessionRecord, _ as SessionRecordsListResponse, $ as SessionResponse, a0 as SessionSource, a1 as SessionState, a2 as SessionStatus, a3 as SessionStreamFrame, a4 as SessionSurface, a5 as SessionsListResponse, a6 as SnapshotFrame, a7 as StreamFrame, a8 as TokensInfo, a9 as paths } from './types-DtVn9Yj3.js';
3
3
 
4
4
  interface CursorResponse {
5
5
  has_more: boolean;
@@ -777,7 +777,7 @@ declare class EllipsisSessions {
777
777
  records(session_id: string, options?: {
778
778
  cursor?: string | null;
779
779
  limit?: number | null;
780
- }): Promise<Page<S['SessionRecord'], S['SessionRecordsListResponse']>>;
780
+ }): Promise<Page<S['ClaudeSessionRecord'] | S['CodexSessionRecord'] | S['LifecycleSessionRecord'], S['SessionRecordsListResponse']>>;
781
781
  /**
782
782
  * Replay Agent Session
783
783
  *
@@ -1,4 +1,4 @@
1
- import { K as SessionRecord, r as Session, x as SessionMessage, X as StreamFrame } from '../types-egqnpL5C.js';
1
+ import { Z as SessionRecord, aa as CodexFileChangeItem, b as CodexEvent, ab as CodexMcpToolCallItem, x as SdkRecord, K as Session, U as SessionMessage, a7 as StreamFrame } from '../types-DtVn9Yj3.js';
2
2
 
3
3
  interface ChatToolNode {
4
4
  key: string;
@@ -52,34 +52,6 @@ declare function cacheTierLabel(tier: unknown): string | null;
52
52
  declare function sandboxPhaseLabel(phase: unknown): string;
53
53
  declare function lifecycleText(recordType: string, payload: Record<string, unknown>): string | null;
54
54
 
55
- interface CCContentBlock {
56
- type?: string;
57
- text?: string;
58
- thinking?: string;
59
- id?: string;
60
- name?: string;
61
- input?: Record<string, unknown>;
62
- content?: unknown;
63
- tool_use_id?: string;
64
- is_error?: boolean;
65
- }
66
- interface CCEvent {
67
- type?: string;
68
- subtype?: string;
69
- message?: {
70
- role?: string;
71
- content?: unknown;
72
- };
73
- result?: string;
74
- duration_ms?: number;
75
- total_cost_usd?: number;
76
- num_turns?: number;
77
- is_error?: boolean;
78
- model?: string;
79
- cwd?: string;
80
- tools?: string[];
81
- [key: string]: unknown;
82
- }
83
55
  type ItemKind = 'assistant' | 'thinking' | 'tool' | 'tool_result' | 'summary' | 'system' | 'user' | 'notice' | 'error';
84
56
  interface TranscriptItem {
85
57
  key: string;
@@ -94,19 +66,17 @@ interface TranscriptItem {
94
66
  input?: Record<string, unknown>;
95
67
  };
96
68
  }
97
- declare class LineBuffer {
98
- private buf;
99
- push(chunk: string): string[];
100
- flush(): string[];
101
- }
102
- declare function parseEventLine(line: string): CCEvent | null;
103
69
  declare function oneLine(text: string, max: number): string;
104
70
  declare function summarizeToolInput(name: string, input: unknown): string;
105
71
  declare function formatDuration(seconds: number): string;
72
+ declare function toolResultText(content: string | Record<string, unknown>[] | null): string;
106
73
  interface EventToItemsOptions {
107
74
  systemInitLine?: boolean;
108
75
  }
109
- declare function eventToItems(event: CCEvent, keyBase: string, options?: EventToItemsOptions): TranscriptItem[];
76
+ declare function eventToItems(event: SdkRecord, keyBase: string, options?: EventToItemsOptions): TranscriptItem[];
77
+ declare function codexEventToItems(event: CodexEvent, keyBase: string): TranscriptItem[];
78
+ declare function codexChangedPaths(item: CodexFileChangeItem): string[];
79
+ declare function codexMcpToolName(item: CodexMcpToolCallItem): string;
110
80
  declare function recordToItems(record: SessionRecord, keyBase: string, options?: EventToItemsOptions): TranscriptItem[];
111
81
  declare function isConnectVisibleRecord(record: SessionRecord): boolean;
112
82
  declare function pendingToolCalls(items: TranscriptItem[]): TranscriptItem[];
@@ -115,8 +85,8 @@ declare function clampLines(text: string, maxLines: number): {
115
85
  body: string;
116
86
  more: number;
117
87
  };
118
- declare function resultCostUsd(event: CCEvent): number | null;
119
- declare function foldCosts(events: CCEvent[]): {
88
+ declare function resultCostUsd(event: SdkRecord): number | null;
89
+ declare function foldCosts(events: SdkRecord[]): {
120
90
  total: number | null;
121
91
  lastStep: number | null;
122
92
  };
@@ -152,4 +122,4 @@ declare class SessionTranscriptStore {
152
122
  ingest: (rawFrame: StreamFrame) => void;
153
123
  }
154
124
 
155
- export { type CCContentBlock, type CCEvent, type ChatNode, type ChatToolNode, type ChatTurn, type EventToItemsOptions, type ItemKind, LineBuffer, type SessionTranscriptSnapshot, SessionTranscriptStore, StreamFrame, type TranscriptItem, cacheTierLabel, clampLines, collapseToolRuns, emptySessionTranscriptSnapshot, eventToItems, foldCosts, formatDuration, groupRecordsToChatTurns, isConnectVisibleRecord, isConversationOver, lifecycleText, oneLine, parseEventLine, pendingToolCalls, recordToItems, resultCostUsd, sandboxOutputLine, sandboxOutputLines, sandboxOutputStep, sandboxPhaseLabel, statusActivityText, summarizeToolInput };
125
+ export { type ChatNode, type ChatToolNode, type ChatTurn, type EventToItemsOptions, type ItemKind, type SessionTranscriptSnapshot, SessionTranscriptStore, StreamFrame, type TranscriptItem, cacheTierLabel, clampLines, codexChangedPaths, codexEventToItems, codexMcpToolName, collapseToolRuns, emptySessionTranscriptSnapshot, eventToItems, foldCosts, formatDuration, groupRecordsToChatTurns, isConnectVisibleRecord, isConversationOver, lifecycleText, oneLine, pendingToolCalls, recordToItems, resultCostUsd, sandboxOutputLine, sandboxOutputLines, sandboxOutputStep, sandboxPhaseLabel, statusActivityText, summarizeToolInput, toolResultText };