Interface: ConversationMessageResponse
@kortexya/reasoninglayer / ConversationMessageResponse
Interface: ConversationMessageResponse
Section titled “Interface: ConversationMessageResponse”Defined in: src/types/conversation.ts:638
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”assistantMessage
Section titled “assistantMessage”assistantMessage:
string
Defined in: src/types/conversation.ts:640
The assistant’s natural language response.
claimAnnotations?
Section titled “claimAnnotations?”
optionalclaimAnnotations?:ClaimAnnotationDto[] |null
Defined in: src/types/conversation.ts:709
Per-claim provenance annotations (if claims were annotated).
cognitiveStrategy?
Section titled “cognitiveStrategy?”
optionalcognitiveStrategy?:CognitiveStrategyDto|null
Defined in: src/types/conversation.ts:721
Cognitive strategy used for this response (when RL training is active and a cognitive agent exists for the tenant). Absent on plain conversation turns.
conversationId
Section titled “conversationId”conversationId:
string
Defined in: src/types/conversation.ts:643
The conversation ID (existing or newly created).
frameAmbiguities
Section titled “frameAmbiguities”frameAmbiguities:
FrameAmbiguity[]
Defined in: src/types/conversation.ts:794
Mentions the frame could not bind on its own (frameMode is ambiguous).
frameMode?
Section titled “frameMode?”
optionalframeMode?:FrameMode
Defined in: src/types/conversation.ts:792
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:796
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:802
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:808
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:782
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:654
Classified intent type (e.g., “query”, “insert”, “define”).
matchedTemplates?
Section titled “matchedTemplates?”
optionalmatchedTemplates?:QueryTemplate[] |null
Defined in: src/types/conversation.ts:776
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:753
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.
notices
Section titled “notices”notices:
ConversationNotice[]
Defined in: src/types/conversation.ts:706
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:675
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:657
OSFQL that was executed (if any).
prefillMs?
Section titled “prefillMs?”
optionalprefillMs?:number|null
Defined in: src/types/conversation.ts:764
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.
producedTermIds
Section titled “producedTermIds”producedTermIds:
string[]
Defined in: src/types/conversation.ts:681
IDs of terms produced by the OSFQL execution.
promptTrace?
Section titled “promptTrace?”
optionalpromptTrace?:PromptTrace|null
Defined in: src/types/conversation.ts:790
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:712
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:815
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:678
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:729
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.
repaired?
Section titled “repaired?”
optionalrepaired?:boolean
Defined in: src/types/conversation.ts:668
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.
suggestions
Section titled “suggestions”suggestions:
string[]
Defined in: src/types/conversation.ts:693
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:770
Decode throughput for the NL→OSFQL generation, in tokens/second (wall-clock of the LLM call ÷ generated tokens). Approximate; surfaced for model comparison.
turnId
Section titled “turnId”turnId:
string
Defined in: src/types/conversation.ts:651
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:715
UI customizations detected in this response (for multi-turn UI evolution).
uiSortId?
Section titled “uiSortId?”
optionaluiSortId?:string|null
Defined in: src/types/conversation.ts:684
Sort ID referenced in the message (for UI rendering).
validityCertificateHash?
Section titled “validityCertificateHash?”
optionalvalidityCertificateHash?:string|null
Defined in: src/types/conversation.ts:732
SHA-256 hash of the validity certificate.
validityCertificateId?
Section titled “validityCertificateId?”
optionalvalidityCertificateId?:string|null
Defined in: src/types/conversation.ts:735
ID of the validity certificate (if generate_certificate was true).
validityCertificateRuleProgramHash?
Section titled “validityCertificateRuleProgramHash?”
optionalvalidityCertificateRuleProgramHash?:string|null
Defined in: src/types/conversation.ts:741
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:747
In-process rule-program revision ordinal at issuance. Present only when rule-revision tracking is enabled on the executing store.