Skip to content

Define provider-turn adapter contract#270

Merged
chubes4 merged 2 commits into
mainfrom
issue/268-provider-turn-adapter
Jun 3, 2026
Merged

Define provider-turn adapter contract#270
chubes4 merged 2 commits into
mainfrom
issue/268-provider-turn-adapter

Conversation

@chubes4
Copy link
Copy Markdown
Contributor

@chubes4 chubes4 commented Jun 3, 2026

Summary

  • Adds a provider-neutral WP_Agent_Provider_Turn_Adapter contract with request/result value shapes for one model turn.
  • Wires WP_Agent_Conversation_Loop to consume provider_turn_adapter while retaining loop-owned continuation, mediated tool execution, usage/request metadata aggregation, diagnostics, and typed failures.
  • Adds pure-PHP smoke coverage proving fake provider-turn adapters drive the loop with and without tool mediation, without Data Machine loaded.

Closes #268.

Tests

  • php tests/provider-turn-adapter-smoke.php
  • php tests/conversation-loop-smoke.php
  • php tests/conversation-loop-tool-execution-smoke.php
  • php tests/conversation-runner-contracts-smoke.php
  • composer phpstan
  • composer test

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: Drafted the provider-turn adapter contract implementation and smoke coverage; Chris remains responsible for review and acceptance.

@chubes4 chubes4 merged commit 38a9c52 into main Jun 3, 2026
2 checks passed
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 provider-turn adapter contract for conversation runtimes

1 participant