Function: surfaceViewFor()
surfaceViewFor(
ns,extraScopes?):SurfaceView
Defined in: standard-tools.ts:89
The membership test for one scope's slice of the global registries — the SINGLE definition of "a surface", shared by the toolkit's standard tools (below) and by aiui-oracle's control-surface projection, so a scoped oracle and the equivalent kit never disagree about what an app's surface is.
A view serves its own scope subtree (ns/…) plus UNSCOPED declarations (a single-app document's common case: an app whose declarations carry no scope still gets its own tools); extraScopes declares more (composition — the twins shape). A multi-app document (the gallery: N kits, N scopes) is the reason this exists at all — a kit iterating the whole global surface registered every app's actions on every kit (M×N contamination, found live 2026-08-03).
Membership reads off the QUALIFIED NAME, which control.ts makes the identity of every declaration. Entries that also carry a scope field agree by construction — control()/action() build the name as <scope>/<leaf>, so name-prefix and scope-prefix ownership coincide — and reading the name is what lets the same rule cover cells, dependency edges and bridges, whose snapshots carry no scope field at all.
Parameters
ns
string
extraScopes?
readonly (string | Scope)[] = []