Skip to content

Interface: ForwardChainResponse

@kortexya/reasoninglayer


@kortexya/reasoninglayer / ForwardChainResponse

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

Response from forward chaining inference.

optional completion?: ForwardChainCompletion

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

Completion evidence for this execution: whether a fixpoint was reached and whether a budget truncated rule matching. Absent for a previously materialized answer whose execution evidence is unavailable.


derivedCount: number

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

Number of newly derived facts.


derivedFacts: PsiTermDto[]

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

Facts derived during forward chaining.


iterations: number

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

Number of iterations performed.


optional keptCount?: number

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

Derivations this run KEPT in the tenant’s store.

Non-zero only when the request carried keepDerived: true, since a default run rolls its output back. Counts meta.clause wrappers, which is one per conclusion.


materializationTimeMs: number

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

Materialization time in milliseconds.


optional provenanceTags?: ProvenanceTagDto[]

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

Provenance tags for derived facts (only present when enable_provenance_tags was true).


optional residuated?: ResidualDerivationDto[]

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

Derivations SUSPENDED on an unbound slot (residuation).

A rule whose antecedent is satisfied on every bound feature and blocked only by a feature whose value is an unbound variable. Each entry names the rule, the fact, the feature, the variable and the value the rule requires: the question to ask next. The engine omits the key when nothing is waiting.


totalFacts: number

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

Total facts after materialization.