UNPKG

ccshare

Version:

Share Claude Code prompts and results easily

148 lines 3.72 kB
export interface SessionData { id?: string; timestamp: string; prompts: Prompt[]; changes: FileChange[]; thoughts?: ThoughtBlock[]; message?: string; metadata?: { claudeVersion?: string; platform?: string; workingDirectory?: string; claudeProjectPath?: string; models?: string[]; mcpServers?: MCPServer[]; nodeVersion?: string; claudeSettings?: { permissions?: string[]; model?: string; }; sessionStats?: { totalTokensUsed?: number; averageResponseTime?: number; totalToolCalls?: number; errorCount?: number; }; }; toolCalls?: ToolCall[]; assistantActions?: AssistantAction[]; toolExecutions?: ToolExecution[]; } export interface Prompt { role: 'user' | 'assistant'; content: string; timestamp: string; associatedFiles?: string[]; usage?: TokenUsage; responseTimeMs?: number; isAutoGenerated?: boolean; model?: string; toolCalls?: string[]; } export interface TokenUsage { input_tokens?: number; output_tokens?: number; cache_creation_input_tokens?: number; cache_read_input_tokens?: number; total_tokens?: number; } export interface FileChange { type: 'create' | 'edit' | 'delete'; path: string; content?: string; oldContent?: string; timestamp: string; diff?: string; structuredPatch?: any; } export interface ToolUseResult { filePath?: string; oldString?: string; newString?: string; originalFile?: string; structuredPatch?: any[]; userModified?: boolean; replaceAll?: boolean; edits?: Array<{ old_string: string; new_string: string; replace_all?: boolean; }>; originalFileContents?: string; } export interface ThoughtBlock { content: string; timestamp: string; } export interface ShareResponse { url: string; shareId: string; expiresAt?: string; } export interface ToolCall { name: string; timestamp: string; parameters?: any; isMCP?: boolean; } export interface MCPServer { name: string; tools: string[]; } export interface AssistantAction { type: 'explanation' | 'code_change' | 'file_read' | 'command_execution' | 'analysis'; description: string; timestamp: string; promptId?: string; details?: any; } export interface ToolExecution { tool: string; timestamp: string; parameters?: any; result?: string; status?: 'success' | 'error'; promptId?: string; fileChange?: { filePath: string; changeType: 'edit' | 'create' | 'delete'; diff?: string; oldContent?: string; newContent?: string; }; } export interface RawSessionEntry { parentUuid: string; uuid: string; type: string; timestamp: string; message?: any; toolUseResult?: any; [key: string]: any; } export interface RawSessionData { prompts: Array<{ userPrompt: RawSessionEntry; sessionEntries: RawSessionEntry[]; }>; metadata?: any; } export interface WorkflowItem { type: 'tool_execution' | 'tool_result' | 'assistant_action'; timestamp: string; tool?: string; parameters?: any; result?: string; status?: 'success' | 'error'; description?: string; actionType?: 'explanation' | 'code_change' | 'file_read' | 'command_execution' | 'analysis'; promptId?: string; fileChange?: { filePath: string; changeType: 'edit' | 'create' | 'delete'; diff?: string; oldContent?: string; newContent?: string; }; } //# sourceMappingURL=types.d.ts.map