|null,config:array,skipValidations:array} */ function sarcio_context(): array { return Context::all(); } } if (!function_exists('sarcio_skips')) { /** True when a live patch says to skip the named validation on this request. */ function sarcio_skips(string $validation): bool { return Context::skips($validation); } } if (!function_exists('sarcio_config')) { /** A named config override from the live patch, or $default when unpatched. */ function sarcio_config(string $key, mixed $default = null): mixed { return Context::config($key, $default); } } if (!function_exists('sarcio_patched_routes')) { /** * The routes that currently carry a live server patch, as `METHOD /path`. * Empty when the server tier is off or the sidecar is unreachable — this * reads the same cached route set the request path does, so calling it is * cheap and never opens a socket of its own on a warm cache. * * @return array */ function sarcio_patched_routes(): array { return Plugin::instance()?->shim()?->routeSet() ?? []; } }