31namespace mcp::server {
54 std::string session_id = {},
55 std::weak_ptr<void> transport_lifetime = {})
noexcept
56 : transport_(transport),
57 session_id_(std::move(session_id)),
58 transport_lifetime_(std::move(transport_lifetime)),
59 has_lifetime_guard_(!transport_lifetime_.expired()) {}
62 bool available() const noexcept {
return transport() !=
nullptr; }
66 const auto* peer_transport = transport();
67 const auto capabilities =
69 ? peer_transport->client_capabilities_for_session(session_id_)
70 : std::optional<protocol::ClientCapabilities>{};
71 return capabilities.has_value() && capabilities->roots.enabled;
76 const auto* peer_transport = transport();
77 const auto capabilities =
79 ? peer_transport->client_capabilities_for_session(session_id_)
80 : std::optional<protocol::ClientCapabilities>{};
81 return capabilities.has_value() && capabilities->sampling.enabled;
86 const auto* peer_transport = transport();
87 const auto capabilities =
89 ? peer_transport->client_capabilities_for_session(session_id_)
90 : std::optional<protocol::ClientCapabilities>{};
91 return capabilities.has_value() && capabilities->elicitation.form;
96 const auto* peer_transport = transport();
97 const auto capabilities =
99 ? peer_transport->client_capabilities_for_session(session_id_)
100 : std::optional<protocol::ClientCapabilities>{};
101 return capabilities.has_value() && capabilities->elicitation.url;
111 const auto* peer_transport = transport();
112 const auto capabilities =
114 ? peer_transport->client_capabilities_for_session(session_id_)
115 : std::optional<protocol::ClientCapabilities>{};
116 return capabilities.has_value() && capabilities->tasks.has_value() &&
117 capabilities->tasks->list;
122 const auto* peer_transport = transport();
123 const auto capabilities =
125 ? peer_transport->client_capabilities_for_session(session_id_)
126 : std::optional<protocol::ClientCapabilities>{};
127 return capabilities.has_value() && capabilities->tasks.has_value() &&
128 capabilities->tasks->cancel;
133 const auto* peer_transport = transport();
134 const auto capabilities =
136 ? peer_transport->client_capabilities_for_session(session_id_)
137 : std::optional<protocol::ClientCapabilities>{};
138 return capabilities.has_value() && capabilities->tasks.has_value();
143 std::string reason = {})
const {
144 auto* peer_transport = transport();
145 if (!peer_transport) {
146 return mcp::core::unexpected(
147 core::Error{
static_cast<int>(protocol::ErrorCode::InternalError),
148 "client peer is not available",
151 protocol::CancelledNotificationParams params;
152 params.request_id = std::move(request_id);
153 if (!reason.empty()) {
154 params.reason = std::move(reason);
156 protocol::JsonRpcNotification notification;
157 notification.method = std::string(protocol::CancelledNotificationMethod);
158 notification.params =
159 protocol::cancelled_notification_params_to_json(params);
160 return peer_transport->send_notification_to_session(
161 session_id_, std::move(notification));
170 std::string method,
protocol::Json params = protocol::Json::object(),
172 const auto request_id = next_request_id();
175 request_id, options.timeout, options.cancellation_token,
176 [peer, request_id](std::string reason)
mutable {
177 return peer.notify_cancelled(std::move(request_id),
180 [peer, method = std::move(method), params = std::move(params),
181 request_id, options = std::move(options)]()
mutable {
182 return peer.request_with_id(std::move(method), std::move(params),
183 std::move(request_id),
199 return request_with_id(std::move(method), std::move(params),
209 static_cast<int>(protocol::ErrorCode::MethodNotFound),
210 "client does not support roots",
214 auto payload =
request(std::string(protocol::RootsListMethod),
215 protocol::Json::object());
217 return mcp::core::unexpected(payload.error());
219 auto result = protocol::roots_list_result_from_json(*payload);
221 return mcp::core::unexpected(result.error());
229 const auto request_id = next_request_id();
233 static_cast<int>(protocol::ErrorCode::MethodNotFound),
234 "client does not support roots",
239 return RequestHandle<protocol::RootsListResult>::spawn(
240 request_id, options.timeout, options.cancellation_token,
241 [peer, request_id](std::string reason)
mutable {
242 return peer.notify_cancelled(std::move(request_id),
246 options]() mutable -> core::Result<protocol::RootsListResult> {
247 auto payload = peer.request_with_id(
248 std::string(protocol::RootsListMethod), protocol::Json::object(),
249 request_id, options);
251 return mcp::core::unexpected(payload.error());
253 auto result = protocol::roots_list_result_from_json(*payload);
267 if (!supports_sampling_tools()) {
269 static_cast<int>(protocol::ErrorCode::MethodNotFound),
270 "client does not support sampling",
274 auto payload = request(std::string(protocol::SamplingCreateMessageMethod),
275 protocol::create_message_params_to_json(params));
277 return mcp::core::unexpected(payload.error());
279 auto result = protocol::create_message_result_from_json(*payload);
281 return mcp::core::unexpected(result.error());
290 const auto request_id = next_request_id();
291 if (!supports_sampling_tools()) {
294 static_cast<int>(protocol::ErrorCode::MethodNotFound),
295 "client does not support sampling",
299 ClientPeer peer = *
this;
300 return RequestHandle<protocol::CreateMessageResult>::spawn(
301 request_id, options.timeout, options.cancellation_token,
302 [peer, request_id](std::string reason)
mutable {
303 return peer.notify_cancelled(std::move(request_id),
306 [peer, params, request_id,
307 options]() mutable -> core::Result<protocol::CreateMessageResult> {
308 auto payload = peer.request_with_id(
309 std::string(protocol::SamplingCreateMessageMethod),
310 protocol::create_message_params_to_json(params), request_id,
313 return mcp::core::unexpected(payload.error());
315 auto result = protocol::create_message_result_from_json(*payload);
330 if (params.
mode == protocol::ElicitationMode::Url &&
331 !supports_elicitation_url()) {
333 static_cast<int>(protocol::ErrorCode::UrlElicitationRequired),
334 "client does not support url elicitation",
338 if (params.
mode == protocol::ElicitationMode::Form &&
339 !supports_elicitation_form()) {
341 static_cast<int>(protocol::ErrorCode::MethodNotFound),
342 "client does not support elicitation",
347 request(std::string(protocol::ElicitationCreateMethod),
348 protocol::create_elicitation_request_param_to_json(params));
350 return mcp::core::unexpected(payload.error());
352 auto result = protocol::create_elicitation_result_from_json(*payload);
354 return mcp::core::unexpected(result.error());
363 const auto request_id = next_request_id();
364 if (params.
mode == protocol::ElicitationMode::Url &&
365 !supports_elicitation_url()) {
369 static_cast<int>(protocol::ErrorCode::UrlElicitationRequired),
370 "client does not support url elicitation",
374 if (params.
mode == protocol::ElicitationMode::Form &&
375 !supports_elicitation_form()) {
376 return RequestHandle<protocol::CreateElicitationResult>::ready(
377 request_id, mcp::core::unexpected(core::Error{
378 static_cast<int>(protocol::ErrorCode::MethodNotFound),
379 "client does not support elicitation",
383 ClientPeer peer = *
this;
384 return RequestHandle<protocol::CreateElicitationResult>::spawn(
385 request_id, options.timeout, options.cancellation_token,
386 [peer, request_id](std::string reason)
mutable {
387 return peer.notify_cancelled(std::move(request_id),
390 [peer, params, request_id,
391 options]() mutable -> core::Result<protocol::CreateElicitationResult> {
392 auto payload = peer.request_with_id(
393 std::string(protocol::ElicitationCreateMethod),
394 protocol::create_elicitation_request_param_to_json(params),
395 request_id, options);
397 return mcp::core::unexpected(payload.error());
399 auto result = protocol::create_elicitation_result_from_json(*payload);
415 auto handle = elicit_async<T>(std::move(message), std::move(options));
416 return handle.await_response();
424 auto handle = elicit_async<T>(std::move(message), std::move(schema),
426 return handle.await_response();
433 auto schema = elicitation_schema_for_value<T>();
436 mcp::core::unexpected(schema.error()));
438 return elicit_async<T>(std::move(message), std::move(schema->schema),
439 std::move(options), schema->wrapped_value);
447 return elicit_async<T>(std::move(message), std::move(schema),
448 std::move(options),
false);
453 std::string elicitation_id,
457 elicit_url_async(std::move(message), std::move(elicitation_id),
458 std::move(url), std::move(options));
459 return handle.await_response();
464 std::string message, std::string elicitation_id, std::string url,
467 params.
message = std::move(message);
468 params.
mode = protocol::ElicitationMode::Url;
470 params.
url = std::move(url);
471 return elicit_url_async(std::move(params), std::move(options));
478 if (!supports_task_list()) {
480 static_cast<int>(protocol::ErrorCode::MethodNotFound),
481 "client does not support task listing",
485 auto payload = request(std::string(protocol::TasksListMethod),
486 protocol::Json::object());
488 return mcp::core::unexpected(payload.error());
490 const auto tasks = protocol::task_list_result_from_json(*payload);
492 return mcp::core::unexpected(tasks.error());
501 if (!supports_task_list()) {
503 static_cast<int>(protocol::ErrorCode::MethodNotFound),
504 "client does not support task listing",
508 std::vector<protocol::Task> all;
509 std::optional<std::string> cursor;
512 request(std::string(protocol::TasksListMethod),
514 : protocol::Json::object());
516 return mcp::core::unexpected(payload.error());
518 const auto page = protocol::task_list_result_from_json(*payload);
520 return mcp::core::unexpected(page.error());
522 all.insert(all.end(), page->tasks.begin(), page->tasks.end());
523 cursor = page->next_cursor;
524 }
while (cursor.has_value() && !cursor->empty());
533 if (!supports_tasks()) {
535 static_cast<int>(protocol::ErrorCode::MethodNotFound),
536 "client does not support tasks",
541 params.
task_id = std::string(task_id);
542 auto payload = request(std::string(protocol::TasksGetMethod),
543 protocol::task_get_params_to_json(params));
545 return mcp::core::unexpected(payload.error());
547 const auto task = protocol::task_from_json(*payload);
549 return mcp::core::unexpected(task.error());
558 if (!supports_task_cancel()) {
560 static_cast<int>(protocol::ErrorCode::MethodNotFound),
561 "client does not support task cancellation",
566 params.
task_id = std::string(task_id);
567 auto payload = request(std::string(protocol::TasksCancelMethod),
568 protocol::task_cancel_params_to_json(params));
570 return mcp::core::unexpected(payload.error());
572 const auto task = protocol::task_from_json(*payload);
574 return mcp::core::unexpected(task.error());
583 if (!supports_tasks()) {
585 static_cast<int>(protocol::ErrorCode::MethodNotFound),
586 "client does not support tasks",
591 params.
task_id = std::string(task_id);
592 return request(std::string(protocol::TasksResultMethod),
593 protocol::task_result_params_to_json(params));
601 std::string elicitation_id)
const {
602 auto* peer_transport = transport();
603 if (!peer_transport) {
604 return mcp::core::unexpected(
605 core::Error{
static_cast<int>(protocol::ErrorCode::InternalError),
606 "client peer is not available",
613 std::string(protocol::ElicitationCompleteNotificationMethod);
615 protocol::elicitation_complete_notification_params_to_json(params);
616 return peer_transport->send_notification_to_session(
617 session_id_, std::move(notification));
621 struct ElicitationSchemaBinding {
623 bool wrapped_value =
false;
627 return errors::make(protocol::ErrorCode::InvalidRequest,
628 "elicitation declined", {},
"elicitation");
631 static core::Error elicitation_cancelled_error() {
632 return errors::make(protocol::ErrorCode::InternalError,
633 "elicitation cancelled", {},
"elicitation");
636 static core::Error elicitation_decode_error(std::string detail = {}) {
637 return errors::make(protocol::ErrorCode::InvalidParams,
638 "elicitation content could not be decoded",
639 std::move(detail),
"elicitation");
642 static core::Error elicitation_missing_content_error() {
643 return errors::make(protocol::ErrorCode::InvalidParams,
644 "elicitation accepted without content", {},
649 static core::Result<ElicitationSchemaBinding> elicitation_schema_for_value() {
650 protocol::Json schema_json = protocol::schema_for<T>();
651 bool wrapped_value =
true;
652 if (schema_json.is_object() && schema_json.contains(
"type") &&
653 schema_json.at(
"type").is_string() &&
654 schema_json.at(
"type").get<std::string>() ==
"object" &&
655 schema_json.contains(
"properties") &&
656 schema_json.at(
"properties").is_object()) {
657 wrapped_value =
false;
659 schema_json = protocol::object_schema()
660 .required_property(
"value", std::move(schema_json))
661 .additional_properties(
false)
665 auto parsed = protocol::elicitation_schema_from_json(schema_json);
668 protocol::ErrorCode::InvalidParams, parsed.error().message,
669 parsed.error().detail,
"elicitation"));
671 return ElicitationSchemaBinding{*parsed, wrapped_value};
675 static core::Result<T> decode_elicitation_value(
676 const protocol::CreateElicitationResult& result,
677 const protocol::ElicitationSchema& schema,
bool wrapped_value) {
678 if (result.action == protocol::ElicitationAction::Decline) {
681 if (result.action == protocol::ElicitationAction::Cancel) {
684 if (!result.content.has_value()) {
689 protocol::validate_elicitation_result_content(schema, result);
692 errors::make(protocol::ErrorCode::InvalidParams,
693 "elicitation content failed schema validation",
694 valid.error().message,
"elicitation"));
699 return result.content->at(
"value").template get<T>();
701 return result.content->template get<T>();
702 }
catch (
const std::exception& ex) {
710 RequestHandle<T> elicit_async(std::string message,
711 protocol::ElicitationSchema schema,
712 RequestOptions options,
713 bool wrapped_value)
const {
714 const auto request_id = next_request_id();
715 if (!supports_elicitation_form()) {
716 return RequestHandle<T>::ready(
718 mcp::core::unexpected(errors::make(
719 protocol::ErrorCode::MethodNotFound,
720 "client does not support elicitation", {},
"elicitation")));
723 protocol::CreateElicitationRequestParam params;
724 params.
message = std::move(message);
725 params.requested_schema = std::move(schema);
727 ClientPeer peer = *
this;
728 auto validation_schema = params.requested_schema;
729 return RequestHandle<T>::spawn(
730 request_id, options.timeout, options.cancellation_token,
731 [peer, request_id](std::string reason)
mutable {
732 return peer.notify_cancelled(std::move(request_id),
735 [peer, params = std::move(params), request_id,
736 options = std::move(options),
737 validation_schema = std::move(validation_schema),
738 wrapped_value]() mutable -> core::Result<T> {
739 auto payload = peer.request_with_id(
740 std::string(protocol::ElicitationCreateMethod),
741 protocol::create_elicitation_request_param_to_json(params),
742 request_id, options);
744 return mcp::core::unexpected(payload.error());
746 auto result = protocol::create_elicitation_result_from_json(*payload);
750 return decode_elicitation_value<T>(*result, validation_schema,
755 RequestHandle<core::Unit> elicit_url_async(
756 protocol::CreateElicitationRequestParam params,
757 RequestOptions options = {})
const {
758 const auto request_id = next_request_id();
759 if (!supports_elicitation_url()) {
760 return RequestHandle<core::Unit>::ready(
762 mcp::core::unexpected(errors::make(
763 protocol::ErrorCode::UrlElicitationRequired,
764 "client does not support url elicitation", {},
"elicitation")));
767 ClientPeer peer = *
this;
768 return RequestHandle<core::Unit>::spawn(
769 request_id, options.timeout, options.cancellation_token,
770 [peer, request_id](std::string reason)
mutable {
771 return peer.notify_cancelled(std::move(request_id),
774 [peer, params = std::move(params), request_id,
775 options = std::move(options)]() mutable -> core::Result<core::Unit> {
776 auto payload = peer.request_with_id(
777 std::string(protocol::ElicitationCreateMethod),
778 protocol::create_elicitation_request_param_to_json(params),
779 request_id, options);
781 return mcp::core::unexpected(payload.error());
783 auto result = protocol::create_elicitation_result_from_json(*payload);
787 if (result->action == protocol::ElicitationAction::Decline) {
790 if (result->action == protocol::ElicitationAction::Cancel) {
797 core::Result<protocol::Json> request_with_id(
798 std::string method, protocol::Json params, protocol::RequestId request_id,
799 RequestOptions options = {})
const {
800 auto* peer_transport = transport();
801 if (!peer_transport) {
803 static_cast<int>(protocol::ErrorCode::InternalError),
804 "client peer is not available",
809 protocol::JsonRpcRequest request;
810 request.method = std::move(method);
811 request.params = std::move(params);
812 request.id = std::move(request_id);
813 if (options.meta.has_value()) {
814 request.meta = std::move(options.meta);
817 auto response = peer_transport->send_request_to_session(session_id_,
822 if (response->error.has_value()) {
824 response->error->code,
825 response->error->message,
826 response->error->data.has_value() ? response->error->data->dump()
830 if (!response->result.has_value()) {
832 static_cast<int>(protocol::ErrorCode::InvalidRequest),
833 "client peer response did not contain a result",
837 return *response->result;
840 static protocol::RequestId next_request_id() {
841 static std::atomic<std::int64_t> next{1};
842 return next.fetch_add(1);
845 Transport* transport() const noexcept {
849 if (has_lifetime_guard_ && transport_lifetime_.expired()) {
855 Transport* transport_;
856 std::string session_id_;
857 std::weak_ptr<void> transport_lifetime_;
858 bool has_lifetime_guard_ =
false;
865 return ClientPeer(context.transport, context.session_id,
866 context.transport_lifetime);
Definition request.hpp:123
static RequestHandle ready(protocol::RequestId request_id, ResultType result)
Creates a handle whose result is already available.
Definition request.hpp:132
Non-owning handle for the client associated with a server session.
Definition peer.hpp:46
bool available() const noexcept
Report whether this peer has a transport to send through.
Definition peer.hpp:62
core::Result< core::Unit > elicit_url(std::string message, std::string elicitation_id, std::string url, RequestOptions options={}) const
Ask the client to complete a URL-based elicitation flow.
Definition peer.hpp:452
RequestHandle< protocol::RootsListResult > list_roots_async(RequestOptions options={}) const
Request the client's root list asynchronously.
Definition peer.hpp:227
RequestHandle< T > elicit_async(std::string message, protocol::ElicitationSchema schema, RequestOptions options={}) const
Async typed form elicitation using an explicit schema.
Definition peer.hpp:444
RequestHandle< T > elicit_async(std::string message, RequestOptions options={}) const
Async typed form elicitation using SchemaTraits<T>.
Definition peer.hpp:431
bool supports_elicitation_form() const noexcept
Report whether the client advertised form elicitation support.
Definition peer.hpp:85
RequestHandle< protocol::CreateElicitationResult > create_elicitation_async(const protocol::CreateElicitationRequestParam ¶ms, RequestOptions options={}) const
Ask the client to perform an elicitation flow asynchronously.
Definition peer.hpp:360
RequestHandle< protocol::CreateMessageResult > create_message_async(const protocol::CreateMessageParams ¶ms, RequestOptions options={}) const
Ask the client to create a sampled message asynchronously.
Definition peer.hpp:287
bool supports_roots() const noexcept
Report whether the client advertised roots/list support.
Definition peer.hpp:65
core::Result< T > elicit(std::string message, protocol::ElicitationSchema schema, RequestOptions options={}) const
Ask the client for typed form input using an explicit schema.
Definition peer.hpp:421
core::Result< protocol::CreateElicitationResult > create_elicitation(const protocol::CreateElicitationRequestParam ¶ms) const
Ask the client to perform an elicitation flow.
Definition peer.hpp:328
bool supports_elicitation() const noexcept
Report whether the client supports any elicitation mode.
Definition peer.hpp:105
ClientPeer(Transport *transport=nullptr, std::string session_id={}, std::weak_ptr< void > transport_lifetime={}) noexcept
Construct a peer from a borrowed transport pointer.
Definition peer.hpp:53
core::Result< protocol::Task > get_task(std::string_view task_id) const
Request a single task by id.
Definition peer.hpp:532
bool supports_sampling_tools() const noexcept
Report whether the client advertised sampling support.
Definition peer.hpp:75
core::Result< protocol::CreateMessageResult > create_message(const protocol::CreateMessageParams ¶ms) const
Ask the client to create a sampled message.
Definition peer.hpp:265
core::Result< protocol::Json > task_result(std::string_view task_id) const
Request the result payload for a completed client task.
Definition peer.hpp:582
bool supports_elicitation_url() const noexcept
Report whether the client advertised URL elicitation support.
Definition peer.hpp:95
core::Result< std::vector< protocol::Task > > list_tasks() const
Request one page of tasks from the client.
Definition peer.hpp:477
core::Result< std::vector< protocol::Task > > list_all_tasks() const
Request all client task pages by following cursors.
Definition peer.hpp:500
bool supports_tasks() const noexcept
Report whether the client advertised any task support.
Definition peer.hpp:132
core::Result< protocol::Task > cancel_task(std::string_view task_id) const
Request cancellation of a client task.
Definition peer.hpp:557
bool supports_task_list() const noexcept
Report whether the client advertised task listing support.
Definition peer.hpp:110
core::Result< core::Unit > notify_cancelled(protocol::RequestId request_id, std::string reason={}) const
Notify the client that a request was cancelled.
Definition peer.hpp:142
core::Result< T > elicit(std::string message, RequestOptions options={}) const
Ask the client for typed form input using SchemaTraits<T>.
Definition peer.hpp:413
core::Result< protocol::Json > request(std::string method, protocol::Json params=protocol::Json::object()) const
Send a raw JSON-RPC request to the client.
Definition peer.hpp:196
bool supports_task_cancel() const noexcept
Report whether the client advertised task cancellation support.
Definition peer.hpp:121
core::Result< core::Unit > notify_elicitation_complete(std::string elicitation_id) const
Notify the client that an elicitation flow has completed.
Definition peer.hpp:600
RequestHandle< protocol::Json > request_async(std::string method, protocol::Json params=protocol::Json::object(), RequestOptions options={}) const
Send a raw JSON-RPC request to the client and return a handle.
Definition peer.hpp:169
RequestHandle< core::Unit > elicit_url_async(std::string message, std::string elicitation_id, std::string url, RequestOptions options={}) const
Async URL elicitation helper.
Definition peer.hpp:463
core::Result< protocol::RootsListResult > list_roots() const
Request the client's root list.
Definition peer.hpp:206
Abstract server transport for receiving client JSON-RPC messages.
Definition transport.hpp:99
Elicitation request, result, and schema payloads.
Stable public error helpers for SDK request and dispatch paths.
nlohmann::json Json
JSON value type used by all protocol DTOs.
Definition types.hpp:28
std::variant< std::int64_t, std::string > RequestId
JSON-RPC request or response identifier.
Definition types.hpp:56
Request lifecycle helpers for cancellable SDK calls.
Shared result and error primitives used by the public cxxmcp SDK.
tl::expected< T, Error > Result
Alias for the SDK result type.
Definition result.hpp:64
constexpr auto unexpected(E &&value)
Creates an unexpected result value for the active expected backend.
Definition result.hpp:24
Client root discovery payloads.
Client-side model sampling request and response payloads.
Small JSON Schema builders for MCP tool and elicitation metadata.
JSON-RPC method names and message construction/parsing helpers.
SessionClient session_client(const SessionContext &context) noexcept
Create a SessionClient handle from a session context.
Definition peer.hpp:870
ClientPeer client_peer(const SessionContext &context) noexcept
Create a ClientPeer handle from a session context.
Definition peer.hpp:864
Server-side transport abstraction for MCP JSON-RPC traffic.
Options for an outbound SDK request.
Definition request.hpp:103
Structured error returned by fallible SDK operations.
Definition result.hpp:35
Parameters for elicitation/create.
Definition elicitation.hpp:335
std::optional< std::string > url
Required in URL mode; target URL for the external interaction.
Definition elicitation.hpp:344
std::optional< std::string > elicitation_id
Required in URL mode to correlate the later completion notification.
Definition elicitation.hpp:342
std::string message
User-facing message explaining what input is requested.
Definition elicitation.hpp:337
ElicitationMode mode
Interaction mode; form mode serializes requested_schema, URL mode serializes elicitation_id and url.
Definition elicitation.hpp:340
Parameters for sampling/createMessage.
Definition sampling.hpp:231
Parameters for notifications/elicitation/complete.
Definition elicitation.hpp:370
std::string elicitation_id
URL-mode elicitation id that has completed.
Definition elicitation.hpp:372
Object schema requested from a user in form elicitation.
Definition elicitation.hpp:144
JSON-RPC notification envelope for one-way MCP messages.
Definition types.hpp:137
Json params
Method-specific notification params object.
Definition types.hpp:141
std::string method
Notification method name such as notifications/progress.
Definition types.hpp:139
Parameters for tasks/cancel.
Definition task.hpp:234
std::string task_id
Task identifier to cancel.
Definition task.hpp:236
Parameters for tasks/get.
Definition task.hpp:209
std::string task_id
Task identifier to retrieve.
Definition task.hpp:211
Per-message connection metadata supplied to server handlers.
Definition transport.hpp:42
Asynchronous task status and task-management payloads.