server/surface_route.ts view source
(options: SurfaceRouteOptions): RouteSpec import {create_surface_route_spec} from '@fuzdev/fuz_app/server/surface_route.js'; Create the admin-only route spec that serves the AppSurface as JSON.
Surface data reveals API structure (routes, auth, schemas), so the route
requires the global admin role. It is also a non-RPC surface: it declares
required_scope: 'surface:app_surface', so a narrowed API token is refused
it whatever its method list says (403 token_scope_required, ahead of the
role gate), while a full-scope admin bearer passes. The admin role implies
actor: 'required', so the route takes the ?acting= selector a
multi-actor admin disambiguates with.
options
the surface to serve
returns
RouteSpec the GET /api/surface route spec