BareGit
#pragma once

#include <memory>
#include <optional>
#include <string>
#include <vector>

#include <mw/error.hpp>

#include "message.hpp"
#include "llm_client.hpp"
#include "memory.hpp"
#include "task.hpp"
#include "tool.hpp"

class Agent
{
public:
    Agent(std::unique_ptr<LlmClient> client, std::unique_ptr<Memory> memory,
          ToolRegistry& tool_registry);

    mw::E<void> allowTool(const std::string& tool_name);
    void activateSkill(const Skill& skill);

    Task<mw::E<std::string>> run(const std::string& user_input);

private:
    std::unique_ptr<LlmClient> client_;
    std::unique_ptr<Memory> memory_;
    ToolRegistry& tool_registry_;

    std::vector<std::string> allowed_tools_;
    std::optional<Skill> current_skill_;
};