/**
 * @fileoverview Task model for Claude prompt execution
 *
 * Represents a single task (prompt) to be executed by a Claude session.
 * Tasks support priority ordering, dependencies, and completion detection.
 *
 * @module task
 */
import { TaskDefinition, TaskState, TaskStatus } from './types.js';
/**
 * Options for creating a new task.
 */
export interface CreateTaskOptions {
    prompt: string;
    workingDir?: string;
    priority?: number;
    dependencies?: string[];
    completionPhrase?: string;
    timeoutMs?: number;
}
/**
 * A task representing a prompt to be executed by a Claude session.
 *
 * @description
 * Tasks have a lifecycle: pending → running → completed/failed
 * They support priority ordering and dependency chains.
 */
export declare class Task {
    readonly id: string;
    readonly prompt: string;
    readonly workingDir: string;
    readonly priority: number;
    readonly dependencies: string[];
    readonly completionPhrase: string | undefined;
    readonly timeoutMs: number | undefined;
    readonly createdAt: number;
    private _status;
    private _assignedSessionId;
    private _startedAt;
    private _completedAt;
    private _output;
    private _error;
    /** Pre-compiled regex for completion phrase detection (avoids re-creation per check) */
    private readonly _completionPattern;
    constructor(options: CreateTaskOptions, id?: string);
    get status(): TaskStatus;
    get assignedSessionId(): string | null;
    get startedAt(): number | null;
    get completedAt(): number | null;
    get output(): string;
    get error(): string | null;
    isPending(): boolean;
    isRunning(): boolean;
    isCompleted(): boolean;
    isFailed(): boolean;
    isDone(): boolean;
    toDefinition(): TaskDefinition;
    toState(): TaskState;
    /** Reconstructs a Task from persisted state. */
    static fromState(state: TaskState): Task;
    /** Assigns this task to a session and marks it as running. */
    assign(sessionId: string): void;
    appendOutput(output: string): void;
    setError(error: string): void;
    complete(): void;
    fail(error?: string): void;
    reset(): void;
    /** Checks if output contains the completion phrase. */
    checkCompletion(output: string): boolean;
    /** Returns true if the task has exceeded its timeout. */
    isTimedOut(): boolean;
}
//# sourceMappingURL=task.d.ts.map