pub(super) fn set_manifest_component(
export: &mut BundleExport,
key: &str,
entries: Vec<Value>,
) -> Result<(), String>Expand description
Register entries under components.<key> in the export’s manifest (bundle.json).
Takes JSON values rather than paths: most components are a list of archive
paths, but projectInstructions carries an object per file, because a bare
path could not express the owner discriminator that keeps import from
installing somebody else’s instructions.
The manifest is built as an inline json! literal in bundle_export.rs
with no struct behind it (export_bundle), so every agent-aware
component has to reopen and rewrite it. Shared by the memory splice below
and the history splice, which otherwise duplicated the find-parse-rewrite
dance byte for byte.
No-ops on an empty list: components keys are all optional, and writing
"history": [] would assert “this archive has an empty history” where
absence already says “none”.