agent/php/tests/Feature/Mcp/Middleware
Snider 8091bad2c0 feat(mcp): implement §4 Middleware (5 middleware classes) (#852)
Additive-only — no existing files modified.

- McpApiKeyAuth: validates Bearer or X-MCP-API-Key header, attaches
  workspace context
- CheckMcpQuota: consumes via McpQuotaService, exposes MCP quota headers
- ValidateWorkspaceContext: normalises + enforces authenticated workspace scope
- ValidateToolDependencies: JSON-RPC + flat tool-call payload validation
  via ToolDependencyService
- McpAuthenticate: combined auth gate chaining the full stack

Pest Feature tests _Good/_Bad/_Ugly per AX-10 for each middleware.
pest skipped (vendor binaries missing in sandbox).

Co-authored-by: Codex <noreply@openai.com>
Closes tasks.lthn.sh/view.php?id=852
2026-04-25 05:25:09 +01:00
..
CheckMcpQuotaTest.php feat(mcp): implement §4 Middleware (5 middleware classes) (#852) 2026-04-25 05:25:09 +01:00
McpApiKeyAuthTest.php feat(mcp): implement §4 Middleware (5 middleware classes) (#852) 2026-04-25 05:25:09 +01:00
McpAuthenticateTest.php feat(mcp): implement §4 Middleware (5 middleware classes) (#852) 2026-04-25 05:25:09 +01:00
ValidateToolDependenciesTest.php feat(mcp): implement §4 Middleware (5 middleware classes) (#852) 2026-04-25 05:25:09 +01:00
ValidateWorkspaceContextTest.php feat(mcp): implement §4 Middleware (5 middleware classes) (#852) 2026-04-25 05:25:09 +01:00