Problem
Agents API now exposes a compact content-redacted tool lifecycle contract under metadata.agents_api.tool_observability in Automattic/agents-api#428. WP Codebox reviewer transcript staging does not yet consume it, so hosted Docs Agent artifacts still cannot explain tool-call behavior.
Required outcome
- Read only the canonical
metadata.agents_api.tool_observability v1 field from the browser result envelope.
- Preserve ordered sequence, turn, call ID, tool name, status, argument key names/count, safe result shape, and fixed safe error code/message.
- Reject/omit malformed or unsupported versions and all unknown/value-bearing fields.
- Include the bounded projection in the existing sanitized reviewer transcript and normalized result provenance/digest.
- Keep raw arguments, results, paths, hashes, provider payloads, transcript content, runtime metadata, and executor errors excluded.
- Add deterministic tests for valid success/failure/rejected/pending calls, malformed payloads, secret sentinel absence, and transcript upload staging.
- Release and rerun the Build developer-docs lane.
Upstream: Automattic/agents-api#428
Related: #1791
Problem
Agents API now exposes a compact content-redacted tool lifecycle contract under
metadata.agents_api.tool_observabilityin Automattic/agents-api#428. WP Codebox reviewer transcript staging does not yet consume it, so hosted Docs Agent artifacts still cannot explain tool-call behavior.Required outcome
metadata.agents_api.tool_observabilityv1 field from the browser result envelope.Upstream: Automattic/agents-api#428
Related: #1791