@gonzui/claude-task-manager
Version:
Task management extension for Claude Code with archiving and history
47 lines • 2.03 kB
TypeScript
import { TaskListItem } from '../types';
import { I18n } from './i18n';
/**
* Storage for multiple named tasks.
*
* `task.md` stays the live file of the *active* task — every other manager
* keeps reading and writing exactly that path, unaware of names. This store
* owns the per-name snapshots under `.claude-tasks/tasks/<name>.md`, which are
* authoritative for the *inactive* tasks. Switching means: write the active
* task back to its snapshot, then copy the target snapshot over `task.md`.
*
* Copies rather than symlinks, deliberately: symlinks are unreliable on
* Windows. Multi-task mode is on iff the tasks directory exists, so projects
* that never switch behave exactly as they did before.
*/
export declare class TaskStore {
private tasksDir;
private taskFile;
private i18n;
constructor(tasksDir: string, taskFile: string, i18n: I18n);
isEnabled(): Promise<boolean>;
enable(): Promise<void>;
/**
* Normalize a user-supplied task name into a safe single path segment.
* Throws rather than silently mangling names that could escape the store.
*/
sanitizeName(name: string): string;
getTaskPath(name: string): string;
exists(name: string): Promise<boolean>;
listNames(): Promise<string[]>;
/**
* All stored tasks with their titles and subtask progress. The active task is
* read from `task.md` so its numbers are live rather than from its snapshot.
*/
listTasks(activeName: string | null): Promise<TaskListItem[]>;
/** Write the live task.md back to `<name>`'s snapshot. */
syncActive(name: string): Promise<void>;
/** Make `<name>` the live task.md. The caller must have synced the previous one. */
activate(name: string): Promise<void>;
remove(name: string): Promise<void>;
/**
* Derive a store name from a task title, used when migrating a legacy
* project whose task.md has no name yet.
*/
deriveName(title: string): Promise<string>;
}
//# sourceMappingURL=TaskStore.d.ts.map