type ThreadContextRawEvent = { sequence: number; raw_payload: unknown; received_at: string; }; export type ThreadContextProgressStatus = 'pending' | 'in_progress' | 'completed'; export type ThreadContextProgressItem = { title: string; status: ThreadContextProgressStatus; }; export type ThreadContextChangedFile = { path: string; additions?: number; deletions?: number; status?: string; diff?: string; }; export type ThreadContextExecutionItem = { id: string; type: string; title: string; status: ThreadContextProgressStatus; detail?: string; }; export type ThreadContextArtifact = { path: string; displayName: string; source: 'app-server' | 'chat'; }; export type ThreadContextBrowser = { title?: string; url?: string; }; export type ThreadContextSource = { type: 'file' | 'url' | 'github' | 'unknown'; label: string; value?: string; }; export type ThreadContextWindowUsage = { usedTokens?: number; totalTokens?: number; cumulativeTokens?: number; }; export type ThreadContext = { version: 1; threadId: string; updatedAt?: string; progress: ThreadContextProgressItem[]; environment: { computerId?: string; workspace?: string | null; branch?: string | null; sandbox?: string | null; approvalMode?: string | null; model?: string | null; }; changes: { additions: number; deletions: number; files: ThreadContextChangedFile[]; }; execution: { currentItem?: ThreadContextExecutionItem; items: ThreadContextExecutionItem[]; compacting?: boolean; }; browser: ThreadContextBrowser[]; sources: ThreadContextSource[]; artifacts: ThreadContextArtifact[]; contextWindowUsage?: ThreadContextWindowUsage; }; export declare function buildThreadContextFromEvents(input: { threadId: string; events: ThreadContextRawEvent[]; computerId?: string | null; workspace?: string | null; }): ThreadContext; export declare function readThreadContext(input: { threadId: string; computerId?: string | null; workspace?: string | null; }): ThreadContext; export declare function attachThreadContextToChunk(chunk: Record, context: ThreadContext): Record; export {}; //# sourceMappingURL=thread-context.d.ts.map