Skip to content

Interface: CreateSortRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / CreateSortRequest

Defined in: src/types/sorts.ts:552

optional annotations?: 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.

Used, among others, for a governance_threshold that tool discovery enforces down the subsort chain (GET /api/v1/tools/discover).


optional boundConstraints?: BoundConstraintDto[]

Defined in: src/types/sorts.ts:588

Inter-feature ordering constraints.


optional description?: string | null

Defined in: src/types/sorts.ts:590

Human-readable description.


optional features?: FeatureDescriptorDto[]

Defined in: src/types/sorts.ts:586

Feature descriptors.


optional id?: string | null

Defined in: src/types/sorts.ts:572

Optional sort UUID. If omitted, the engine mints one.

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 with PATCH /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.


optional name?: string

Defined in: src/types/sorts.ts:574

Sort name.


optional parents?: string[]

Defined in: src/types/sorts.ts:584

Parent sort UUIDs (multiple inheritance).

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.


optional witnesses?: Record<string, unknown>[]

Defined in: src/types/sorts.ts:622

Existential witnesses — proof obligations a term must discharge to belong to this sort.

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.


optional worldMode?: WorldModeDto

Defined in: src/types/sorts.ts:599

The world assumption for this sort — open (default) or closed.

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.