Gralkor.Ingest (jido_gralkor v11.0.0)

Copy Markdown View Source

A request to ingest content through a registered Gralkor.Lens.

id is the caller's non-blank, replay-stable identity for this logical ingestion. A consumer may reuse it as the invocation identity for a related Reflection. operator_id identifies the operator whose local Lens group is used; global Lenses ignore it for storage placement. lens is the registered Lens name. Gralkor resolves that definition before invoking its ingestion process, so callers provide content and source context rather than ontology or group details. source_kind is the deterministic origin enum: conversations and documents carry text, while structured records carry a JSON-compatible map or list. It describes provenance, not credibility or truth.

Summary

Types

source_kind()

@type source_kind() :: :conversation | :document | :structured_record

t()

@type t() ::
  %Gralkor.Ingest{
    content: String.t(),
    id: String.t(),
    lens: String.t(),
    operator_id: String.t(),
    source_description: String.t(),
    source_kind: :conversation
  }
  | %Gralkor.Ingest{
      content: String.t(),
      id: String.t(),
      lens: String.t(),
      operator_id: String.t(),
      source_description: String.t(),
      source_kind: :document
    }
  | %Gralkor.Ingest{
      content: map() | list(),
      id: String.t(),
      lens: String.t(),
      operator_id: String.t(),
      source_description: String.t(),
      source_kind: :structured_record
    }

Functions

encode_content!(arg1, content)

@spec encode_content!(source_kind(), String.t() | map() | list()) :: String.t()

validate_id!(id)

@spec validate_id!(term()) :: :ok

validate_operator_id!(operator_id)

@spec validate_operator_id!(term()) :: :ok

validate_source!(kind, content)

@spec validate_source!(source_kind() | term(), term()) :: :ok