Interface: TermResponse
@kortexya/reasoninglayer / TermResponse
Interface: TermResponse
Section titled “Interface: TermResponse”Defined in: src/types/terms.ts:151
Response wrapper for term CRUD operations.
Remarks
Section titled “Remarks”Important: Term CRUD endpoints return TermResponse, NOT raw TermDto.
The wrapper includes validation state, witness proofs, and residual witnesses
that indicate whether the term satisfies its sort’s type constraints.
Properties
Section titled “Properties”
optionaletag?:string
Defined in: src/types/terms.ts:184
The term’s content ETag, read from the ETag response header — the value
to send back as ifMatch on a later update or delete.
Remarks
Section titled “Remarks”Set by TermsClient.createTerm, TermsClient.getTerm and TermsClient.updateTerm whenever the engine sends the header, and absent whenever it does not. The engine sends none for:
- an
asOfread (a past state is not a representationIf-Matchcan guard); - a rule’s CONCLUSION (it lives in the resident store alone, and a write
onto it is refused with DerivedFactWriteError or
RuleTermWriteErroranyway); - a term answered straight from durable storage because the live store did not hold it.
A rule’s tag is not read here: getTerm(ruleId) answers 404 for a rule.
The rule routes publish it — AddRuleResponse.etag,
ReplaceRuleResponse.etag and the listing’s
RuleEntryDto.etag.
Not part of the response body: other routes that answer a TermResponse
never set it.
residualWitnesses?
Section titled “residualWitnesses?”
optionalresidualWitnesses?:ResidualWitnessDto[]
Defined in: src/types/terms.ts:159
Residuated witnesses awaiting more information.
state?
Section titled “state?”
optionalstate?:TermState
Defined in: src/types/terms.ts:155
Validation state of the term against its sort’s witnesses.
term:
TermDto
Defined in: src/types/terms.ts:153
The underlying term data.
witnessProofs?
Section titled “witnessProofs?”
optionalwitnessProofs?:WitnessProofDto[]
Defined in: src/types/terms.ts:157
Proofs of satisfied type witnesses.