/** * CoordinatorHandler — plan-execute-replan loop driving autonomous * multi-step orchestration over the SubAgent registry. * * Reads: `ctx.subAgents`, `ctx.inputText`, `ctx.selectedSkills`, * `ctx.skillContent`, `ctx.assembledMessages` (for system prompt). * Writes: `ctx.plan`, `ctx.currentStepIdx`, `ctx.stepResults`, and emits the * final concatenated output via `ctx.yield()` as the assistant * response (followed by a `stop` chunk), since the pipeline streams * results to consumers rather than buffering a final string field. * * NOTE: Coordinator replaces the tool-loop stage when activated. The * `ctx.yield`-based streaming contract is preserved so downstream SSE * consumers see the response as a normal stream. */ import type { IDispatchStrategy, IPlanningStrategy } from '@mcp-abap-adt/llm-agent'; import type { ISpan } from '../../tracer/types.js'; import type { PipelineContext } from '../context.js'; import type { IStageHandler } from '../stage-handler.js'; export interface CoordinatorHandlerDeps { planning: IPlanningStrategy; dispatch: IDispatchStrategy; maxSteps: number; maxRetriesPerStep: number; failPolicy: 'abort' | 'continue'; } export declare class CoordinatorHandler implements IStageHandler { private readonly deps; constructor(deps: CoordinatorHandlerDeps); execute(ctx: PipelineContext, _rawConfig: Record, _span: ISpan): Promise; } /** * Helper used by DefaultPipeline / activation strategies to detect whether * the active skill carries a structured `steps` block — a strong signal for * Coordinator activation. */ export declare function activeSkillHasSteps(ctx: PipelineContext): boolean; //# sourceMappingURL=coordinator.d.ts.map