Skip to main content

normalize_bundle_upsert_input

Function normalize_bundle_upsert_input 

Source
pub(super) fn normalize_bundle_upsert_input(data: Value) -> Value
Expand description

Normalize a bundle.upsert request body into the shape the Bundle struct deserializes from, so MuxAPI accepts the request exactly as documented in the spec:

  • id may be omitted to create (the struct has no serde default), so an absent or null id is filled with an empty string (the handler then mints a UUID).
  • context_files / mcp_servers / skills are JSON-encoded array strings on the struct, but the spec shows them as JSON arrays. Array values are re-encoded to their JSON string form; values already given as strings pass through untouched.