Skip to content

Interface: OsfqlTermValue

@kortexya/reasoninglayer


@kortexya/reasoninglayer / Osfql / OsfqlTermValue

Interface: OsfqlTermValue

Defined in: src/types/osfql.ts:44

A nested Psi-term returned by a FETCH clause.

Remarks

The OSF-native “document”: a sort name plus the term’s named features, each resolved to a nested value with coreference inlined into containment. A document IS a Psi-term — there is no separate document type. A shared or cyclic reference that was left un-inlined appears as an OsfqlValue term_ref instead, preserving coreference identity.

Serialized as {"sort": "person", "features": {"name": {"type": "string", "value": "Alice"}}}. The backend publishes features as a free-form JSON object (#[schema(value_type = Object)]), which erases the recursion; the Rust type is BTreeMap<String, OsfqlValueDto>, so the SDK ships the true recursive shape.

Example

const term: OsfqlTermValue = {
sort: 'person',
features: { name: { type: 'string', value: 'Alice' } },
};

Properties

features

features: Record<string, OsfqlValue>

Defined in: src/types/osfql.ts:46

The term’s named features, each resolved to a nested value.


sort

sort: string

Defined in: src/types/osfql.ts:48

The term’s sort name.