/** * Turning an agent's raw text into a `TaskOutput`, and resolving the * `outputConfig` object onto the task's individual output fields. * * `buildTaskOutput` ports `praisonaiagents/agents/agents.py::_process_task_result`: * the raw text is stripped of a markdown fence and parsed when the task asked * for `outputJson` or `outputPydantic`; a parse failure is recorded as a * non-fatal error and the raw text stands. * * `resolveOutputConfig` ports * `praisonaiagents/workflows/workflow_configs.py::resolve_step_output_config`: * a string is a file path, an object supplies `file` / `json_model` / * `pydantic_model` / `variable`. */ import type { Task, TaskOutput } from '../types'; /** The fields an `outputConfig` (Python `TaskOutputConfig`) can carry. */ export interface ResolvedOutputConfig { file?: string; json?: unknown; pydantic?: unknown; variable?: string; } /** Resolve an `outputConfig` value; `undefined` when it carries nothing. */ export declare function resolveOutputConfig(value: unknown): ResolvedOutputConfig | undefined; /** * Python `Agents.clean_json_output`: strip a ```json fence so the payload can * be parsed. */ export declare function cleanJsonOutput(raw: string): string; /** * Build the `TaskOutput` for `raw`. * * A task with neither `outputJson` nor `outputPydantic` gets a plain `RAW` * output; asking for either parses the text and sets the matching field and * `outputFormat`. A parse failure is appended to the task's `nonFatalErrors`. */ export declare function buildTaskOutput(task: Task, raw: string, agentName?: string): TaskOutput;