API: agent tests are workspace resources (breaking at 2026-09-28)

Agent-test create and list move off the agent onto the workspace, marked at the 2026-09-28 API version. This is a hard breaking change, and unlike most version boundaries, pinning an earlier version does not keep the old behaviour — a removed route and a widened field cannot be reconstructed by a response transform, so the break reaches every caller the moment it ships. Plan to migrate, not to pin.

What changed:

  • POST /v1/agents/{agent_id}/tests and GET /v1/agents/{agent_id}/tests are removed. Every caller gets 404 on those paths, whatever version it pins.
  • Create and list move to POST /v1/agents/tests and GET /v1/agents/tests.
  • List-by-agent survives as the ?agent_id= query filter on GET /v1/agents/tests (comma-separated agent IDs).
  • AgentTest.agent_id is widened from string to string | null on every read. A test can now be a bare workspace asset with no authoring agent.

agent_id was never a scope and is not one now: it records the authoring agent (the source of the test’s tool schemas and variables), every read/list/run is scoped by workspace, and the run target is bound at run time (POST /v1/agents/tests/runs), independent of it. A test authored against an agent that is later deleted keeps its agent_id as a dangling provenance pointer.

Migrate: call POST /v1/agents/tests to create and GET /v1/agents/tests to list; to list one agent’s tests, pass ?agent_id=. Handle agent_id as nullable on every read.