{"agent":"claude","input":"Add API key authentication to this Slim 4 app. Read public/index.php, app/settings.php, app/dependencies.php, app/middleware.php, app/routes.php, src/Application/Actions/Action.php, src/Application/Handlers/HttpErrorHandler.php, src/Application/Middleware/SessionMiddleware.php, tests/TestCase.php, tests/Application/Actions/User/ListUserActionTest.php, composer.json and .github/workflows/tests.yml first. Add an apiKeys entry to app/settings.php with the header name X-Api-Key and SHA-256 hashes read from an API_KEY_HASHES environment variable, and a bin/make-api-key.php script that prints a random key and its hash. Write ApiKeyMiddleware as a PSR-15 middleware that reads the header from the request, hashes the value, compares with hash_equals against each configured hash, throws HttpUnauthorizedException on a miss, and sets an apiKey request attribute and logs on a hit. Add it to the /users group only. Extend ListUserActionTest with a missing-key, a wrong-key and a valid-key case, and add ApiKeyMiddlewareTest. Run vendor/bin/phpcs, vendor/bin/phpstan and vendor/bin/phpunit on PHP 8.2 and 7.4 until they pass, then open a pull request that lists which routes need a key and how an operator mints one.","resources":[{"url":"https://github.com/your-org/your-app"}]}