import type { TaskType } from '@zhixuan92/multi-model-agent-core'; /** Extract the last ```json fenced block (or first bare JSON object) from raw * LLM output; falls back to the raw string when nothing parses. */ export declare function tryParseJson(raw: string): unknown; /** * Build a terminal FAILED result that is shape-consistent with the success/pipeline * envelope (execution, output, metrics, raw, error). Every terminal 200 — success or * failure — must have these five top-level keys so callers detect failure uniformly via * `error` (the contract documented in _shared/response-shape.md). Used for pre-dispatch/ * async validation failures and runner crashes, which would otherwise store a bare * { code, message } that has no `error` field for callers to check. */ export declare function buildErrorEnvelope(executionId: string, type: TaskType, error: { code: string; message: string; } & Record, status?: 'failed' | 'cancelled' | 'interrupted', method?: string | null): Record; //# sourceMappingURL=result-shape.d.ts.map