class
LLM::ACPClient
- LLM::ACPClient
- Reference
- Object
Overview
ACP-backed client wrapper for communicating with local AI agents.
Defined in:
llm/acp/client.crConstant Summary
-
CLAUDE_ARGS =
["@zed-industries/claude-agent-acp"] -
CODEX_ARGS =
["@zed-industries/codex-acp"] -
GEMINI_ARGS =
["--experimental-acp"] -
KNOWN_TARGETS =
["codex", "gemini", "claude", "claude-code"] of ::String -
ACP targets Noir knows how to launch. Anything outside this set would be executed as an arbitrary local process (
--ai-provider "acp:rm -rf /"→ command "rm", args ["-rf", "/"]), which is a code-execution hole when the provider string comes from an untrusted config file. Custom targets are refused unless the operator explicitly opts in.
Constructors
Class Method Summary
- .acp_provider?(provider : String) : Bool
-
.allowed_target?(provider : String) : Bool
True when the provider resolves to a built-in target, or the operator opted into custom commands.
-
.custom_command_allowed? : Bool
Escape hatch for power users running their own ACP agent binary.
- .default_model(provider : String, model : String) : String
- .extract_target(provider : String) : String
- .mute_acp_logs : Nil
-
.resolve_command(provider : String) : Tuple(String, Array(String))
Resolve provider aliases to actual executable command + args.
Instance Method Summary
- #args : Array(String)
- #close : Nil
- #command : String
- #model : String
- #provider : String
- #request(prompt : String, format : String = "json") : String
- #request_messages(messages : Array(Hash(String, String)), format : String = "json") : String
Constructor Detail
Class Method Detail
True when the provider resolves to a built-in target, or the operator opted into custom commands. Used for a friendly CLI-time pre-flight.
Escape hatch for power users running their own ACP agent binary. Off by
default so a poisoned .noir.yml can't silently spawn a process.
Resolve provider aliases to actual executable command + args.