namespace boost {
namespace taar {
std::optional< double >
accept_encoding_quality(std::string_view, std::string_view);
}
}
namespace boost {
namespace taar {
template<typename T> class async_channel;
}
}
namespace boost {
namespace taar {
template<typename T> class async_generator;
}
}
namespace boost {
namespace taar {
template<typename T>
using awaitable = boost::asio::awaitable< T, boost::asio::any_io_executor >;
constexpr boost::asio::use_awaitable_t< boost::asio::any_io_executor > use_awaitable;
constexpr boost::asio::as_tuple_t< boost::asio::use_awaitable_t< boost::asio::any_io_executor > > use_awaitable_tuple;
}
}
namespace boost {
namespace taar {
std::string base64_encode(std::string_view bytes);
std::optional< std::string > base64_decode(std::string_view text);
}
}
namespace boost {
namespace taar {
template<has_chunk_body_from T> std::string chunk_body_from(T &&);
}
}
namespace boost {
namespace taar {
template<typename T> class chunked_response;
}
}
namespace boost {
namespace taar {
template<std::size_t N> struct constexpr_string;
namespace literals {
template<constexpr_string CS> constexpr auto operator""_cs();
}
}
}
namespace boost {
namespace taar {
struct cookie;
class cookies;
}
}
namespace boost {
namespace taar {
struct cors;
}
}
namespace boost {
namespace system {
template<> struct is_error_code_enum<::boost::taar::jsonrpc::error>;
}
namespace taar {
namespace jsonrpc {
enum error;
boost::system::error_category const & error_category();
boost::system::error_code make_error_code(error ev);
}
}
}
namespace boost {
namespace system {
template<> struct is_error_code_enum<::boost::taar::mcp::error>;
}
namespace taar {
namespace mcp {
enum error;
boost::system::error_category const & error_category();
boost::system::error_code make_error_code(error ev);
}
}
}
namespace boost {
namespace taar {
typedef std::unordered_map< std::string, std::string > form_kvp;
}
}
namespace boost {
namespace taar {
std::string format_http_date(std::chrono::system_clock::time_point);
std::optional< std::chrono::sys_seconds >
parse_http_date(std::string_view);
}
}
namespace boost {
namespace taar {
typedef std::optional< boost::beast::http::response< boost::beast::http::string_body > > interceptor_result;
interceptor_result proceed();
interceptor_result
reject(boost::beast::http::status, std::string_view = {});
}
}
namespace boost {
namespace taar {
template<typename T> struct awaitable_result;
template<typename T, typename E>
struct awaitable_result<boost::asio::awaitable< T, E >>;
template<typename T>
using awaitable_result_t = typename awaitable_result< T >::type;
}
}
namespace boost {
namespace taar {
struct param_info;
constexpr bool is_optional_v;
template<typename T> boost::json::object json_schema_for();
template<typename T> std::string json_type_name();
template<typename T>
param_info make_param_info(std::string name, std::string description,
bool required);
boost::json::object param_type_schema(param_info const & p);
boost::json::object param_schema(param_info const & p);
boost::json::object
object_schema(std::vector< param_info > const & params);
}
}
namespace boost {
namespace taar {
std::string file_extension(std::string_view);
std::string_view mime_type_for(std::string_view);
bool is_text_mime_type(std::string_view);
std::string with_utf8_charset(std::string_view type);
}
}
namespace boost {
namespace taar {
template<typename T>
using rebind_executor = typename T::template rebind_executor< boost::asio::as_tuple_t< boost::asio::use_awaitable_t< boost::asio::any_io_executor > >::executor_with_default< boost::asio::any_io_executor > >::other;
}
}
namespace boost {
namespace taar {
template<has_response_from... T>
using response_from_t = std::invoke_result_t< decltype(response_from< T... >), T... >;
template<has_response_from... T> constexpr auto response_from(T &&...);
template<typename CallableType, typename... ArgsType>
auto response_from_invoke(CallableType && callable, ArgsType &&... args);
template<typename CallableType, typename... ArgsType>
auto response_from_invoke(CallableType && callable, ArgsType &&... args);
template<typename CallableType, typename... ArgsType>
auto response_from_invoke(CallableType && callable, ArgsType &&... args);
template<typename CallableType, typename... ArgsType>
auto response_from_invoke(CallableType && callable, ArgsType &&... args);
template<typename CallableType, typename... ArgsType>
auto response_from_invoke(CallableType && callable, ArgsType &&... args);
template<typename CallableType, typename... ArgsType>
auto response_from_invoke(CallableType && callable, ArgsType &&... args);
template<typename CallableType, typename... ArgsType>
auto response_from_invoke(CallableType && callable, ArgsType &&... args);
template<typename CallableType, typename... ArgsType>
auto response_from_invoke(CallableType && callable, ArgsType &&... args);
}
}
namespace boost {
namespace taar {
template<typename... T> struct response_from_tag;
}
}
namespace boost {
namespace taar {
namespace handler {
template<typename ArgProviderType> struct constrained;
struct constraints;
}
}
}
namespace boost {
namespace taar {
namespace handler {
template<typename... Context>
using contexts = std::tuple< std::shared_ptr< Context >... >;
}
}
}
namespace boost {
namespace taar {
namespace handler {
template<typename Check, typename Inner> struct guard_handler;
template<typename Check, typename Inner> auto guard(Check, Inner);
}
}
}
namespace boost {
namespace taar {
namespace handler {
template<typename CallableType, typename... ArgProvidersType>
decltype(auto) rest(CallableType &&, ArgProvidersType...);
template<typename MemFnType, typename ObjectType,
typename... ArgProvidersType>
decltype(auto)
rest(MemFnType memfn, ObjectType && object,
ArgProvidersType... arg_providers);
}
}
}
namespace boost {
namespace taar {
namespace handler {
template<typename ToType, typename FromType>
using rest_arg_cast_result_t = decltype(rest_arg_cast< ToType >(std::declval< FromType >()));
template<typename ToType, typename FromType>
constexpr decltype(auto) rest_arg_cast(FromType const &);
}
}
}
namespace boost {
namespace taar {
namespace handler {
template<typename ToType> struct rest_arg_cast_tag;
}
}
}
namespace boost {
namespace taar {
namespace handler {
struct rest_param_info;
enum param_location { path, query, header, cookie, body, none };
}
}
}
namespace boost {
namespace taar {
namespace handler {
enum session_policy { create_if_missing, require };
namespace session_key {
struct cookie;
struct header;
}
}
}
}
namespace boost {
namespace taar {
namespace handler {
template<typename Store, typename KeyExtractor, typename Inner>
struct with_session_handler;
template<typename Key, typename Context, typename KeyExtractor,
typename Inner>
auto with_session(context_store< Key, Context > &, KeyExtractor,
session_policy, Inner);
}
}
}
namespace boost {
namespace taar {
namespace jsonrpc {
struct call;
struct rpc_arg;
}
}
}
namespace boost {
namespace taar {
namespace mcp {
struct mcp_arg;
struct resource_call;
struct tool_call;
struct uri_arg;
bool is_uri_template(std::string_view uri);
std::optional< std::unordered_map< std::string, std::string > >
match_uri_template(std::string_view, std::string_view);
}
}
}
namespace boost {
namespace taar {
namespace mcp {
struct client_capabilities;
struct client_info;
struct completion_request;
struct completion_result;
template<typename Session = stateless, typename... Context> class endpoint;
struct initialize_params;
struct prompt_info;
struct resource_info;
struct server_info;
struct session_info;
struct stateless;
struct tool_annotations;
struct tool_info;
struct tool_spec;
enum log_level { debug, info, notice, warning, error, critical, alert,
emergency };
typedef std::function< std::optional< std::string >(taar::failure const &)> tool_error_handler;
typedef tool_call prompt_call;
constexpr std::array< std::string_view, 8 > log_level_names;
constexpr std::array< std::string_view, 3 > supported_protocol_versions;
constexpr std::string_view latest_protocol_version;
constexpr int resource_not_found_code;
std::string_view to_string(log_level level);
std::optional< log_level > parse_log_level(std::string_view name);
bool is_supported_protocol_version(std::string_view v);
std::optional< std::string >
default_tool_error_handler(taar::failure const &);
}
}
}
namespace boost {
namespace taar {
namespace jsonrpc {
struct envelope;
bool is_notification(envelope const & env);
boost::system::result< envelope >
parse_envelope(boost::json::value const &);
}
}
}
namespace boost {
namespace taar {
namespace jsonrpc {
boost::json::value make_response(boost::json::value, boost::json::value);
boost::json::value
make_error_response(boost::json::value, int, std::string,
std::optional< boost::json::value > = std::nullopt);
boost::json::value
make_error_response(boost::json::value, error, std::string,
std::optional< boost::json::value > = std::nullopt);
}
}
}
namespace boost {
namespace taar {
namespace matcher {
struct context;
}
}
}
namespace boost {
namespace taar {
namespace matcher {
template<typename FieldsType = boost::beast::http::fields> struct cookie_t;
constexpr auto basic_cookie;
constexpr auto cookie;
}
}
}
namespace boost {
namespace taar {
namespace matcher {
template<typename FieldsType = boost::beast::http::fields> struct header_t;
constexpr auto basic_header;
constexpr auto header;
}
}
}
namespace boost {
namespace taar {
namespace matcher {
template<typename L, typename R> struct and_;
struct any_metadata;
template<typename A, typename B> struct concat_;
template<typename... A, typename... B>
struct concat_<type_list< A... >, type_list< B... >>;
struct cookie_constraint_value;
struct cookie_eq_constraint;
struct cookie_exists_constraint;
struct cookie_ne_constraint;
template<typename Tag> struct data_of;
template<> struct data_of<cookie_eq_constraint>;
template<> struct data_of<cookie_exists_constraint>;
template<> struct data_of<cookie_ne_constraint>;
template<> struct data_of<header_eq_constraint>;
template<> struct data_of<header_exists_constraint>;
template<> struct data_of<header_ne_constraint>;
template<> struct data_of<method_eq_constraint>;
template<> struct data_of<method_ne_constraint>;
template<> struct data_of<target_constraint>;
template<> struct data_of<version_eq_constraint>;
template<> struct data_of<version_ge_constraint>;
template<> struct data_of<version_gt_constraint>;
template<> struct data_of<version_le_constraint>;
template<> struct data_of<version_lt_constraint>;
template<> struct data_of<version_ne_constraint>;
template<typename TL> struct data_tuple_impl_;
template<typename... L> struct data_tuple_impl_<type_list< L... >>;
template<typename AST> struct flatten;
template<typename L, typename R> struct flatten<and_< L, R >>;
template<> struct flatten<any_metadata>;
template<typename X> struct flatten<not_< X >>;
template<typename L, typename R> struct flatten<or_< L, R >>;
struct header_constraint_value;
struct header_eq_constraint;
struct header_exists_constraint;
struct header_ne_constraint;
template<typename TL> struct list_size;
template<typename... T> struct list_size<type_list< T... >>;
struct method_constraint_value;
struct method_eq_constraint;
struct method_ne_constraint;
template<typename X> struct not_;
template<typename L, typename R> struct or_;
struct target_constraint;
struct target_constraint_value;
template<typename... T> struct type_list;
struct version_constraint_value;
struct version_eq_constraint;
struct version_ge_constraint;
struct version_gt_constraint;
struct version_le_constraint;
struct version_lt_constraint;
struct version_ne_constraint;
typedef std::variant< boost::beast::http::field, std::string > header_key;
typedef std::variant< boost::beast::http::verb, std::string > method_verb;
template<typename Tag>
using data_of_t = typename data_of< Tag >::type;
template<typename AST>
using flatten_t = typename flatten< AST >::type;
template<typename AST>
using data_tuple_t = typename data_tuple_impl_< flatten_t< AST > >::type;
constexpr std::size_t list_size_v;
}
}
}
namespace boost {
namespace taar {
namespace matcher {
template<typename FieldsType = boost::beast::http::fields> struct method_t;
constexpr auto basic_method;
constexpr auto method;
}
}
}
namespace boost {
namespace taar {
namespace matcher {
template<typename RequestType, typename CallableType,
typename Metadata = any_metadata>
class operand;
template<typename LReq, typename LCall, typename LMeta, typename RReq,
typename RCall, typename RMeta>
auto operator&&(operand< LReq, LCall, LMeta > lhs,
operand< RReq, RCall, RMeta > rhs);
template<typename LReq, typename LCall, typename LMeta, typename RReq,
typename RCall, typename RMeta>
auto operator||(operand< LReq, LCall, LMeta > lhs,
operand< RReq, RCall, RMeta > rhs);
}
}
}
namespace boost {
namespace taar {
namespace matcher {
template<typename FieldsType = boost::beast::http::fields> struct target_t;
constexpr auto basic_target;
constexpr auto target;
}
}
}
namespace boost {
namespace taar {
namespace matcher {
template<typename FieldsType = boost::beast::http::fields> struct version_t;
constexpr auto basic_version;
constexpr auto version;
}
}
}
namespace boost {
namespace taar {
namespace mcp {
struct audio;
struct blob;
struct embedded_resource;
struct image;
struct text;
struct tool_result;
typedef std::variant< text, image, audio, embedded_resource > content_item;
void tag_invoke(boost::json::value_from_tag, boost::json::value & v,
text const & t);
void tag_invoke(boost::json::value_from_tag, boost::json::value & v,
image const & i);
void tag_invoke(boost::json::value_from_tag, boost::json::value & v,
audio const & a);
void tag_invoke(boost::json::value_from_tag, boost::json::value & v,
blob const & b);
void tag_invoke(boost::json::value_from_tag, boost::json::value & v,
embedded_resource const & r);
void tag_invoke(boost::json::value_from_tag, boost::json::value & v,
content_item const & c);
void tag_invoke(boost::json::value_from_tag, boost::json::value & v,
tool_result const & r);
}
}
}
namespace boost {
namespace taar {
namespace server {
template<typename SessionHandler>
awaitable< void >
tcp(boost::asio::any_io_executor, std::string, std::string,
SessionHandler &&, cancellation_signals &,
std::function< void(boost::asio::ip::tcp::endpoint const &)> = nullptr);
template<typename SessionHandler>
awaitable< void >
tcp(std::string, std::string, SessionHandler &&,
cancellation_signals &,
std::function< void(boost::asio::ip::tcp::endpoint const &)> = nullptr);
}
}
}
namespace boost {
namespace taar {
namespace server {
template<typename SessionHandler>
awaitable< void >
tls(boost::asio::any_io_executor, std::string, std::string,
boost::asio::ssl::context &, SessionHandler &&,
cancellation_signals &,
std::function< void(boost::asio::ip::tcp::endpoint const &)> = nullptr,
std::chrono::steady_clock::duration = std::chrono::seconds {30});
template<typename SessionHandler>
awaitable< void >
tls(std::string, std::string, boost::asio::ssl::context &,
SessionHandler &&, cancellation_signals &,
std::function< void(boost::asio::ip::tcp::endpoint const &)> = nullptr,
std::chrono::steady_clock::duration = std::chrono::seconds {30});
}
}
}
namespace boost {
namespace taar {
namespace session {
template<typename Context = no_context,
typename Stream = boost::beast::tcp_stream>
class basic_http;
struct no_context;
typedef basic_http<> http;
}
}
}
namespace boost {
namespace taar {
namespace session {
typedef boost::beast::ssl_stream< boost::beast::tcp_stream > tls_stream;
template<typename Context = no_context>
using basic_https = basic_http< Context, tls_stream >;
typedef basic_https<> https;
}
}
}
namespace boost {
namespace taar {
namespace type_traits {
template<typename CallableType> struct callable;
template<has_call_operator CallableType> struct callable<CallableType>;
template<typename ResultType, typename... ArgsType>
struct callable<ResultType(*)(ArgsType...)>;
template<typename ResultType, typename... ArgsType>
struct callable<ResultType(ArgsType...)>;
template<typename ResultType, typename ObjectType, typename... ArgsType>
struct callable<ResultType(ObjectType::*)(ArgsType...) const>;
template<typename ResultType, typename ObjectType, typename... ArgsType>
struct callable<ResultType(ObjectType::*)(ArgsType...)>;
template<typename CallableType, std::size_t N>
using callable_arg = typename callable< CallableType >::template arg< N >;
template<typename CallableType>
using callable_result = typename callable< CallableType >::result;
template<typename CallableType>
using callable_signature = typename callable< CallableType >::signature;
constexpr auto callable_args_count;
}
}
}
namespace boost {
namespace taar {
namespace type_traits {
template<template< typename... > class, typename>
struct is_specialization_of;
template<template< typename... > class TemplateType,
typename... ArgsType>
struct is_specialization_of<TemplateType, TemplateType< ArgsType... >>;
constexpr bool is_specialization_of_v;
}
}
}
namespace boost {
namespace taar {
namespace type_traits {
template<typename T>
using is_string_like = std::is_constructible< std::string, T >;
constexpr bool is_string_like_v;
}
}
}
namespace boost {
namespace taar {
namespace type_traits {
template<typename... T> struct have_super_type;
template<typename T> struct have_super_type<T>;
template<typename T, typename U> struct have_super_type<T, U>;
template<typename T, typename U, typename... Rest>
struct have_super_type<T, U, Rest...>;
template<typename... T> struct super_type;
template<typename T> struct super_type<T>;
template<typename T, typename U> struct super_type<T, U>;
template<typename T, typename U, typename... Rest>
struct super_type<T, U, Rest...>;
template<typename... T>
using super_type_t = typename super_type< T... >::type;
constexpr bool have_super_type_v;
}
}
}