Skip to content

Type Alias: FeatureValueDto

@kortexya/reasoninglayer


@kortexya/reasoninglayer / Values / FeatureValueDto

Type Alias: FeatureValueDto

FeatureValueDto = string | number | boolean | null | FeatureValueDto[]

Defined in: src/types/values.ts:443

Untagged value type used by homoiconic inference endpoints.

Remarks

Serialization format: Untagged (raw JSON primitives).

Produces raw JSON values: "hello", 42, true, null, ["uuid1", "uuid2"]. Used by: backward chaining, forward chaining, and other homoiconic inference endpoints. Do NOT use with term CRUD or query endpoints — use ValueDto instead.

The backend Rust type is FeatureValueDto in dto/homoiconic.rs with #[serde(untagged)]. Variant ordering:

  1. TermRef (UUID string)
  2. TermRefs/List (array of FeatureValueDto)
  3. String
  4. Integer (i64)
  5. Real (f64)
  6. Boolean
  7. Null (uninstantiated)

Ambiguity note: UUID strings and regular strings are both string in TypeScript. The backend distinguishes them by UUID format. The SDK provides discriminateFeatureValue() in utils/discrimination.ts for response parsing.