#pragma once

#include <cstdint>
#include <string>
#include <vector>

namespace ta::foundation::action_outcomes
{
    enum class Stage : std::uint8_t
    {
        Succeeded,
        Failed
    };

    struct ActionOutcome final
    {
        std::uint64_t trace_id = 0;
        std::string feature;
        std::string component;
        Stage stage = Stage::Failed;
        std::string detail;
    };

    void publish(ActionOutcome outcome);
    [[nodiscard]] std::vector<ActionOutcome> drain();
    void clear() noexcept;
}
