/** * Show full task details by ID. * @task T4460 * @epic T4454 */ import type { Task, TaskRecord, TaskRecordRelationCounts, TaskRef, TasksShowResult, TaskView } from '@cleocode/contracts'; import { type EngineResult } from '../engine-result.js'; import type { NextDirectives } from '../mvi-helpers.js'; import type { DataAccessor } from '../store/data-accessor.js'; import { type IvtrHistoryEntry, type LifecycleStageEntry } from './engine-converters.js'; /** * Hydrated acceptance criterion row surfaced by `cleo show --verbose`. * * Surfaces the stable UUID (the binding target for `satisfies:` * evidence atoms in T10503), the human-friendly `AC` alias, and * the canonical text. Reads from `task_acceptance_criteria` (T10502) — * NOT the legacy `tasks.acceptance` JSON string. * * @task T10508 * @epic T10381 */ export interface AcDetail { /** Stable UUID-shaped identifier, immutable for the AC's lifetime (legacy v4 or deterministic v5-shaped). */ id: string; /** Display alias derived from ordinal — `AC1`, `AC2`, etc. */ alias: string; /** 1-based ordinal — never reused per task (gaps remain on shrink). */ ordinal: number; /** The AC statement text. Structured gates round-trip as JSON. */ text: string; } /** Enriched task with hierarchy info. */ export interface TaskDetail extends Task { children?: string[]; dependencyStatus?: TaskRef[]; unresolvedDeps?: TaskRef[]; dependents?: string[]; hierarchyPath?: string[]; isArchived?: boolean; /** * Acceptance-criterion rows hydrated from `task_acceptance_criteria`. * Present when the table contains AC rows for the task (post-T10508 * dual-write or T10505 backfill). Coexists with the legacy * `acceptance` string field — readers should prefer `acRows` when * present and fall back to `acceptance` otherwise. * @task T10508 */ acRows?: AcDetail[]; /** Compact counts for relations and docs surfaced on default MVI projection. */ relationCounts?: TaskRecordRelationCounts; /** Progressive disclosure directives for follow-up operations. */ _next?: NextDirectives; } /** * Get a task by ID with enriched details. * Checks active tasks first, then archive if not found. * @task T4460 * @task T10109 — defensive format validation; rejects malformed IDs with * `INVALID_INPUT` instead of silently falling through to a * `NOT_FOUND` DB miss (or worse, a KeyError downstream). */ export declare function showTask(taskId: string, cwd?: string, accessor?: DataAccessor): Promise; /** * Operation-shaped `tasks.show` wrapper used by dispatch. * * Handles the query-mode switches (`history`, `ivtrHistory`) and enriches the * standard show envelope with attachments and AC rows entirely inside Core. * Dispatch should only call this function and wrap its EngineResult. * * @task T10612 */ export declare function taskShowOperation(projectRoot: string, params: { taskId: string; history?: boolean; ivtrHistory?: boolean; relations?: boolean; }): Promise>; /** * Get a single task by ID, wrapped in EngineResult. * * Fetches the full task record and computes the canonical TaskView. * * @param projectRoot - Absolute path to the project root * @param taskId - Task identifier (e.g. "T001") * @returns EngineResult containing the task record and canonical view * * @task T1568 * @epic T1566 */ export declare function taskShow(projectRoot: string, taskId: string): Promise>; /** * Get a single task by ID, optionally including its lifecycle stage history. * * @param projectRoot - Absolute path to the project root * @param taskId - Task identifier (e.g. "T042") * @param includeHistory - When true, append lifecycle stage array * @returns EngineResult containing the task record and optional history * * @task T1568 * @epic T1566 */ export declare function taskShowWithHistory(projectRoot: string, taskId: string, includeHistory: boolean): Promise>; /** * Retrieve the IVTR phase history for a task. * * @param projectRoot - Absolute path to the project root * @param taskId - Task identifier (e.g. "T042") * @returns EngineResult with ivtrHistory array * * @task T1568 * @epic T1566 */ export declare function taskShowIvtrHistory(projectRoot: string, taskId: string): Promise>; /** * Check if a task exists. * * Returns `{ exists: true }` if the task is found, `{ exists: false }` otherwise. * Never fails — catches all errors and returns false. * * @param projectRoot - Absolute path to the project root * @param taskId - Task identifier to check * @returns EngineResult with exists flag and the queried taskId * * @task T1568 * @epic T1566 */ export declare function taskExists(projectRoot: string, taskId: string): Promise>; //# sourceMappingURL=show.d.ts.map