export declare const TASK_STEP_STATUSES: readonly ["pending", "in_progress", "completed", "blocked", "cancelled"]; export type TaskStepStatus = (typeof TASK_STEP_STATUSES)[number]; export declare const TASK_STEP_PRIORITIES: readonly ["low", "normal", "high"]; export type TaskStepPriority = (typeof TASK_STEP_PRIORITIES)[number]; export declare const MAX_TASK_STEPS = 100; export declare const MAX_TASK_STEP_CONTENT_LENGTH = 2000; export declare const MAX_TASK_STEP_PIPELINE_RUN_ID_LENGTH = 128; export interface TaskStepInput { content: string; activeForm?: string; status?: TaskStepStatus; priority?: TaskStepPriority; owner?: string; requirementIds?: readonly string[]; pipelineRunId?: string; pipelineStageId?: string; clearPipelineLink?: boolean; note?: string; notes?: readonly string[]; evidence?: readonly string[]; } export interface TaskStep { id: string; content: string; activeForm?: string; status: TaskStepStatus; priority?: TaskStepPriority; owner?: string; /** Goal requirements this foreground step advances. Optional only for snapshots from older sessions. */ requirementIds?: readonly string[]; pipelineRunId?: string; pipelineStageId?: string; notes: readonly string[]; evidence: readonly string[]; createdAt: string; updatedAt: string; } export interface TaskStepsArchive { completed: number; cancelled: number; compactedAt?: string; } export interface TaskStepsState { version: 1; revision: number; nextStepNumber: number; steps: readonly TaskStep[]; archive: TaskStepsArchive; createdAt: string; updatedAt: string; } export interface TaskStepUpdate { content?: string; activeForm?: string; status?: TaskStepStatus; priority?: TaskStepPriority; owner?: string; requirementIds?: readonly string[]; pipelineRunId?: string; pipelineStageId?: string; clearPipelineLink?: boolean; note?: string; evidence?: readonly string[]; } export declare class TaskStepsError extends Error { constructor(message: string); } export declare function isTaskStepsState(value: unknown): value is TaskStepsState; export declare function cloneTaskStepsState(state: TaskStepsState): TaskStepsState; export declare function createTaskStepsState(now: string): TaskStepsState; export declare function normalizeTaskStepPipelineLink(pipelineRunId: string | undefined, pipelineStageId: string | undefined, clearPipelineLink?: boolean): Pick; /** * Find an OPEN (non-terminal) step whose content matches `content` case-insensitively. * Terminal steps (completed/cancelled) are deliberately excluded so a legitimate re-add of * previously finished work still creates a new step. */ export declare function findOpenDuplicateStep(steps: readonly TaskStep[], content: string): TaskStep | undefined; /** True when a completed step has no evidence attached (a verification nudge candidate). */ export declare function hasUnverifiedCompletedStep(state: TaskStepsState): boolean; export declare function setTaskSteps(state: TaskStepsState, inputs: readonly TaskStepInput[], now: string): TaskStepsState; export declare function addTaskStep(state: TaskStepsState, input: TaskStepInput, now: string): TaskStepsState; export declare function resolveTaskStepSelector(steps: readonly TaskStep[], selector: string): TaskStep; export declare function updateTaskStep(state: TaskStepsState, selector: string, update: TaskStepUpdate, now: string): TaskStepsState; export declare function clearTaskSteps(state: TaskStepsState, now: string): TaskStepsState; export declare function compactTaskSteps(state: TaskStepsState, now: string): TaskStepsState; export declare function formatTaskSteps(state: TaskStepsState, options?: { includeTerminal?: boolean; maxItems?: number; }): string; export declare function formatTaskStepsContext(state: TaskStepsState, maxItems?: number): string | undefined; export declare function serializeTaskStepsState(state: TaskStepsState): string; export declare function parseTaskStepsState(text: string): TaskStepsState | undefined; //# sourceMappingURL=task-state.d.ts.map