/** * Task Update Service - Centralized task update logic * * REFACTORED: Extracted from TaskManager.updateTask() for Phase 4. * Handles task updates, queue management, file sync, and context injection. * * @internal * @requirement REFACTOR-EXTRACT-TASK-CRUD-SERVICES - Phase 4: Extract Task CRUD Services */ import type { Task } from '@shadel/workflow-core'; import { TaskQueueManager } from './task-queue.js'; import { ContextInjector } from './context-injector.js'; import { RuleManager } from '../utils/rule-manager.js'; import { TaskMigration } from '../utils/migration.js'; /** * Task update options */ export interface TaskUpdateOptions { goal?: string; addReq?: string; } /** * Task Update Service * * Centralizes task update logic with queue management, file sync, and context injection. */ export declare class TaskUpdateService { private queueManager; private contextInjector; private ruleManager; private migration; private taskFile; private migrationChecked; private getCurrentTask; private syncFileFromQueue; constructor(queueManager: TaskQueueManager, contextInjector: ContextInjector, ruleManager: RuleManager, migration: TaskMigration, taskFile: string, getCurrentTaskFn: () => Promise, syncFileFromQueueFn: (queueTask: any, preserveFields: string[]) => Promise); /** * Check and run migration if needed (only once per instance) */ private ensureMigration; /** * Update task details * * @requirement REQ-V2-003 - Task update (NEW v2.0) * * @param taskId Task ID to update * @param updates Update options (goal, addReq) * @throws Error if task not found or not active */ updateTask(taskId: string, updates: TaskUpdateOptions): Promise; }