The principal extractor — the loop-closer for per-viewer docs. A Better Auth session (its user role,
granted permissions, or an apiKey's scopes) is mapped to a { scopes } principal that @suluk/hono's
emitV4(routes, { principal }) uses to project the doc each viewer is allowed to see.
The principal extractor — the loop-closer for per-viewer docs. A Better Auth session (its user role, granted permissions, or an apiKey's scopes) is mapped to a { scopes } principal that @suluk/hono's emitV4(routes, { principal }) uses to project the doc each viewer is allowed to see.