/** * @license * Copyright 2025 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { TaskGraph } from "@workglow/task-graph"; import type { Dispatch, SetStateAction } from "react"; import type { CliTaskLine } from "./taskGraphCliSubscriptions"; export { adoptPolledProgress, cliTaskShowsProgressBar, cliTaskStatusGlyph, cliTaskStatusGlyphColor, cliTaskStatusSortOrder, sortCliTaskLinesForDisplay, } from "./model/runRowModel"; /** Optional per-file progress (e.g. {@link ModelDownloadTask}.files). */ export interface TaskFileProgressRow { readonly file: string; readonly progress: number; } /** * Polls `task.status` on the runner-owned instance (backup if `emit("status")` is missed). * For single-task runs, {@link TaskRunApp} batches `progress` / `files` on a timer so Ink is not * flooded with setState (high-frequency download progress + poll + spinner). */ export declare function startTaskInstancePoll(getTask: () => { status?: string; } | undefined, setStatus: Dispatch>): () => void; /** * Same idea as {@link startTaskInstancePoll} but for every node in a {@link TaskGraph}. */ export declare function startGraphTaskPoll(graph: TaskGraph, setTaskInfos: Dispatch>>): () => void;