Skip to main content

expand_placeholders

Function expand_placeholders 

Source
pub fn expand_placeholders(
    value: &str,
    plugin_root: &Path,
    plugin_data: &Path,
) -> String
Expand description

Single-pass, non-recursive placeholder expansion.

Replaces every exact occurrence of ${PLUGIN_ROOT} and ${PLUGIN_DATA} without rescanning replacement text, per Agent Plugins ยง9.2. Unrecognized placeholder-like text is left literal and no other expansion is performed. Expansion applies only to args, env values, and cwd; callers must not apply it to command, env keys, URLs, or headers.