/** * What a background `task` job offers its live widget (see * `job-widgets/types.ts`): the subagent's finished tool calls as the `tools` * source, every source of the jobs the subagent itself started re-exposed as * `:`, and a brief read live from the job's progress. */ import type { AgentProgress } from "@oh-my-pi/pi-tui/tools/task"; import type { AsyncJobManagerApi } from "../async/job-manager.js"; import type { TextTap } from "../job-widgets/text-tap.js"; import { type JobWidgetInputs } from "../job-widgets/types.js"; import type { SubagentToolResult } from "./executor.js"; /** Label of the `tools` source (`TOOLS_SOURCE_ID` in `job-widgets/types`), for the widget author. */ export declare const TOOLS_SOURCE_LABEL = "subagent tool calls: `\u00BB ` (omp's marker) then the result text"; /** Append one finished subagent tool call to a task job's `tools` tap: `\n» \n\n`. */ export declare function appendToolResult(tap: TextTap, result: SubagentToolResult): void; /** Inputs for {@link createTaskWidgetInputs}. */ export interface TaskWidgetInputsOptions { /** The root's shared manager, where the subagent's own jobs are registered. */ manager: AsyncJobManagerApi; /** Registry id of the subagent: the `ownerId` of the jobs it starts. */ agentId: string; /** The run's tool tap, once the run exists; a queued job has none yet. */ tools: () => TextTap | undefined; /** The job's live progress record (stage, watch and assignment are read from it on every call). */ progress: AgentProgress; /** The parent's intent line on the `task` call that started the job. */ intent?: string; } /** Widget inputs of one background `task` job; see the module doc. */ export declare function createTaskWidgetInputs(options: TaskWidgetInputsOptions): JobWidgetInputs;