import type { DagPlan, ILlm, IPlanner, LlmUsage, PlannerInput, PlannerResult } from '@mcp-abap-adt/llm-agent'; export declare const PLANNER_SYSTEM = "You are a planner. Decompose the user request into a DAG of tasks.\nEach node: {\"id\",\"goal\",\"agent\"(optional worker name),\"dependsOn\"(optional ids),\"needsInput\"(optional bool)}.\nUse \"dependsOn\" to express order/data-flow; independent nodes run in parallel.\n\nDECOMPOSITION COST. Each node spawns a fresh worker pipeline. Workers\nDO NOT share fetched data, tools, or context across nodes \u2014 every node\npays the full classify + RAG + tool-loop overhead again, and any\nsource / configuration / table data already fetched by a previous\nnode will be re-fetched. Over-decomposition is the most common cause\nof large token bills. Decompose ONLY when:\n- nodes target DIFFERENT objects (e.g. compare program A vs program B),\n- nodes can TRULY run in parallel for wall-clock speedup, or\n- a later node depends on a fact ONLY discoverable by an earlier node.\n\nFor analysing a SINGLE object along multiple dimensions (e.g. \"review\nprogram X for security, performance, clean-core, maintainability\") use\nONE node \u2014 the worker covers every dimension in one tool-loop.\n\nEmit a plan-level \"objective\". Respond with ONLY one of:\n{\"objective\":\"...\",\"nodes\":[{\"id\":\"n1\",\"goal\":\"...\",\"agent\":\"\",\"dependsOn\":[],\"needsInput\":false}]}\n{\"needInfo\":\"\"} \u2014 if you need a reality fact before planning (e.g. which table exists)\n{\"clarify\":\"\"} \u2014 if you need a human decision before planning (e.g. overwrite ok?)"; /** * Parse a raw LLM content string into a `DagPlan`. * Throws `NeedInfoSignal`, `ClarifySignal`, or plain `Error` on bad input. * The optional `usage` argument is attached to thrown errors so callers can * still bill LLM spend even when parsing fails. * * When `fallbackGoal` is supplied and the LLM returns a structurally valid * plan with ZERO nodes (and no needInfo/clarify), the parser synthesizes a * single fallback node carrying that goal instead of throwing. This is the * #171 obs-2c fix: a bare "call external tool X" request cannot be decomposed * into an internal MCP action, so the LLM may legitimately emit no nodes — but * the DAG must still run ONE worker so the worker LLM can emit the external * tool_call that the #171 surfacing machinery then handles. Callers that want * the strict no-nodes error (e.g. the Stepper planner) simply omit it. */ export declare function parseDagPlan(content: string, usage?: LlmUsage, fallbackGoal?: string): DagPlan; /** * Role adapter: owns a constrained `DirectLlmSubAgent` and turns its string * output into a typed `DagPlan`. (Slice 2: planner now flows through the one * ISubAgent path instead of calling ILlm directly.) */ export declare class LlmDagPlanner implements IPlanner { readonly name = "llm-dag"; /** Best-effort model identifier from the underlying ILlm (for logger * attribution). May be undefined for ILlm impls that do not expose one. */ readonly model?: string; private readonly agent; constructor(llm: ILlm); plan(input: PlannerInput): Promise; } //# sourceMappingURL=llm-dag-planner.d.ts.map