Skip to main content

render_artifact

Function render_artifact 

Source
pub fn render_artifact(agent: AgentId, capability: Capability) -> String
Expand description

Compose the full file contents for agent: per-agent frontmatter (if any) followed by the managed-section delimiters wrapping BODY, plus a trailing newline.

Centralizes the wrapping logic so every install path produces byte-stable, deterministic output (no timestamps, no host-specific strings).

ยงPanics

Panics with unreachable! if called for AgentId::Copilot. Callers MUST gate on has_artifact_writer first; reaching this branch is a logic bug.