Type Alias: PsiTermInput
@kortexya/reasoninglayer / PsiTermInput
Type Alias: PsiTermInput
Section titled “Type Alias: PsiTermInput”PsiTermInput =
PsiTermInputByName|PsiTermInputById
Defined in: src/types/plain-values.ts:85
A format-agnostic psi-term produced by the psi() builder.
Remarks
Section titled “Remarks”Exactly one of sortName or sortId is present — enforced by the union type.
Can be passed to both term CRUD methods (converted to tagged ValueDto format)
and inference methods (converted to untagged TermInputDto format).
The SDK handles the conversion automatically based on which method receives it.
Distinguished from plain objects by the __psiTerm brand field, which is
stripped before serialization.
Example
Section titled “Example”// Works with term CRUD:await client.terms.createTerm({ sortId, ownerId, features: { name: "Alice" } });
// Works with inference:await client.inference.addFact({ term: psi("person", { name: "Alice" }) });