WardrikACP.Harness (wardrik_acp v0.1.0-rc.1)

Copy Markdown

A coding agent that WardrikACP starts over ACP, such as Claude Code.

claude: [
  command: "claude-agent-acp",
  env: %{"ANTHROPIC_API_KEY" => System.fetch_env!("ANTHROPIC_API_KEY")},
  meta: %{"claudeCode" => %{"options" => %{"settingSources" => []}}},
  options: %{"mode" => "default"},
  context: ["CLAUDE.md", "AGENTS.md"]
]
  • The command receives its env plus HOME, PATH and a few other basics, not your app's whole environment.
  • The command runs in the worktree. It reads and writes files there itself.
  • meta and options are specific to each coding agent. Check its ACP docs for the ones that make it ask before it acts.

Options

  • :command (String.t/0) - Required. The executable, found on PATH.

  • :args (list of String.t/0) - Arguments for the command. The default value is [].

  • :env (map of String.t/0 keys and String.t/0 values) - Environment variables for the command. The default value is %{}.

  • :meta (map of String.t/0 keys and term/0 values) - Sent as _meta when a session starts. The default value is %{}.

  • :options - Session config options to set, by category or ID, such as %{"model" => "opus"}. The default value is %{}.

  • :instructions (String.t/0) - Instructions for every session.

  • :context (list of String.t/0) - Files in the checkout added to the instructions, when present. The default value is [].

  • :description (String.t/0) - What the calling model reads about the tool.

  • :timeout (pos_integer/0) - Milliseconds a call may take. The default value is 1800000.

  • :idle (pos_integer/0) - Milliseconds the process runs with no call attached. It then stops. The default value is 900000.

Summary

Functions

Builds a harness named name. Raises if an option is invalid.

Types

t()

@type t() :: %WardrikACP.Harness{
  args: [String.t()],
  command: String.t(),
  context: [String.t()],
  description: String.t() | nil,
  env: %{required(String.t()) => String.t()},
  idle: pos_integer(),
  instructions: String.t() | nil,
  meta: map(),
  name: String.t(),
  options: %{required(String.t()) => String.t() | boolean()},
  timeout: pos_integer()
}

Functions

new!(name, opts)

@spec new!(atom() | String.t(), keyword()) :: t()

Builds a harness named name. Raises if an option is invalid.