Skip to content

chore: add a plugin contract and a payload round-trip test helper - #475

Merged
moetemp merged 1 commit into
mainfrom
chore/plugin-contract
Nov 13, 2026
Merged

moetemp merged 1 commit into
mainfrom
chore/plugin-contract

Conversation

@moetemp

@moetemp moetemp commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What changed?

This PR adds a "Plugin contract" section to AGENTS.md and a shared test helper for payload round trips.

  • findPayloadChange(value) sends a value through the default payload converter and returns the first field that changed.
  • The helper is in typescript/_template and the five TypeScript plugins. check_conventions.py keeps the copies equal.
  • vercel-ai-sdk gets a contract test for its Activity input and results.
  • The contract has six rules for plugins that run model or tool calls in Activities.

This branch contains #465 to #470, because the contract test fails without them. Those should merge first.

Fixes #AI-953

Why?

The review of @temporalio/vercel-ai-sdk 2.0.0 found six defects. Three had one cause. A value changed between the Workflow and the Activity, and no test sent a real value through the converter. Each rule in the contract comes from one of the six.

How did you test it?

  • make lint and make test pass in vercel-ai-sdk, langsmith, openai-agents and strands-agents.
  • python3 scripts/ci/check_conventions.py passes.
  • make test in google-adk fails on my machine in the strict-layout cleanup hook. It fails the same way on main.
  • The four other plugins only get the helper. There's no Python helper yet.

@moetemp
moetemp marked this pull request as ready for review November 12, 2026 06:54
@moetemp
moetemp requested a review from a team as a code owner November 12, 2026 06:54
@brianstrauch
brianstrauch marked this pull request as draft November 12, 2026 17:02
@brianstrauch

Copy link
Copy Markdown
Member

Marking as draft until #470 is merged

@moetemp
moetemp marked this pull request as ready for review November 12, 2026 18:08
@moetemp
moetemp force-pushed the chore/plugin-contract branch from 8ba62d1 to 41efcf6 Compare November 13, 2026 07:57
@moetemp
moetemp marked this pull request as draft November 13, 2026 07:58
@moetemp
moetemp changed the base branch from main to fix/vercel-ai-sdk-abort-signal November 13, 2026 16:33
@moetemp
moetemp force-pushed the chore/plugin-contract branch from 8de6810 to 7c1fabf Compare November 13, 2026 16:55
@moetemp
moetemp force-pushed the fix/vercel-ai-sdk-abort-signal branch from 5d3ddfb to a6f52c9 Compare November 13, 2026 17:42
Base automatically changed from fix/vercel-ai-sdk-abort-signal to main November 13, 2026 18:30
@moetemp
moetemp force-pushed the chore/plugin-contract branch from 7c1fabf to 8234e0d Compare November 13, 2026 18:32
@moetemp
moetemp marked this pull request as ready for review November 13, 2026 19:02
@moetemp
moetemp merged commit 936b1cb into main Nov 13, 2026
106 checks passed
@moetemp
moetemp deleted the chore/plugin-contract branch November 13, 2026 20:00
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.

2 participants