Generates condensed context artifacts from agent sessions.
Unlike session export (#284) which produces a full transcript for humans,
context artifacts produce a compact summary designed for feeding to a
future agent session via @.minga/context/session-summary-{id}.md.
A 50K-token session with dozens of tool calls collapses into a 1-2K token context file that a fresh session can consume efficiently.
Summary
Types
Options for artifact generation.
Functions
Lists existing context artifacts in the project.
Saves a generated summary to the .minga/context/ directory.
Returns true if the conversation has enough content to be worth summarizing.
Returns the meta-prompt to inject for summary generation.
Types
Functions
Lists existing context artifacts in the project.
@spec save(String.t(), artifact_opts()) :: {:ok, String.t()} | {:error, String.t()}
Saves a generated summary to the .minga/context/ directory.
Returns {:ok, path} or {:error, reason}.
@spec summarizable?([ReqLLM.Message.t()]) :: boolean()
Returns true if the conversation has enough content to be worth summarizing.
Requires at least 2 non-system messages (one user + one assistant).
@spec summary_prompt() :: String.t()
Returns the meta-prompt to inject for summary generation.