/** * Project Mind MCP - Core Type Definitions * * These types define the contract for all operations. * Foundation-first: Get types right, implementation follows. */ export interface Project { id: string; name: string; path: string; config: ProjectConfig; createdAt: string; updatedAt: string; } export interface ProjectConfig { /** Backlog configuration */ backlog?: { indexPath: string; overviewPath: string; epicsDir: string; }; /** File scanning configuration */ fileScanning?: { enabled: boolean; mode: 'manual' | 'auto' | 'watcher'; excludes: string[]; }; /** Git integration */ git?: { enabled: boolean; autoCommit: boolean; messageTemplate: string; }; /** Custom project-specific settings */ custom?: Record; } export interface SessionState { sessionId: string; projectId: string; currentTask: CurrentTask; context: SessionContext; updatedAt: string; } export interface CurrentTask { epic: number | undefined; operation: string; progress: number; startTime: string; decisions: string[]; nextSteps: string[]; } export interface SessionContext { activeFiles: string[]; recentCommits: string[]; knowledgeUsed: string[]; } export interface ContinuationPrompt { prompt: string; summary: { lastAction: string; progress: number; nextSteps: string[]; blockers: string[]; }; } export interface FileReadResult { path: string; content: string; size: number; encoding: string; } export interface FileWriteResult { path: string; size: number; success: boolean; } export interface FileSearchResult { path: string; matches: FileMatch[]; } export interface FileMatch { line: number; content: string; context?: string; } export interface BatchReadResult { files: FileReadResult[]; errors: Array<{ path: string; error: string; }>; } export type JobStatus = 'queued' | 'running' | 'complete' | 'failed' | 'cancelled'; export interface Job { id: number; projectId: string; operation: string; parameters: Record; status: JobStatus; progress: number; currentStep: string | undefined; result: unknown | undefined; error: string | undefined; createdAt: string; updatedAt: string; } export interface JobProgress { jobId: number; status: JobStatus; progress: number; currentStep: string; results?: unknown; error?: string; heartbeat: string; } export interface Pattern { id: number; name: string; projectId: string; problem: string; solution: string; implementation?: string; metrics?: PatternMetrics; createdAt: string; } export interface PatternMetrics { before: Record; after: Record; improvement: string; } export interface PatternSuggestion { pattern: Pattern; originProject: string; problemSolved: string; implementation: string; confidence: number; effort: 'low' | 'medium' | 'high'; } export interface Epic { id: number; projectId: string; title: string; description?: string; status: string; priority: string; estimatedHours?: number; actualHours?: number; tags?: string[]; dependencies?: number[]; acceptanceCriteria?: string[]; specLocation?: string; createdAt: string; updatedAt: string; completedAt?: string; } export interface GitCommit { id: number; projectId: string; sessionId?: string; commitHash: string; message: string; filesChanged?: string[]; stats?: { additions: number; deletions: number; files: number; }; createdAt: string; } export interface Research { id: string; projectId: string; query: string; sections: unknown[]; sources?: unknown[]; keyFindings?: string[]; crossReferences?: unknown[]; createdAt: string; } export interface GetSessionStateInput { project: string; } export interface SaveSessionStateInput { project: string; currentTask: CurrentTask; context: SessionContext; } export interface GenerateContinuationInput { project: string; } export interface ReadFileInput { project: string; path: string; encoding?: string; } export interface WriteFileInput { project: string; path: string; content: string; encoding?: string; } export interface SearchFilesInput { project: string; pattern: string; path?: string; maxResults?: number; } export interface BatchReadInput { project: string; paths: string[]; } export interface RegisterProjectInput { id: string; name: string; path: string; config?: Partial; } export interface ListProjectsInput { } export interface GetProjectInput { project: string; } export interface ToolError { code: string; message: string; details?: Record; } export type ToolResult = { success: true; data: T; } | { success: false; error: ToolError; }; export interface ToolDefinition { name: string; description: string; inputSchema: { type: 'object'; properties: Record; required?: string[]; }; } export type ToolHandler = (input: TInput) => Promise; //# sourceMappingURL=index.d.ts.map