pub fn format_capability_payload(
capability: &str,
payload_json: &str,
) -> Result<String, CapabilityPayloadError>Expand description
Format the per-capability JSON payload into a natural-language
task for the selected agent. The contract is per-capability and
documented in docs/agent-bundle-spec.md.
This is intentionally NOT a silent fallback. Callers send this
JSON from a structured intent definition (Swift @AppIntent
parameters → JSON encode); a missing field means the host’s
intent shape drifted from the runtime’s expectation, and we’d
rather hard-error at the FFI boundary than send raw JSON to a
model that will dutifully summarize the JSON itself.