Skip to content

Interface: CheckDocumentResponse

@kortexya/reasoninglayer


@kortexya/reasoninglayer / CheckDocumentResponse

Defined in: src/types/document-check.ts:208

Result of a contract check.

CheckDocumentResponse.warnings explains any pass that was skipped (e.g. the rules pass when no inline content was supplied) — an empty findings list with warnings is not the same as a clean contract. The rules pass also warns when it read a document only in part, when a rule could not be evaluated, when it evaluated no applicable rule on a document (KB rules pass evaluated no applicable rule on <name>; …), and when it failed (KB rules pass failed (non-fatal): …, an unreadable LLM answer included — the llm_answer_unparseable that documents.analyze answers with 502).

complete: boolean

Defined in: src/types/document-check.ts:242

true only when every requested pass is completed: the findings are then everything the check could find. false means at least one requested pass was skipped, failed, or evaluated only part of its input, so an empty findings list is not a clean bill.


diffs: JsonValue[]

Defined in: src/types/document-check.ts:214

Full OSF diff report per reference document (opaque JSON).


optional documentId?: string | null

Defined in: src/types/document-check.ts:210

The checked contract’s document id (newly created when inline content was ingested).


findings: CheckFinding[]

Defined in: src/types/document-check.ts:212

Unified findings, ordered critical-first.


optional kbRuleReport?: JsonValue

Defined in: src/types/document-check.ts:227

The knowledge-base rules report, when the rules pass ran (opaque JSON).

The same per-document shape client.documents.analyze returns, in snake_case: each document carries evaluated_text ({evaluated_chars, total_chars, truncated}) and a compliance_score that is null when no applicable rule was evaluated or the document was truncated; each rule result carries basis, withheld_status and withheld_confidence. The report’s overall_compliance is null when no rule of a fully read document was evaluated.


passes: CheckPass[]

Defined in: src/types/document-check.ts:244

The status of each pass, osf_diff first, then kb_rules.


summary: CheckSummary

Defined in: src/types/document-check.ts:235

Finding counts by severity.


warnings: string[]

Defined in: src/types/document-check.ts:233

Warnings about skipped passes and partial reads. A document the rules pass read only partly adds KB rules pass read only the first N of M characters of <name>; a rule whose evidence lies past them answers inconclusive.