Skip to content
YosoiDocs

yosoi.contracts

yosoi.contracts

Mutable Pydantic Contracts over Rust’s bounded raw evidence extraction.

Source: python/yosoi/contracts.py:1

Name Summary
Candidate Grouping metadata for generated typed candidate records.
CandidateField Ordered projection values and original findings before conversion.
Contract Mutable Pydantic record model with native candidate extraction.
ContractIssues Structured rejection of a request for all accepted record values.
ContractOutcome Pydantic validation report retaining accepted and rejected candidates.
ContractRecordIssue One rejected candidate with Pydantic details and source evidence.
ContractSchema Native transport meaning, scope, and ordered field declarations.
ContractValue Identity-only protocol for native Rust Contract scalar types.
Extracted Read-only candidate assembly outcome awaiting explicit validation.
ExtractionDiagnostic Nonfatal finding-lineage mismatch during candidate grouping.
ExtractionLimits Nonnegative u64 budgets for candidate assembly.
ExtractionPolicy Immutable acceptance and native-work limits for Python Contract extraction.
FieldIssue Rejected Contract field with supporting source-derived evidence.
FieldIssueKind Cardinality, completeness, or projection conversion rejection.
FieldSchema Native transport field meaning, cardinality, and scalar type metadata.
RecordIssue Rejected candidate record with retained field issues.
TerminalFailure Structured phase rejection facts, distinct from field issues.
ValidatedRecord Pydantic-accepted typed value with original candidate evidence retained.
ValidationLimits Native-shaped work budgets applied before Python validation.
Name Summary
Field Describe a Contract field using a genuine Pydantic FieldInfo.
extract Return validated Pydantic models extracted from a document.
extract_report Return a report with accepted models, rejected candidates, and evidence.
value_type_id Return the Rust ContractValue identity declared by a scalar type.
Name Summary
ArchivedContractCandidateField Store portable evidence for one archived candidate field.
ArchivedContractField Pair an archived schema field ID with its accepted value.
ArchivedContractOutcome Inspect a portable Contract outcome without a live Rust handle.
ArchivedContractRecordIssue Retain a rejected portable candidate with its field issues.
ArchivedContractString Store a validated string in the portable archive format.
ArchivedContractValue Store a validated string in the portable archive format.
ArchivedValidatedContractRecord Retain accepted portable values together with source evidence.
Cardinality Required accepted field count: exactly one, zero or one, or an ordered collection including empty. Python applies these distinctions to complete raw evidence.
ContractSchemaFailure Structured Rust schema error tagged by its variant and typed details.
ContractValidationReport Readable alias for the Python Pydantic Contract validation report.
Limit Strict nonnegative u64 extraction or validation counter. Zero is a finite budget, not an implicit unlimited setting.
RuntimeCandidate Retain raw findings for every field of one runtime candidate.
RuntimeContract Author a Contract schema for extraction and validation in Rust.
RuntimeContractOutcome Inspect runtime validation results while retaining the Rust handle.
RuntimeExactlyOne Carry the single value accepted for a required field.
RuntimeExtracted Inspect runtime extraction results while retaining the Rust handle.
RuntimeExtractionFailure Typed schema, counting, grouping, or extraction-budget rejection.
RuntimeFieldValue Validated runtime field value tagged by its declared cardinality.
RuntimeMany Carry all accepted values for a repeated field.
RuntimeRecordIssue Retain a rejected candidate and its field validation issues.
RuntimeString Carry a string accepted by runtime Contract validation.
RuntimeValidatedRecord Pair accepted field values with their original candidate evidence.
RuntimeValidationFailure Typed schema, counting, or validation-budget rejection.
RuntimeValue Carry a string accepted by runtime Contract validation.
RuntimeZeroOrOne Carry an optional field after cardinality and conversion checks.