Packages

Prompt Runner SDK - packet-first prompt execution for Elixir and CLI workflows with verifier-owned completion, retry, repair, and git-aware repository orchestration.

Current section

Files

Jump to
prompt_runner_sdk lib prompt_runner committer callback_committer.ex
Raw

lib/prompt_runner/committer/callback_committer.ex

defmodule PromptRunner.Committer.CallbackCommitter do
@moduledoc """
Committer that delegates post-run handling to a callback function.
"""
@behaviour PromptRunner.Committer
@impl true
def commit(plan, prompt, llm, opts) do
callback = opts[:callback] || opts[:fun]
if is_function(callback, 3) do
callback.(plan, prompt, llm)
else
{:skip, :noop}
end
end
end