package structuredoutput // InteractionSink captures optional diagnostics. Calls can occur concurrently. // It returns paths for the artifacts that were written even when others fail. // A sink can collect write errors for presentation outside the processing result. type InteractionSink interface { WriteInteraction(Interaction) (InteractionArtifacts, error) } type Interaction struct { Name string Context DiagnosticContext RequestMetadata map[string]any RequestPayload any ResponsePayload any ErrorPayload any } type InteractionArtifacts struct { RequestMetadataPath string `json:"request_metadata_path,omitempty"` RequestPayloadPath string `json:"request_payload_path,omitempty"` ResponsePayloadPath string `json:"response_payload_path,omitempty"` ErrorPayloadPath string `json:"error_payload_path,omitempty"` }