UNPKG

@gonzui/claude-task-manager

Version:

Task management extension for Claude Code with archiving and history

83 lines 3.31 kB
import { TaskOptions, TaskHistoryItem, TaskListItem, TaskStatus, ExecutionResult } from '../types'; import { Language } from './i18n'; import { ProgressResult } from './ProgressTracker'; import { SplitResult } from './TaskSplitter'; export declare class TaskManager { private config; private i18n; private configManager; private taskFileManager; private claudeExecutor; private historyManager; private customCommandGenerator; private progressTracker; private taskSplitter; private taskStore; constructor(workingDir?: string); /** * Find the project root by looking for .claude-tasks directory */ private findProjectRoot; init(options?: { hooks?: boolean; }): Promise<void>; createNewTask(options?: TaskOptions): Promise<string>; private createTaskFile; archiveCurrentTask(): Promise<string | null>; /** Name of the active task, or null in single-task (legacy) mode. */ getActiveTaskName(): Promise<string | null>; isMultiTaskMode(): Promise<boolean>; /** * Turn on multi-task mode, migrating a legacy project transparently: the * existing task.md becomes a stored task named after its title. Returns the * active task name (null only when there is no task at all yet). */ private enableMultiTaskMode; private setActiveTaskName; /** * Make `name` the active task: the current task.md is written back to its own * snapshot first, so no in-progress state is lost. With `create`, an unknown * name is created from the task template instead of failing. */ switchTask(name: string, options?: { create?: boolean; }): Promise<{ name: string; previous: string | null; created: boolean; }>; /** * All known tasks with their progress. In single-task mode this is the * current task.md alone, listed under the name it would migrate to. */ listTasks(): Promise<TaskListItem[]>; runTask(verbose?: boolean, debug?: boolean, editPermission?: boolean): Promise<ExecutionResult>; recordExecution(result: ExecutionResult): Promise<void>; getHistory(limit?: number): Promise<TaskHistoryItem[]>; getStatus(): Promise<TaskStatus>; getTaskContent(): Promise<string>; getLanguage(): Promise<Language>; /** * Synchronous language lookup for early startup (e.g. localizing --help). * Falls back to the environment-detected language when no config is present. */ getLanguageSync(): Language; setLanguage(lang: Language): Promise<void>; getProgress(): Promise<ProgressResult>; /** * One-line status for embedding in a statusline (e.g. Claude Code's * `statusLine` setting): `<title> ▸ <pct>%`, title only when the task has * no subtasks, or a localized "no task" marker. In multi-task mode the * active task name is prefixed as `[<name>]`. */ getShortStatus(): Promise<string>; formatProgress(result: ProgressResult): string; setTaskCompletion(indices: number[], completed: boolean): Promise<{ updated: number[]; invalid: number[]; result: ProgressResult; }>; splitTask(count?: number): Promise<SplitResult>; private updateGitignore; } //# sourceMappingURL=TaskManager.d.ts.map