Skip to content

Interface: PsiTermDto

@kortexya/reasoninglayer


@kortexya/reasoninglayer / PsiTermDto

Defined in: src/types/homoiconic.ts:14

A Psi-term in the homoiconic (untagged) representation.

Returned by inference endpoints (backward chaining, forward chaining, etc.). Features use the untagged FeatureValueDto format.

This is the homoiconic representation where data, code, and constraints are all Psi-terms. Distinct from import(‘./terms.js’).TermDto which uses the tagged import(‘./values.js’).ValueDto format.

optional binding?: string

Defined in: src/types/homoiconic.ts:53

The binder this rule antecedent was authored with (?C), when it names its own identity — the OSFQL ?C: sort(...) form.

A feature elsewhere in the rule that references this term renders as a variable carrying this term’s id, so the join reads from the ids alone. Absent on every other term.


display: string

Defined in: src/types/homoiconic.ts:43

Human-readable text of the term: sort(feature: value, …) with every data feature, sorted by name.

A string value is a JSON string literal (escaped), a real is its shortest round-trip text, a list is shown in full, a variable is ?Name and a sort value is sort_id("name") (or sort_id(@uuid) when the lattice does not hold it). Engine-internal _-prefixed features, when/constraints and a rule’s aggregator/certainty are never shown.


features: Record<string, FeatureValueDto>

Defined in: src/types/homoiconic.ts:31

Named features with untagged values, exactly as the engine sends them.

A sort named as a value arrives as {sort_ref, sort_name?} — a SortRefFeatureValue — and no longer as {term_id} (#353). A rule’s certainty is not a feature of its head: read RuleEntryDto.certainty. To send a listed value back on a write, convert it with featureValueToInput().


sortId: string

Defined in: src/types/homoiconic.ts:18

Sort (type) UUID.


sortName: string

Defined in: src/types/homoiconic.ts:20

Sort name (resolved by the server).


termId: string

Defined in: src/types/homoiconic.ts:16

Term UUID.