Skip to content

Define server tool declaration contract#286

Merged
chubes4 merged 2 commits into
mainfrom
fix/issue-282-tool-declaration-contract
Jun 3, 2026
Merged

Define server tool declaration contract#286
chubes4 merged 2 commits into
mainfrom
fix/issue-282-tool-declaration-contract

Conversation

@chubes4
Copy link
Copy Markdown
Contributor

@chubes4 chubes4 commented Jun 3, 2026

Summary

  • Adds a canonical WP_Agent_Tool_Declaration::normalizeForServer() contract for host/server-mediated tools while keeping normalize() strict for client runtime declarations.
  • Routes source registry, conversation-loop declarations, and provider-turn request declarations through the canonical request/server normalizer.
  • Documents the server declaration envelope and adds smoke coverage for server declarations, legacy client catalog defaults, registry normalization, and provider-turn normalization.

Fixes #282.

Testing

  • php tests/tool-runtime-smoke.php
  • php tests/tool-source-registry-smoke.php
  • php tests/provider-turn-adapter-smoke.php
  • php tests/conversation-loop-tool-execution-smoke.php
  • php tests/tool-policy-contracts-smoke.php && php tests/action-policy-resolver-smoke.php && php tests/tool-tier-resolver-smoke.php
  • php tests/pre-execute-approval-smoke.php
  • php tests/spin-detector-smoke.php
  • php tests/identical-failure-tracker-smoke.php
  • composer smoke

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (openai/gpt-5.5)
  • Used for: Drafted and tested the canonical server-side tool declaration contract, docs, and smoke coverage for Chris to review.

@chubes4 chubes4 merged commit 72535a1 into main Jun 3, 2026
2 checks passed
@chubes4 chubes4 deleted the fix/issue-282-tool-declaration-contract branch June 3, 2026 18:52
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 canonical server-side tool declaration contract

1 participant