Gralkor.Message (gralkor_ex v2.1.3)

Copy Markdown View Source

Canonical message shape that Gralkor expects at its port boundary.

One shape, three roles. Adapters normalise their harness's events into this form before calling Gralkor.Client.capture/3.

  • :role"user" | "assistant" | "behaviour". behaviour collapses thinking, tool calls, tool results, and any other harness-internal activity into a single role; Gralkor does not branch on interior shape beyond role.

  • :content — a string. Adapters choose how to render their events; Gralkor passes the content through to the distillation LLM and to the interpret prompt, labelled only by role.

Summary

Types

role()

@type role() :: String.t()

t()

@type t() :: %Gralkor.Message{content: String.t(), role: role()}

Functions

new(role, content)

@spec new(role(), String.t()) :: t()