MCPcopy Create free account
hub / github.com/AIScientists-Dev/Flowtrace / parse_payload

Function parse_payload

crates/flowtrace-cli/src/reply.rs:237–240  ·  view source on GitHub ↗

Parse stdin content as a typed [`StructuredOutput`] payload. Validates against the schema at parse time: required fields (headline, status) must be present; the status enum must be one of `partial|complete|blocked|error`; every evidence variant's required fields must be present. Unknown top-level fields are tolerated for forward-compatibility.

(s: &str)

Source from the content-addressed store, hash-verified

235/// every evidence variant's required fields must be present. Unknown top-level
236/// fields are tolerated for forward-compatibility.
237pub fn parse_payload(s: &str) -> Result<StructuredOutput> {
238 serde_json::from_str::<StructuredOutput>(s)
239 .context("reply payload must be valid JSON (StructuredOutput shape — see `flowtrace explain reply`)")
240}

Callers 1

cmd_replyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…