export type TaskStatus = 'pending' | 'assigned' | 'in_progress' | 'blocked' | 'review' | 'done' | 'failed' | 'cancelled';
export type TaskPriority = 'low' | 'normal' | 'high';
export type ExecutionPolicy = 'auto' | 'require_approval' | 'require_approval_above_budget';
export type ApprovalState = 'not_required' | 'pending' | 'approved' | 'rejected';
export interface TaskCheckIn {
    timestamp: string;
    progressPercent?: number;
    message: string;
    status?: TaskStatus;
}
export interface Task {
    id: string;
    title: string;
    description?: string;
    status: TaskStatus;
    priority: TaskPriority;
    createdAt: string;
    updatedAt: string;
    assigneeId?: string;
    parentTaskId?: string;
    dependsOn: string[];
    progressPercent: number;
    checkIns: TaskCheckIn[];
    tags: string[];
    /** Optional free-form metadata (e.g. linked session id). */
    metadata?: Record<string, unknown>;
    /** Company scoping — tasks belong to a company for multi-tenant isolation. */
    companyId?: string;
    /** Goal alignment — links this task to a company goal for traceability. */
    goalId?: string;
    /** Atomic work checkout — agent that has claimed this task. */
    checkedOutBy?: string;
    /** Timestamp of checkout for stale detection. */
    checkedOutAt?: string;
    /** Execution policy — controls whether tasks need human approval. */
    executionPolicy?: ExecutionPolicy;
    /** Approval state for tasks requiring human sign-off. */
    approvalState?: ApprovalState;
}
export interface CreateTaskInput {
    title: string;
    description?: string;
    priority?: TaskPriority;
    assigneeId?: string;
    parentTaskId?: string;
    dependsOn?: string[];
    tags?: string[];
    metadata?: Record<string, unknown>;
    companyId?: string;
    goalId?: string;
    executionPolicy?: ExecutionPolicy;
}
export interface UpdateTaskInput {
    title?: string;
    description?: string;
    status?: TaskStatus;
    priority?: TaskPriority;
    assigneeId?: string;
    dependsOn?: string[];
    tags?: string[];
    metadata?: Record<string, unknown>;
    companyId?: string;
    goalId?: string;
    checkedOutBy?: string;
    checkedOutAt?: string;
    executionPolicy?: ExecutionPolicy;
    approvalState?: ApprovalState;
}
export declare function listTasks(projectDir: string, filter?: {
    status?: TaskStatus;
    assigneeId?: string;
    companyId?: string;
    goalId?: string;
}): Promise<Task[]>;
export declare function getTask(projectDir: string, id: string): Promise<Task | undefined>;
export declare function createTask(projectDir: string, input: CreateTaskInput, now?: Date): Promise<Task>;
export declare function updateTask(projectDir: string, id: string, input: UpdateTaskInput, now?: Date): Promise<Task>;
export declare function recordCheckIn(projectDir: string, id: string, checkIn: {
    progressPercent?: number;
    message: string;
    status?: TaskStatus;
}, now?: Date): Promise<Task>;
export declare function deleteTask(projectDir: string, id: string): Promise<boolean>;
export interface StaleTaskReport {
    taskId: string;
    title: string;
    assigneeId?: string;
    lastActivityAt: string;
    staleForMs: number;
}
/** Identify in-progress tasks that have not checked in within STALE_CHECK_IN_MS. */
export declare function detectStaleTasks(projectDir: string, now?: Date, staleMs?: number): Promise<StaleTaskReport[]>;
/** Summarize tasks for board-style UIs (tasks grouped by status with counts). */
export declare function summarizeTasks(projectDir: string): Promise<Record<TaskStatus, number> & {
    total: number;
}>;
//# sourceMappingURL=taskStore.d.ts.map