Packages

Jido plugin and actions that adapt the Gralkor memory server into a Jido agent. Drop in the plugin for recall-on-query and capture-on-completion; add the actions to your ReAct tools list for explicit memory_search / memory_add.

Current section

Files

Jump to
jido_gralkor lib gralkor generalisation_parse_failed.ex
Raw

lib/gralkor/generalisation_parse_failed.ex

defmodule Gralkor.GeneralisationParseFailed do
@moduledoc """
Raised when a string cannot be decoded as a generalisation — the `GEN|v1|`
prefix is missing, the JSON metadata is malformed, or required fields are
absent.
Distinct from `RuntimeError` so callers can distinguish "this graphiti fact
is not a generalisation" (skip) from "the data is corrupted" (log and raise).
See `ex-generalisation` in `TEST_TREES.md`.
"""
defexception [:message, :raw]
@impl true
def exception(opts) do
raw = Keyword.get(opts, :raw)
%__MODULE__{
message:
Keyword.get(
opts,
:message,
"generalisation metadata could not be parsed (raw: #{inspect(raw)})"
),
raw: raw
}
end
end