Unravel Engine C++ Reference
Loading...
Searching...
No Matches
mcp_async.h
Go to the documentation of this file.
1#pragma once
2
3#include "mcp_tool_registry.h"
4
6
7#include <chrono>
8#include <context/context.hpp>
9#include <filesystem>
10#include <functional>
11#include <string>
12#include <vector>
13
14namespace unravel
15{
16class mcp_manager;
17}
18
19namespace unravel::mcp
20{
21
24auto wait_for_file(const std::filesystem::path& path,
25 std::chrono::milliseconds timeout = std::chrono::milliseconds(3000),
26 std::chrono::milliseconds poll_interval = std::chrono::milliseconds(32)) -> bool;
27
28auto read_file_bytes(const std::filesystem::path& path, std::string& error) -> std::vector<uint8_t>;
29
30auto encode_base64(const std::vector<uint8_t>& bytes) -> std::string;
31
32auto make_temp_screenshot_stem(const std::string& tag) -> std::filesystem::path;
33
37auto capture_fbo_screenshot(mcp_manager& mcp,
38 rtti::context& ctx,
39 const std::function<gfx::frame_buffer::ptr(rtti::context&)>& resolve_fbo,
40 const std::string& tag,
41 std::chrono::milliseconds wait_timeout = std::chrono::milliseconds(3000))
42 -> tool_result;
43
44} // namespace unravel::mcp
std::uint64_t bytes
Definition eviction.cpp:823
std::string tag
Definition hub.cpp:32
std::string error
Definition mcp_async.cpp:33
auto read_file_bytes(const std::filesystem::path &path, std::string &error) -> std::vector< uint8_t >
Definition mcp_async.cpp:87
auto wait_for_file(const std::filesystem::path &path, std::chrono::milliseconds timeout, std::chrono::milliseconds poll_interval) -> bool
Definition mcp_async.cpp:64
auto encode_base64(const std::vector< uint8_t > &bytes) -> std::string
auto make_temp_screenshot_stem(const std::string &tag) -> std::filesystem::path
auto capture_fbo_screenshot(mcp_manager &mcp, rtti::context &ctx, const std::function< gfx::frame_buffer::ptr(rtti::context &)> &resolve_fbo, const std::string &tag, std::chrono::milliseconds wait_timeout) -> tool_result