Skip to content

Interface: BackwardChainResponse

@kortexya/reasoninglayer


@kortexya/reasoninglayer / BackwardChainResponse

Defined in: src/types/inference.ts:603

Response from backward chaining inference.

optional completedProofCount?: number

Defined in: src/types/inference.ts:629

Native discharged witnesses meeting the requested certainty, independent of search completion.


optional derivationComplete?: boolean

Defined in: src/types/inference.ts:627

Whether closed-world backward derivation exhausted its alternatives.

false includes a bounded search and pending constraints: an empty solutions list is then “not established”, not a refutation. Only true permits reading an empty result as a completed refutation. Absent on an open-world response, which carries BackwardChainResponse.openWorldSearch instead and certifies no exhaustion.


optional goalId?: string | null

Defined in: src/types/inference.ts:616

Goal ID if the goal was saved (when saveGoal is true).

The engine stores the saved goal apart from the tenant’s facts: it is not visible to MATCH or to getFacts, and it is reached through listGoals / getGoal / deleteGoal. A sort-only goal is saved too: it answers a UUID here, not null.


optional openWorldSearch?: OpenWorldSearchCompletion

Defined in: src/types/inference.ts:634

Whether the open-world ranking traversal was exhaustive. Present only on an open-world response; never a closed-world negative verdict.


queryTimeMs: number

Defined in: src/types/inference.ts:607

Query execution time in milliseconds.


solutions: SolutionDto[]

Defined in: src/types/inference.ts:605

Solutions found (may be partial if timeout fired).


optional validBefore?: string

Defined in: src/types/inference.ts:648

The instant at which this answer may stop being true without any write: the earliest end, after the engine’s clock when the proof started, of a governed authority relation fact (valid_until) or of a materialised conclusion resting on one that the proof could read. A caller that keeps the answer must not reuse it at or after this instant. Omitted when no such fact ends.


optional whyNot?: WhyNot | null

Defined in: src/types/inference.ts:639

Bounded diagnostics when the request set BackwardChainRequest.explainFailure and no discharged witness was found.