Do you only need the operator L2 -> surface L2, or also surface L2 -> L2?
The first is easy to do, the second is more difficult. I think for the second some C++ code is needed.
Code:
from ngsolve import *
import netgen.geom2d as geom2d
mesh = Mesh(geom2d.unit_square.GenerateMesh(maxh=0.5))
L = L2(mesh, order=0)
F = FacetFESpace(mesh, order=0, dirichlet=".*")
S = SurfaceL2(mesh, order=0)
E1 = comp.ConvertOperator(spacea=L, spaceb=F)
E2 = comp.ConvertOperator(spacea=F, spaceb=S, vb=BND)
E = E2 @ E1
print(E)
This will give you the desired operator L2->surface L2 as a sparse matrix.
The operator "E1" will average on the interior facets, but we do not care about that as we are only interested in the boundary.
(I did have to add a single line of C++ code in one place to make this work, I will put up a merge request for this).
I do have an idea for the other direction, but it is a bit ugly and needs some C++ code.