def request
import bendvy-ecs-core@0.1.0.4/ordinary_bundle.bend as OrdinaryBundleimport Base
import schema_fragments.bend as SF
import bundle_requests.bend as Cmd
import bundle_construction.bend as CS
import bundle_insert_adapter.bend as AD
32# Validate bundle metadata before invoking construction/command staging.
33# Declaration refusal returns the opaque owner and original raw input without
34# running construct. Other results follow the bound bundle request contract.
35# Successful staging is deferred; visibility requires an explicit barrier.
36# Raw adapters, reversible constructors and pack/unpack remain trusted setup.
37# Ownership/error scenarios: docs/parity/bundles.md.
38def request(~S:Data,~Store:Type,~R:Type,~E:Data,~Packet:Type,~Context:Type,~Raw:Type,~Cooked:Type,~Error:Data,~construct:Context -> Raw -> CS.Staged<Context,Raw,Cooked,Error>,~pack:Cooked -> (Cooked -> Raw) -> Packet,~unpack:Packet -> Raw,plan:Plan<S,Raw,Cooked>,owner:AD.Owner<S,Store,R,E,Packet,Context>,input:Cmd.Input<S,Raw>) -> AD.Owner<S,Store,R,E,Packet,Context> & Cmd.Output<S,Raw,Error>:
39 match plan:
40 case Plan{entries}:checked(~S,~Store,~R,~E,~Packet,~Context,~Raw,~Cooked,~Error,~construct,~pack,~unpack,SF.validate(~S,entries),owner,input)
Uses (8)
Used by (0)
No other definition uses this definition.