/** * Output Schema Registry — shared mapping from `outputSchemaRef` string to the * TypeBox schema that validates a runtime adapter's parsed output. * * Single source of truth for both PiAiRuntimeAdapter and OpenClawCliRuntimeAdapter * (and any future PDRuntimeAdapter). Extracted from pi-ai-runtime-adapter.ts so * the OpenClaw adapter can validate Stage A/B outputs against the correct schema * instead of hardcoding DiagnosticianOutputV1Schema. * * Why this matters: the split diagnostician pipeline runs three stages, each * producing a DIFFERENT output shape: * - Stage A (diag_rootcause) → DiagRootCauseOutputV1 (causalChain, rootCauseCategory) * - Stage B (diag_distiller) → DiagDistillerOutputV1 (abstractedPrinciple, rationale) * - Stage C (diag_router) → DiagnosticianOutputV1 (violatedPrinciples, recommendations) * Stage runners pass `outputSchemaRef` on StartRunInput to name which shape they * expect; adapters MUST resolve the schema from this registry rather than assume * DiagnosticianOutputV1 (which only matches Stage C). */ import type { TSchema } from '@sinclair/typebox'; /** * Map of `outputSchemaRef` string → TypeBox schema. Keys match the * `outputSchemaRef` values passed by each runner's `invokeRuntime()`. */ export declare const OUTPUT_SCHEMA_REGISTRY: ReadonlyMap; /** * Resolve the TypeBox schema for a given `outputSchemaRef`. * * @param ref - the outputSchemaRef string passed by a runner (e.g. 'diag-rootcause-output-v1'). * @returns the matching schema, or `undefined` when: * - `ref` is undefined/null/empty (caller should apply its own default), OR * - `ref` is a non-empty string not present in the registry (caller should fail loud). * Callers MUST distinguish these two cases: an absent ref is "use default", an * unknown ref is a bug (fail loud per rc-3-fail-loud-missing). */ export declare function resolveOutputSchema(ref: string | undefined | null): TSchema | undefined; //# sourceMappingURL=output-schema-registry.d.ts.map