Interface: ConversationMessageResponse
@kortexya/reasoninglayer / ConversationMessageResponse
Interface: ConversationMessageResponse
Section titled “Interface: ConversationMessageResponse”Defined in: src/types/conversation.ts:723
Response from processing a conversation message.
Remarks
Section titled “Remarks”Contains the assistant’s NL response, the OSFQL that was generated and executed, query results (for MATCH queries), and contextual suggestions for follow-up queries.
Properties
Section titled “Properties”abstention?
Section titled “abstention?”
optionalabstention?:ConversationAbstention
Defined in: src/types/conversation.ts:913
Why the turn abstained, set exactly when answerState is abstained.
answerState?
Section titled “answerState?”
optionalanswerState?:ConversationAnswerState
Defined in: src/types/conversation.ts:911
verified or abstained on a turn that answers a question (proposal for
a proposed write); absent on a turn that answers none. A verified answer
states only the claims; an abstained one
states no fact.
assistantMessage
Section titled “assistantMessage”assistantMessage:
string
Defined in: src/types/conversation.ts:729
The assistant’s natural language response.
claimAnnotations?
Section titled “claimAnnotations?”
optionalclaimAnnotations?:ClaimAnnotationDto[] |null
Defined in: src/types/conversation.ts:798
Per-claim provenance annotations (if claims were annotated).
claims
Section titled “claims”claims:
VerifiedClaim[]
Defined in: src/types/conversation.ts:918
The factual sentences of the answer, in order, each confirmed by a bound row or derived by a rule. Nothing else of the answer states a fact.
cognitiveStrategy?
Section titled “cognitiveStrategy?”
optionalcognitiveStrategy?:CognitiveStrategyDto|null
Defined in: src/types/conversation.ts:810
Cognitive strategy used for this response (when RL training is active and a cognitive agent exists for the tenant). Absent on plain conversation turns.
contentProbes?
Section titled “contentProbes?”
optionalcontentProbes?:unknown
Defined in: src/types/conversation.ts:725
Opaque native JSON retained verbatim, including explicit null.
conversationId
Section titled “conversationId”conversationId:
string
Defined in: src/types/conversation.ts:732
The conversation ID (existing or newly created).
frameAmbiguities
Section titled “frameAmbiguities”frameAmbiguities:
FrameAmbiguity[]
Defined in: src/types/conversation.ts:883
Mentions the frame could not bind on its own (frameMode is ambiguous).
frameMode?
Section titled “frameMode?”
optionalframeMode?:FrameMode
Defined in: src/types/conversation.ts:881
How frame mode handled this turn; absent when frame mode did not run.
frameRecordId?
Section titled “frameRecordId?”
optionalframeRecordId?:string
Defined in: src/types/conversation.ts:885
The id of the stored frame record (a Psi-term on the turn), when one was stored.
frameRetries
Section titled “frameRetries”frameRetries:
number
Defined in: src/types/conversation.ts:891
Grounded frame-generation retries actually attempted, including retries
that end in a fallback, a clarification or an inconsistency. Separate from
repaired, which describes rewrites of an OSFQL proposal.
gateAbstained
Section titled “gateAbstained”gateAbstained:
boolean
Defined in: src/types/conversation.ts:897
Whether the certified gate declined this turn without executing its
proposed read. osfqlExecuted may then echo the refused proposal: do not
read it as a successful query with an empty result.
injection?
Section titled “injection?”
optionalinjection?:InjectionSummary|null
Defined in: src/types/conversation.ts:871
What adaptive injection carried and cost. Present only when the request set ConversationMessageRequest.injection.
intent
Section titled “intent”intent:
string
Defined in: src/types/conversation.ts:743
Classified intent type (e.g., “query”, “insert”, “define”).
matchedTemplates?
Section titled “matchedTemplates?”
optionalmatchedTemplates?:QueryTemplate[] |null
Defined in: src/types/conversation.ts:865
Query templates matching the turn’s intent and referenced sort, for suggesting reusable patterns.
modelId?
Section titled “modelId?”
optionalmodelId?:string|null
Defined in: src/types/conversation.ts:842
The model id (compare registry) that produced this turn, when a per-request model was set — so a UI can label which model a side-by-side column came from.
nextQuestions
Section titled “nextQuestions”nextQuestions:
ConversationNextQuestion[]
Defined in: src/types/conversation.ts:937
Evidence-specific follow-ups, in display order.
notices
Section titled “notices”notices:
ConversationNotice[]
Defined in: src/types/conversation.ts:795
What the engine did to the question before it answered it, in the order it did it: features it skipped, literals it resolved to values in the data, or a retrieval by meaning that stands in for an exact match. Empty when the answer is to the question as asked.
Remarks
Section titled “Remarks”Each notice is typed by kind and carries its data. Show a notice as a
notice, not as a clickable suggestion, and branch on kind, never on the
English message.
originalOsfql?
Section titled “originalOsfql?”
optionaloriginalOsfql?:string|null
Defined in: src/types/conversation.ts:764
The OSFQL the LLM first proposed. Always set when repaired is true, and absent
otherwise. Pairs with osfqlExecuted (the rewrite) so the UI can show the
original → executed diff.
osfqlExecuted?
Section titled “osfqlExecuted?”
optionalosfqlExecuted?:string|null
Defined in: src/types/conversation.ts:746
OSFQL that was executed (if any).
prefillMs?
Section titled “prefillMs?”
optionalprefillMs?:number|null
Defined in: src/types/conversation.ts:853
Prompt-prefill wall-clock (ms) for the NL→OSFQL generation — the one-time cost before decoding begins.
Remarks
Section titled “Remarks”Surfaced beside tokensPerSec (which is decode-only on the device path) so a short query’s prefill is visible instead of crushing the apparent rate. Absent unless measured.
presentation?
Section titled “presentation?”
optionalpresentation?:unknown
Defined in: src/types/conversation.ts:726
producedTermIds
Section titled “producedTermIds”producedTermIds:
string[]
Defined in: src/types/conversation.ts:770
IDs of terms produced by the OSFQL execution.
promptTrace?
Section titled “promptTrace?”
optionalpromptTrace?:PromptTrace|null
Defined in: src/types/conversation.ts:879
Privileged diagnostic echo of the system prompt and the assembled context. Present only when the request set ConversationMessageRequest.includePromptTrace and the engine granted it.
proofTrace?
Section titled “proofTrace?”
optionalproofTrace?:ProofTraceNodeDto|null
Defined in: src/types/conversation.ts:801
Proof tree for this response (populated when PROVE / backward chaining was used).
queryFrame?
Section titled “queryFrame?”
optionalqueryFrame?:Readonly<Record<string,unknown>>
Defined in: src/types/conversation.ts:904
The query frame the turn was answered from (validated, normalised, mentions
resolved with their degrees). Opaque JSON in the engine’s frame encoding
(snake_case keys, passed through verbatim): render it, let the user edit
it, and send it to POST /api/v1/conversation/{id}/frames/execute.
queryResults?
Section titled “queryResults?”
optionalqueryResults?:Record<string,OsfqlValue>[] |null
Defined in: src/types/conversation.ts:767
Query results (if OSFQL was a MATCH). Each entry maps variable names to bound values.
reasoningTrace?
Section titled “reasoningTrace?”
optionalreasoningTrace?:ReasoningTraceDto|null
Defined in: src/types/conversation.ts:818
LLM-as-sensor reasoning trace: the ordered pipeline stages
(prepare_context → classify_intent → execute_osfql → generate_response),
each tagged symbolic/sensor with matched entities and the OSFQL path.
Powers the chat’s reasoning/audit explainability timeline.
refinement?
Section titled “refinement?”
optionalrefinement?:unknown
Defined in: src/types/conversation.ts:727
repaired?
Section titled “repaired?”
optionalrepaired?:boolean
Defined in: src/types/conversation.ts:757
True when the engine rewrote the LLM-proposed query before it executed it: a
constrained-regeneration repair of a query the certify-or-abstain gate rejected as
hallucinated, a projection prune, a value grounding, the retrieval rescue, or the no-code
builder’s DEFINE of each sort the program asserts into and the tenant does not have. Lets
the UI surface that the answer reflects a rewritten query rather than the user’s literal
request. notices says what a prune, a value grounding or a retrieval rescue did; the
builder changes no answer, and the originalOsfql → osfqlExecuted diff shows its DEFINEs.
strippedClaims
Section titled “strippedClaims”strippedClaims:
StrippedClaim[]
Defined in: src/types/conversation.ts:920
The sentences the engine removed from the drafted answer, with why.
suggestions
Section titled “suggestions”suggestions:
string[]
Defined in: src/types/conversation.ts:782
Follow-up suggestions: questions or OSFQL the user may send next.
Remarks
Section titled “Remarks”Holds only suggestions. What the engine did to the question before it answered is in notices, never here.
tokensPerSec?
Section titled “tokensPerSec?”
optionaltokensPerSec?:number|null
Defined in: src/types/conversation.ts:859
Decode throughput for the NL→OSFQL generation, in tokens/second (wall-clock of the LLM call ÷ generated tokens). Approximate; surfaced for model comparison.
toVerify?
Section titled “toVerify?”
optionaltoVerify?:ToVerifyPoint[]
Defined in: src/types/conversation.ts:922
Points the engine marked for verification, in display order.
turnId
Section titled “turnId”turnId:
string
Defined in: src/types/conversation.ts:740
The assistant turn the answer was stored as. Pass it to
submitAnswerFeedback to rate the answer; it is also the turn’s id in
getTurns. Every answer is stored, so every answer carries it: the
certify-or-abstain refusal and the could-not-process reply included.
uiCustomizations?
Section titled “uiCustomizations?”
optionaluiCustomizations?:UICustomizationDto[] |null
Defined in: src/types/conversation.ts:804
UI customizations detected in this response (for multi-turn UI evolution).
uiSortId?
Section titled “uiSortId?”
optionaluiSortId?:string|null
Defined in: src/types/conversation.ts:773
Sort ID referenced in the message (for UI rendering).
unconfirmed?
Section titled “unconfirmed?”
optionalunconfirmed?:UnconfirmedRecord[]
Defined in: src/types/conversation.ts:929
What the query returned that no person confirmed, shown as unconfirmed and never used as support.
unreadPages?
Section titled “unreadPages?”
optionalunreadPages?:UnreadPages[]
Defined in: src/types/conversation.ts:935
The documents the answer drew on that were not read whole, with the pages not read and why. What those pages say is absent from the answer, and the turn says so.
validityCertificateHash?
Section titled “validityCertificateHash?”
optionalvalidityCertificateHash?:string|null
Defined in: src/types/conversation.ts:821
SHA-256 hash of the validity certificate.
validityCertificateId?
Section titled “validityCertificateId?”
optionalvalidityCertificateId?:string|null
Defined in: src/types/conversation.ts:824
ID of the validity certificate (if generate_certificate was true).
validityCertificateRuleProgramHash?
Section titled “validityCertificateRuleProgramHash?”
optionalvalidityCertificateRuleProgramHash?:string|null
Defined in: src/types/conversation.ts:830
Hex SHA-256 of the rule program active when the validity certificate was issued — the durable “which rule version served this proof” pin.
validityCertificateRuleRevision?
Section titled “validityCertificateRuleRevision?”
optionalvalidityCertificateRuleRevision?:number|null
Defined in: src/types/conversation.ts:836
In-process rule-program revision ordinal at issuance. Present only when rule-revision tracking is enabled on the executing store.
webSources?
Section titled “webSources?”
optionalwebSources?:WebSource[]
Defined in: src/types/conversation.ts:924
Pages read during this turn’s web search.