package work.slhaf.partner.framework.agent.interaction;

import work.slhaf.partner.api.InputData;
import work.slhaf.partner.framework.agent.interaction.flow.RunningFlowContext;

public interface AgentGateway<I extends InputData, C extends RunningFlowContext> extends ResponseChannel, AutoCloseable {

    void launch();

    default void receive(I inputData) {
        C parsedContext = parseRunningFlowContext(inputData);
        AgentRuntime.INSTANCE.submit(parsedContext);
    }

    C parseRunningFlowContext(I inputData);

}
