package fdk:extension@0.1.0; interface engine { /// Calls an engine statement and waits for its result. /// /// `path` is the full gRPC method path, such as `/spatialengine.v1.std.Std/Print`. /// `payload` is the serialized protobuf request message, without gRPC framing. /// Obtain request and response definitions from the engine's exported protobuf schema. /// /// `transaction-id` joins an existing transaction when present. Its value is a UUID string. /// Omit it for calls outside a transaction. Transaction rules also apply to extension calls. /// /// Success contains the serialized protobuf response message. Failure contains the serialized /// `spatialengine.v1.std.StatementError` message. Generate protobuf bindings to decode either arm. execute-statement: func( path: string, payload: list, transaction-id: option, ) -> result, list>; } world extension { /// The host provides this interface when it instantiates the component. import engine; /// The engine invokes this entrypoint to execute the extension's workflow. export run: func(); }