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 llm.ex
Raw

lib/prompt_runner/llm.ex

defmodule PromptRunner.LLM do
@moduledoc """
Behaviour and types for LLM integrations.
"""
@type sdk :: :claude | :codex | :amp | :cursor | :antigravity | :simulated
@type provider :: sdk()
@type stream_event :: map()
@type stream :: Enumerable.t()
@type close_fun :: (-> any())
@callback normalize_provider(term()) :: provider() | {:error, term()}
@callback normalize_sdk(term()) :: sdk | {:error, term()}
@callback start_stream(map(), String.t()) ::
{:ok, stream(), close_fun(), map()} | {:error, term()}
@callback resume_stream(map(), map(), String.t()) ::
{:ok, stream(), close_fun(), map()} | {:error, term()}
end