Skip to content

Add safe tool audit events#171

Merged
chubes4 merged 2 commits into
mainfrom
agents-api-audit-transcript-contract
May 15, 2026
Merged

Add safe tool audit events#171
chubes4 merged 2 commits into
mainfrom
agents-api-audit-transcript-contract

Conversation

@chubes4
Copy link
Copy Markdown
Contributor

@chubes4 chubes4 commented May 15, 2026

Summary

  • Add tool_audit_events to mediated conversation loop results as a safe replay/audit surface that omits raw parameters while preserving deterministic hashes.
  • Classify core mediated tool failure paths (tool_not_found, missing_required_parameters, executor_exception) and validate the audit event contract.
  • Document the audit event shape and redaction filter for host-specific deterministic parameter normalization.

Context

Dan Luu's wp-gym review exposed that downstream benchmark consumers need replayable tool-action evidence without each corpus inventing its own episode-step shape: Automattic/wp-gym#76

This addresses the Agents API foundation issue: Closes #170

Testing

  • php tests/conversation-loop-tool-execution-smoke.php
  • php tests/conversation-loop-smoke.php
  • php tests/conversation-loop-transcript-persister-smoke.php
  • php tests/tool-runtime-smoke.php
  • for f in tests/*-smoke.php; do php "$f" || exit 1; done
  • php -l src/Runtime/class-wp-agent-conversation-loop.php
  • php -l src/Runtime/class-wp-agent-conversation-result.php
  • php -l src/Tools/class-wp-agent-tool-execution-core.php

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: Drafted the implementation, tests, and documentation; Chris directed the upstream factoring and remains responsible for review and merge decisions.

@chubes4 chubes4 merged commit 54631f3 into main May 15, 2026
2 checks passed
@chubes4 chubes4 deleted the agents-api-audit-transcript-contract branch May 15, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Define a safe audit transcript contract for mediated tool calls

1 participant