parseEnvelopeReply function

CapabilityReply? parseEnvelopeReply(
  1. Object? body,
  2. String expectedThreadId
)

Parse an inbound envelope body directly into a reply to the request threaded expectedThreadId — the entry point for a UI's inbound dispatch, which holds only the body value. null when the body is not a governance/capability/* reply, or belongs to a different exchange.

Implementation

CapabilityReply? parseEnvelopeReply(Object? body, String expectedThreadId) {
  final doc = parseEnvelopeDocumentFor(body, expectedThreadId);
  if (doc == null) return null;
  return parseCapabilityReply(doc, expectedThreadId);
}