/** * @license * Copyright 2026 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { ITask, TaskGraph } from "@workglow/task-graph"; import type { RunEventSink } from "./runEventChannel"; /** * How deep to follow ownership. A task that owns a workflow produces a wrapper * row whose own children are the real work, so one level is never enough — * stopping at the wrapper reports "Workflow" and hides the pipeline inside it. * Mirrors the terminal's `MAX_SUBTASK_DEPTH`, plus the level that wrapper eats. */ export declare const MAX_PROJECTED_DEPTH = 3; /** Signature of {@link projectRunEvents}, taken as a parameter to break the cycle. */ export type ProjectGraph = (graph: TaskGraph, sink: RunEventSink, options: { depth: number; parent: string; removeRowsOnStop?: boolean; }) => () => void; /** * Reports what one task owns: either its own subgraph, or — for a Map/Reduce, * whose subgraph is the idle template rather than the running work — the live * clones of its in-flight iterations. */ export declare function projectTaskSubtree(task: ITask, sink: RunEventSink, depth: number, parent: string, project: ProjectGraph): () => void;