Skip to content

Interface: RecordTurnRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / RecordTurnRequest

Defined in: src/types/conversation.ts:1035

Request to record an externally-produced conversation turn.

This is the durable-conversation seam for clients that drive their own model. Unlike ConversationMessageRequest, recording a turn does not run the NL→OSFQL answer pipeline — the content was already generated by a client agent (e.g. the osfcode coding agent). The backend persists the turn as a Ψ-term so it owns the durable conversation record, session memory, and downstream extraction.

content: string

Defined in: src/types/conversation.ts:1040

The turn’s content text.


optional conversationKind?: RecordableConversationKind | null

Defined in: src/types/conversation.ts:1063

The surface this turn is recorded for.

  • On create, an absent kind means external_agent.
  • On an existing conversation, a kind other than the stored one is refused 409 (ConstraintViolationError); an absent kind accepts the stored kind.
  • assistant and generative_ui cannot be named here: their own routes (sendMessage, ui.generate) own those conversations, and the engine refuses them 400. The type excludes them.

optional osfql?: string | null

Defined in: src/types/conversation.ts:1043

Optional OSFQL associated with the turn (the executed query, if any).


optional payload?: unknown

Defined in: src/types/conversation.ts:1050

Opaque structured card state for surfaces whose turns are richer than text (drafts, questions, findings…). Stored verbatim and returned on the turn by getTurns; the server never interprets it, and the SDK never re-cases its keys.


role: string

Defined in: src/types/conversation.ts:1037

Turn role, e.g. "user" or "assistant".


optional title?: string | null

Defined in: src/types/conversation.ts:1066

Human title for the conversation. Applied on create, or later if it has none yet.