UNPKG

@notbnull/mcp-cursor-taskmaster

Version:

A project-scoped MCP server requiring explicit --project-dir configuration for task management, memory retrieval, and agentic workflows

82 lines 2.46 kB
import { TaskStore, Task } from "./task-store.js"; import { MemoryStore } from "./memory-store.js"; export interface WorkflowConfig { pauseAfterEachTask: boolean; pauseOnError: boolean; maxRetries: number; checkpointFrequency: "never" | "task" | "subtask" | "error"; requireApproval: boolean; } export interface ExecutionContext { promptId: string; taskId: string; retryCount: number; userApprovalRequired: boolean; checkpointData: Record<string, any>; } export declare class WorkflowEngine { private taskStore; private memoryStore; private config; constructor(taskStore: TaskStore, memoryStore: MemoryStore, config?: Partial<WorkflowConfig>); /** * Parse a user prompt and generate a hierarchical task structure */ parsePromptToTasks(query: string, title?: string, description?: string): Promise<{ promptId: string; taskIds: string[]; }>; /** * Create a task from a query (simplified implementation) */ private createTaskFromQuery; /** * Request user approval for a set of tasks */ requestUserApproval(taskIds: string[]): Promise<{ approved: boolean; modifiedTasks?: string[]; userFeedback?: string; }>; /** * Execute a workflow from a prompt */ executeWorkflow(promptId: string): Promise<{ success: boolean; completedTasks: string[]; failedTasks: string[]; pausedAt?: string; needsUserInput?: boolean; }>; /** * Execute a task and its children hierarchically */ executeTaskHierarchy(taskId: string): Promise<{ success: boolean; completedTasks: string[]; failedTasks: string[]; error?: string; }>; /** * Execute a single task (placeholder implementation) */ private executeTask; /** * Approve a task for execution */ approveTask(taskId: string, userFeedback?: string): Promise<boolean>; /** * Reject a task and optionally provide modifications */ rejectTask(taskId: string, userFeedback?: string, modifications?: Partial<Task>): Promise<boolean>; /** * Resume workflow execution from a checkpoint */ resumeWorkflow(): Promise<{ success: boolean; resumedFromTaskId?: string; completedTasks: string[]; failedTasks: string[]; }>; } //# sourceMappingURL=workflow-engine.d.ts.map