1 import Base 2 import ./capabilities.bend as Cap 3 4 # Trusted schema projection preserves its payload owner. Gameplay sees only H. 5 # All runtime arguments and result types are fixed before abstract payload H. 6 def provide(~Owner:Type,~Request:Type,~Projection:Data,~Args:Type,~Observation:Type,~at:Owner -> Request -> Owner & Projection,~body:@-H:Type -> @-read:Cap.Request -> H -> Args -> H & Observation,owner:Owner,args:Args) -> Owner & Observation: 7 body(Owner,Cap.Request{at},owner,args) 8 def request(~H:Type,~Request:Type,~Projection:Data,~read:Cap.Request,owner:H,input:Request) -> H & Projection: 9 Cap.request(~H,~Request,~Projection,~read,owner,input)