Interface: CreateSortRequest
@kortexya/reasoninglayer / CreateSortRequest
Interface: CreateSortRequest
Section titled “Interface: CreateSortRequest”Defined in: src/types/sorts.ts:552
Properties
Section titled “Properties”annotations?
Section titled “annotations?”
optionalannotations?:Record<string,string>
Defined in: src/types/sorts.ts:608
Custom annotations on the sort — the same map SortDto.annotations reads back, so a client can round-trip what it declared.
Remarks
Section titled “Remarks”Used, among others, for a governance_threshold that tool discovery
enforces down the subsort chain (GET /api/v1/tools/discover).
boundConstraints?
Section titled “boundConstraints?”
optionalboundConstraints?:BoundConstraintDto[]
Defined in: src/types/sorts.ts:588
Inter-feature ordering constraints.
description?
Section titled “description?”
optionaldescription?:string|null
Defined in: src/types/sorts.ts:590
Human-readable description.
features?
Section titled “features?”
optionalfeatures?:FeatureDescriptorDto[]
Defined in: src/types/sorts.ts:586
Feature descriptors.
optionalid?:string|null
Defined in: src/types/sorts.ts:572
Optional sort UUID. If omitted, the engine mints one.
Remarks
Section titled “Remarks”The id must be unused, or name one of the caller’s own sorts. An own id
makes the write an update of that sort: parents, features, description
and the review flag merge onto it, and its name is kept. The engine
refuses with 409 and a SortCreateErrorCode:
sort_id_held_under_another_name— an own id with a different name. Rename withPATCH /api/v1/sorts/{id}instead.sort_id_unavailable— an id that another tenant’s sort holds, a shared-lattice id posted under a different name, or a name-based (version 5) UUID that names none of the caller’s own sorts. The engine reserves that form for the ids it derives.
The shared-lattice id the engine derives from the same name is refused
with 400 (BadRequestError), not 409: shared sorts are engine-defined.
optionalname?:string
Defined in: src/types/sorts.ts:574
Sort name.
parents?
Section titled “parents?”
optionalparents?:string[]
Defined in: src/types/sorts.ts:584
Parent sort UUIDs (multiple inheritance).
Remarks
Section titled “Remarks”Each id must name a sort of the caller’s tenant, or a shared system
sort. Another tenant’s sort id is refused with 400 (parent sort(s) do not exist: <id>), byte-identical to an unknown id, so the answer does not
reveal that the sort exists.
witnesses?
Section titled “witnesses?”
optionalwitnesses?:Record<string,unknown>[]
Defined in: src/types/sorts.ts:622
Existential witnesses — proof obligations a term must discharge to belong to this sort.
Remarks
Section titled “Remarks”Each entry is a JSON ExistentialWitness (variables, constraints,
certainty). When witness validation cannot conclude immediately, the term
is residuated rather than refused — which is why a witness is a
constraint on belonging and not a validation rule.
Opaque to the SDK: the engine declares the entries as free-form objects, so there is no shipped type to narrow them to.
worldMode?
Section titled “worldMode?”
optionalworldMode?:WorldModeDto
Defined in: src/types/sorts.ts:599
The world assumption for this sort — open (default) or closed.
Remarks
Section titled “Remarks”The JSON twin of OSFQL DEFINE … @closed. Declaring required: true on
an open sort constrains nothing, so a schema that means its required
features must say closed here.