UNPKG

orchestry-mcp

Version:

Orchestry MCP Server for multi-session task management

246 lines (223 loc) 5.29 kB
// Orchestry - Multi-session project task management types export enum TaskStatus { BACKLOG = 'backlog', TODO = 'todo', IN_PROGRESS = 'in_progress', REVIEW = 'review', DONE = 'done', BLOCKED = 'blocked' } export type Priority = 'critical' | 'high' | 'medium' | 'low'; export enum PriorityLevel { CRITICAL = 'critical', HIGH = 'high', MEDIUM = 'medium', LOW = 'low' } export enum DocumentType { REQUIREMENT = 'requirement', TECHNICAL_SPEC = 'technical_spec', DESIGN = 'design', MEETING_NOTES = 'meeting_notes', ANALYSIS = 'analysis', REPORT = 'report', DOCUMENTATION = 'documentation' } // Main Project type export interface Project { id: string; name: string; description: string; sessionId?: string; // For multi-session support llmContext?: string; // LLM-specific context createdAt: Date; updatedAt: Date; workspaces: Workspace[]; tags: string[]; team: TeamMember[]; } // Workspace - Logical grouping of related tasks export interface Workspace { id: string; projectId: string; name: string; description: string; color?: string; // For UI visualization icon?: string; // Optional icon identifier goals: Goal[]; createdAt: Date; updatedAt: Date; } // Goal - High-level objectives export interface Goal { id: string; workspaceId: string; title: string; description: string; targetDate?: Date; priority: Priority; successCriteria: string[]; tasks: Task[]; documents: Document[]; createdAt: Date; updatedAt: Date; } // Task - Actual work items export interface Task { id: string; goalId: string; parentTaskId?: string; // For subtasks title: string; description: string; status: TaskStatus; priority: Priority; assignee?: TeamMember; dueDate?: Date; startDate?: Date; completedDate?: Date; estimatedHours?: number; actualHours?: number; checklist: ChecklistItem[]; dependencies: string[]; // Other task IDs comments: Comment[]; attachments: Attachment[]; tags: string[]; sessionNotes?: string; // Notes from different sessions llmSuggestions?: string[]; // AI-generated suggestions subtasks?: Task[]; // Child tasks createdAt: Date; updatedAt: Date; } // Supporting types export interface Document { id: string; entityId: string; // Can belong to Project, Workspace, Goal, or Task entityType: 'project' | 'workspace' | 'goal' | 'task'; type: DocumentType; title: string; content: string; // Markdown content url?: string; // External document link version: number; author: TeamMember; createdAt: Date; updatedAt: Date; revisions: DocumentRevision[]; } export interface DocumentRevision { version: number; content: string; author: TeamMember; changeLog: string; createdAt: Date; } export interface ChecklistItem { id: string; text: string; completed: boolean; completedBy?: TeamMember; completedAt?: Date; } export interface Comment { id: string; author: TeamMember; content: string; createdAt: Date; updatedAt?: Date; mentions?: string[]; // Mentioned user IDs sessionId?: string; // Which session created this } export interface Attachment { id: string; name: string; url: string; type: string; size: number; uploadedBy: TeamMember; uploadedAt: Date; } export interface TeamMember { id: string; name: string; email: string; role: string; avatar?: string; isBot?: boolean; // For LLM agents } // Session management export interface Session { id: string; projectId: string; name: string; type: 'human' | 'llm' | 'hybrid'; llmModel?: string; // e.g., 'claude-3', 'gpt-4' context?: string; // Session-specific context isActive: boolean; startedAt: Date; lastActivityAt: Date; endedAt?: Date; } // API Response types export interface ApiResponse<T> { success: boolean; data?: T; error?: string; timestamp: Date; } // Kanban board view types export interface KanbanColumn { id: TaskStatus; title: string; items: Task[]; limit?: number; // WIP limit } export interface ProjectBoard { projectId: string; columns: KanbanColumn[]; filters: BoardFilter; } export interface BoardFilter { workspaceId?: string; goalId?: string; assignee?: string; priority?: Priority; tags?: string[]; search?: string; dateRange?: { start: Date; end: Date; }; sessionId?: string; } // WebSocket event types export interface WSEvent { type: 'create' | 'update' | 'delete' | 'move'; entity: 'project' | 'workspace' | 'goal' | 'task' | 'document' | 'comment'; data: any; userId: string; sessionId?: string; timestamp: Date; } // Analytics types export interface ProjectStats { totalWorkspaces: number; totalGoals: number; totalTasks: number; completedTasks: number; inProgressTasks: number; overdueTasks: number; totalSessions: number; activeSessions: number; } // MCP Tool-specific types export interface ToolContext { projectId: string; sessionId: string; userId: string; timestamp: Date; } export interface ToolResult { success: boolean; data?: any; error?: string; affectedEntities?: string[]; }