Gralkor.Message (jido_gralkor v5.0.0)

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 the configured client's capture/5, /6, or /7.

  • :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; In implicit-default mode Gralkor renders user and assistant content into the captured transcript and uses role labels in recall context. A selected Lens's ingestion process decides how its captured messages are persisted.

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()