| 755 | // Guarded Core MCP ops seam for Pro runtimes. |
| 756 | if (!function_exists('fr_mcp_core_ops_dispatch')) { |
| 757 | function fr_mcp_core_ops_dispatch(string $operation, array $payload = [], array $authContext = []): array |
| 758 | { |
| 759 | if (!class_exists(\FileRise\Domain\McpCoreOpsService::class)) { |
| 760 | return [ |
| 761 | 'ok' => false, |
| 762 | 'error' => 'Core MCP ops service unavailable.', |
| 763 | 'status' => 500, |
| 764 | ]; |
| 765 | } |
| 766 | return \FileRise\Domain\McpCoreOpsService::dispatch($operation, $payload, $authContext); |
| 767 | } |
| 768 | } |
| 769 | |
| 770 | if (!function_exists('fr_mcp_core_ops_describe')) { |