UNPKG

simple-task-master

Version:
78 lines 2.51 kB
/** * Core types and interfaces for Simple Task Master */ export type TaskStatus = 'pending' | 'in-progress' | 'done'; export interface Task { /** Schema version for migration purposes */ schema: number; /** Unique identifier for the task */ id: number; /** Task title (used in filename generation) */ title: string; /** Current status of the task */ status: TaskStatus; /** Creation timestamp in ISO format */ created: string; /** Last update timestamp in ISO format */ updated: string; /** Associated tags for categorization */ tags: string[]; /** Task IDs that this task depends on */ dependencies: number[]; /** Markdown content body (description, details, validation) */ content?: string; /** Allow arbitrary fields for external tool integration */ [key: string]: unknown; } export interface TaskCreateInput { title: string; content?: string; tags?: string[]; dependencies?: number[]; status?: TaskStatus; /** Allow arbitrary fields for external tool integration */ [key: string]: unknown; } export interface TaskUpdateInput { title?: string; status?: TaskStatus; tags?: string[]; dependencies?: number[]; content?: string; /** Allow arbitrary fields for external tool integration */ [key: string]: unknown; } export interface TaskListFilters { status?: TaskStatus; tags?: string[]; search?: string; } export interface TaskManagerConfig { /** Base directory for task storage */ tasksDir?: string; /** Workspace root directory (for testing) */ workspaceRoot?: string; /** Maximum task file size in bytes (default: 1MB) */ maxTaskSizeBytes?: number; /** Maximum task title length (default: 200) */ maxTitleLength?: number; /** Maximum description length (default: 64KB) */ maxDescriptionLength?: number; } export interface Config { schema: number; lockTimeoutMs: number; maxTaskSizeBytes: number; /** Optional custom directory for storing task files (default: .stm/tasks) */ tasksDir?: string; } export interface LockFile { pid: number; command: string; timestamp: number; } export type OutputFormat = 'ndjson' | 'json' | 'yaml' | 'table' | 'csv' | 'markdown'; export declare function isTask(obj: unknown): obj is Task; export declare function isConfig(obj: unknown): obj is Config; export declare function isLockFile(obj: unknown): obj is LockFile; //# sourceMappingURL=types.d.ts.map