import type { AnomalyEvent } from '@manehorizons/cadence-types'; /** Task statuses treated as "already finished" — an edit touching either's files is flagged. */ export declare const TERMINAL_TASK_STATUSES: ReadonlySet; /** The single line both emission points use for a redundant-work hit. */ export declare const redundantWorkMessage: (file: string, taskId: string, status: string) => string; export interface TaskFileOwnership { taskId: string; files: string[]; } export interface RedundancyCheckInput { /** Every DRAFT task's id + declared `files:`, in DRAFT order. */ tasks: TaskFileOwnership[]; /** task id -> status. A task with no entry is treated as PENDING (never flagged). */ taskStatuses: Record; /** Candidate files to test. Iterated as-given — caller owns dedup/order. */ touchedFiles: Iterable; /** Stamps each event's `ts`. */ stamp: () => string; /** Merged into each event's `context` AFTER `file`/`taskId`/`status`. */ extraContext?: Record; /** * Repo root for path normalization. When set, declared + touched paths are * relativized to this root (and `\\`→`/`) before comparison, mirroring * `checks/boundary.ts`'s `root` param — an absolute touched path (from the * PreToolUse hook) matches a relative DRAFT `files:` declaration. The * ORIGINAL touched path is still what gets emitted. */ root?: string; /** Severity stamped on every emitted event. Defaults to `'warn'`. */ severity?: AnomalyEvent['severity']; } /** * Subagent task-redundancy monitoring — the single home for "does this * touched file belong to a task that's already finished" detection. Pure — * no I/O. Fires at three call sites: `handlePreToolEdit` (edit-time), * `handleSubagentResult` (SubagentStop safety net). One rule ("a touched * file owned by ANY terminal task is a redundant-work hit"), same shape as * `runBoundaryCheck` — a different axis (task status, not file boundary). */ export declare function runRedundancyCheck(input: RedundancyCheckInput): AnomalyEvent[]; //# sourceMappingURL=task-redundancy.d.ts.map