Serve static files (HTML, CSS, JS, images) from a local directory. Includes path
traversal protection, MIME type detection, and security headers
(Cache-Control, X-Content-Type-Options).
This method is useful for serving a web frontend alongside your agents — for example, an admin dashboard or a configuration UI.
Path to the directory containing static files. Can be absolute or relative
(resolved via path.resolve() at registration time).
URL path prefix for static files. Trailing slashes are stripped; '/' serves from the root.
void
With this configuration:
Path traversal attempts (e.g., /../etc/passwd) are blocked. The resolved file path
must remain within the configured static directory.