Gap
WP_Agent_Workflow_Run_Result has first-class fields for workflow status, inputs, output, step records, errors, timestamps, metadata, evidence refs, and replay metadata, but it does not expose first-class artifacts or logs arrays.
Downstream consumers that need to persist or surface run artifacts/logs currently have to smuggle those values through free-form metadata, which makes the contract harder to discover and forces each recorder/bridge to agree on private metadata keys.
Downstream evidence
Data Machine's workflow bridge currently copies artifacts/logs out of metadata in its recorder layer:
The docs describe this as a workaround for missing first-class contract fields.
Proposed shape
Add optional, additive fields to WP_Agent_Workflow_Run_Result:
artifacts: list of normalized artifact descriptors, JSON-serializable and storage-neutral.
logs: list of normalized log entries, JSON-serializable and storage-neutral.
Plumb them through construction, from_array(), to_array(), with(), runner options, recorder payloads, and surfaced run-status/result outputs where workflow results are serialized.
metadata remains fully passthrough for existing consumers. Absent fields default to empty arrays for backwards compatibility.
Gap
WP_Agent_Workflow_Run_Resulthas first-class fields for workflow status, inputs, output, step records, errors, timestamps, metadata, evidence refs, and replay metadata, but it does not expose first-classartifactsorlogsarrays.Downstream consumers that need to persist or surface run artifacts/logs currently have to smuggle those values through free-form
metadata, which makes the contract harder to discover and forces each recorder/bridge to agree on private metadata keys.Downstream evidence
Data Machine's workflow bridge currently copies artifacts/logs out of
metadatain its recorder layer:The docs describe this as a workaround for missing first-class contract fields.
Proposed shape
Add optional, additive fields to
WP_Agent_Workflow_Run_Result:artifacts: list of normalized artifact descriptors, JSON-serializable and storage-neutral.logs: list of normalized log entries, JSON-serializable and storage-neutral.Plumb them through construction,
from_array(),to_array(),with(), runner options, recorder payloads, and surfaced run-status/result outputs where workflow results are serialized.metadataremains fully passthrough for existing consumers. Absent fields default to empty arrays for backwards compatibility.