- Create TryPostServer MCP server with 17 tools: Post (List, Get, Create, Delete), Hashtag (List, Create, Update, Delete), Label (List, Create, Update, Delete), Workspace (Get), ApiKey (List, Create, Delete) - Create AuthenticateMcpToken middleware (logs in workspace owner) - Register mcp.auth middleware alias in bootstrap/app.php - Create routes/ai.php with mcp.trypost.test subdomain - Add PostApiTest with 6 tests (list, show, create, delete, isolation) - Fix PostApiTest assertions for pagination/resource wrapping - 704 tests passing, frontend build passing
20 lines
377 B
Text
20 lines
377 B
Text
<?php
|
|
|
|
namespace {{ namespace }};
|
|
|
|
use Closure;
|
|
use Laravel\Ai\Prompts\AgentPrompt;
|
|
use Laravel\Ai\Responses\AgentResponse;
|
|
|
|
class {{ class }}
|
|
{
|
|
/**
|
|
* Handle the incoming prompt.
|
|
*/
|
|
public function handle(AgentPrompt $prompt, Closure $next)
|
|
{
|
|
return $next($prompt)->then(function (AgentResponse $response) {
|
|
// ...
|
|
});
|
|
}
|
|
}
|