PromptRunner.Config (PromptRunnerSDK v0.4.0)

Copy Markdown View Source

Loads and normalizes configuration for the prompt runner.

Summary

Functions

Builds the LLM configuration map for a specific prompt by deep-merging root-level defaults with per-prompt overrides.

Types

repo_config()

@type repo_config() :: %{name: String.t(), path: String.t(), default: boolean()}

t()

@type t() :: %PromptRunner.Config{
  adapter_opts: map(),
  allowed_tools: list() | nil,
  claude_opts: map(),
  cli_confirmation: :off | :warn | :require,
  codex_opts: map(),
  codex_thread_opts: map(),
  commit_messages_file: String.t(),
  config_dir: String.t(),
  events_mode: :compact | :full | :off,
  llm_sdk: PromptRunner.LLM.sdk(),
  log_dir: String.t(),
  log_meta: :none | :full,
  log_mode: :compact | :verbose | :studio,
  model: String.t(),
  permission_mode: atom() | nil,
  phase_names: map(),
  progress_file: String.t(),
  project_dir: String.t() | nil,
  prompt_overrides: map(),
  prompts_file: String.t(),
  repo_groups: map(),
  target_repos: [repo_config()] | nil,
  timeout: pos_integer() | :unbounded | :infinity | nil,
  tool_output: :summary | :preview | :full
}

Functions

llm_for_prompt(config, prompt)

@spec llm_for_prompt(t(), map()) :: map()

Builds the LLM configuration map for a specific prompt by deep-merging root-level defaults with per-prompt overrides.

load(config_path)

@spec load(String.t()) :: {:ok, t()} | {:error, term()}

with_overrides(config, opts)

@spec with_overrides(
  t(),
  keyword()
) :: t()