Function: toUntaggedValue()
@kortexya/reasoninglayer / toUntaggedValue
Function: toUntaggedValue()
Section titled “Function: toUntaggedValue()”toUntaggedValue(
value):FeatureInputValueDto
Defined in: src/utils/convert.ts:298
Convert a single plain JavaScript value to untagged FeatureInputValueDto format.
Parameters
Section titled “Parameters”Plain JavaScript value.
Returns
Section titled “Returns”Untagged FeatureInputValueDto.
Remarks
Section titled “Remarks”Used by inference endpoints (backward chaining, rules, facts).
Detects ?-prefixed variables and !-prefixed references.
Conversion rules:
stringmatching?[A-Z]...→{ name: "?X" }(variable)stringmatching!...→{ termId: "uuid" }(term reference, strips!)string(other) → raw stringnumber→ raw numberboolean→ raw booleannull→null(uninstantiated)PsiTermInput→{ sortName: "...", features: {recursed} }(inline term)ConstrainedPlainVar→{ name: "?X", constraint: ... }PlainFeatureValue[]→[recursed]- Already-formatted
FeatureInputValueDtoorValueDto→ passthrough
Example
Section titled “Example”toUntaggedValue("Alice") // "Alice"toUntaggedValue("?X") // { name: "?X" }toUntaggedValue("!uuid-1") // { termId: "uuid-1" }toUntaggedValue(null) // null (runtime, not TS null)