Skip to main content
All Python modules · Import and compatibility guidance

Exports

FrameworkMetadata

Mark an explicit output-model field as runtime-owned metadata. FrameworkMetadata[Details] remains a normal Pydantic Details field in the application’s public result. Harnest omits it from provider-facing structured output and supplies it after the framework turn completes.

PydanticModel

StructuredOutputError

A configured Pydantic output contract was not satisfied.

callable_output_schema

Return a directly or postponed-annotated Pydantic result model.

framework_metadata_field

Return the single explicit runtime-owned field on an output model.

provider_output_schema

Derive the output contract a provider may generate for Harnest.

validate_output_schema

Require a Pydantic model class at an authored schema boundary.

validate_output_value

Validate Python or JSON text output and redact input values from failures.

validate_runtime_output

Validate provider output, inject declared metadata, then validate fully.