use wasi:http/types@0.2.0 as http-types; interface http-handlers { use http-types.{incoming-request, incoming-response}; use types.{handler-output, decision, outcome, label, verdict}; /// Called once when the plugin is first instantiated. handle-init: func() -> result<_, error>; /// Called on every request. /// /// Plugins should use this handler to perform request enrichment /// by adding new labels to the handler output. Plugins should not /// copy input labels into output labels as the host will automatically /// merge these. Copying may create conflict resolution issues. /// /// This is the first handler to execute in response to a request and /// any labels it emits are guaranteed to be available to all other /// plugins prior to their decision handlers being called. handle-request-enrichment: func(request: incoming-request, labels: list