Replace hardcoded cache key in ForAgentsController with a config-based key (`mcp.cache.for_agents_key`) and configurable TTL (`mcp.cache.for_agents_ttl`). This prevents collisions with other modules or packages that might use the same flat cache key. - Add `cacheKey()` method on ForAgentsController, reads from config - Add `cache` section to config.php with default key and TTL - Dynamic Cache-Control max-age now follows the configured TTL - Add ForAgentsControllerTest covering key customisation, cache storage, invalidation, TTL, and response structure Refs: TODO.md CQ-003 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
74 lines
2.2 KiB
PHP
74 lines
2.2 KiB
PHP
<?php
|
|
|
|
return [
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| MCP Portal Domain
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| The domain where the MCP Portal is served. This hosts the server registry,
|
|
| documentation, and discovery endpoints for AI agents.
|
|
|
|
|
| Production: mcp.host.uk.com
|
|
| Local dev: mcp.host.test (Valet)
|
|
|
|
|
*/
|
|
|
|
'domain' => env('MCP_DOMAIN', 'mcp.host.uk.com'),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Registry Path
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Where to find MCP server definitions. Each server has its own YAML file
|
|
| in the servers subdirectory.
|
|
|
|
|
*/
|
|
|
|
'registry_path' => resource_path('mcp'),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Plan Templates Path
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Where agent plan templates are stored. These define structured workflows
|
|
| for common development tasks.
|
|
|
|
|
*/
|
|
|
|
'templates_path' => resource_path('plan-templates'),
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Content Generation Paths
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Paths for the ContentService batch generation system.
|
|
|
|
|
*/
|
|
|
|
'content' => [
|
|
'batch_path' => 'app/Mod/Agentic/Resources/tasks',
|
|
'prompt_path' => 'app/Mod/Agentic/Resources/prompts/content',
|
|
'drafts_path' => 'app/Mod/Agentic/Resources/drafts',
|
|
],
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Cache Keys
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Namespaced cache keys used by agentic endpoints. Override these in your
|
|
| application config to prevent collisions with other modules.
|
|
|
|
|
*/
|
|
|
|
'cache' => [
|
|
'for_agents_key' => 'agentic.for-agents.json',
|
|
'for_agents_ttl' => 3600,
|
|
],
|
|
|
|
];
|