pub async fn dispatch(
product: &str,
version: &str,
args: Vec<String>,
file_config: RawConfig,
) -> i32Expand description
Dispatch args (everything after argv[0]) and return the process exit code.
file_config is the agent’s own settings-file layer, sitting below the
environment in precedence. Each agent stores settings differently — Claude
Code uses .claude/<plugin>.local.md, Qwen and agy will use their own — so
the format is the plugin’s business while the precedence is decided once,
here. Pass RawConfig::default() for an agent with no settings file.
Exit codes are part of the contract with the launching agent: 0 success, 1 serve terminated with an error, 2 bad usage, 3 the log file could not be opened.
A bad or absent Ghidra CONFIGURATION is deliberately not among them: serve
starts anyway and reports the problem on the first tool call, so that a host
listing the tool schemas gets them on a machine with no Ghidra install.