pub async fn preprocess_command_injections(
content: &str,
executor: &dyn CommandExecutor,
) -> StringExpand description
Preprocess !command`` placeholders in skill content.
Each !command`` is executed via the provided executor and replaced with
its stdout. Execution is bounded: at most
MAX_COMMAND_PLACEHOLDERS_PER_SKILL placeholders are expanded per call
(extras are replaced with [Too many command placeholders: limit is N]
sentinels), and at most COMMAND_EXECUTION_CONCURRENCY commands run
concurrently.
Substitution pipeline order (caller is responsible for prior steps):
$ARGUMENTS/$Nsubstitution (sync)${SESSION_ID}/${SKILL_DIR}env substitution (sync)!command`` preprocessing (async) — this function
SECURITY: This function spawns shell processes on the worker host. It MUST only be called for skill content that came from a trusted source (see the trust-gate note at the top of this module). Untrusted content must bypass this step and be used verbatim.