Skip to content

API Reference parrot.handlers.ui_surfaces_scope

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.handlers.ui_surfaces_scope

View source

Tenant/group scope resolution for the ui_surfaces plane (FEAT-535, Module 2).

Parrot must not know how a host decides the caller's tenant — FieldSync reads it from the URL (a declared program), another host might read it from the session, a third might have no notion of tenant at all. So the handler asks a pluggable :class:SurfaceScopeResolver installed on the app under app["ui_surfaces_scope_resolver"]; when none is installed, the :class:SessionSurfaceScopeResolver default reads the navigator-auth session and resolves a tenant ONLY when the session carries exactly one program (see its own docstring for why).

:func:scope_grants is the pure "who, besides the owner, may see this record" rule — the owner is handled upstream by the caller (resolve_surface_access), never here.

Alias EMPTY_SCOPE

Re-exported from parrot.handlers.scope.EMPTY_SCOPE.

Attribute SessionSurfaceScopeResolver

Attribute SurfaceScope

Attribute SurfaceScopeResolver

Alias get_scope_resolver

Re-exported from parrot.handlers.scope.get_scope_resolver.

Function scope_grants

FEAT-535 adapter over :func:parrot.handlers.scope.scope_grants (signature unchanged).

Pure — does NOT consider ownership.

scope_grants(record: UISurfaceRecord, scope: SurfaceScope) -> bool

Parameter Type Default Description
record UISurfaceRecord
scope SurfaceScope

Returns: bool

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally