Class: ActionMCP::Server::TransportHandler
- Inherits:
-
Object
- Object
- ActionMCP::Server::TransportHandler
- Includes:
- Capabilities, ClientNotifications, Completions, Elicitation, MessagingService, Pagination, Prompts, Resources, ResponseCollector, Roots, Sampling, Tasks, Tools
- Defined in:
- lib/action_mcp/server/transport_handler.rb
Constant Summary
Constants included from Elicitation
Elicitation::URL_ELICITATION_REQUIRED_CODE
Constants included from Completions
Completions::MAX_COMPLETION_VALUES
Constants included from Pagination
Instance Attribute Summary collapse
-
#session ⇒ Object
readonly
Returns the value of attribute session.
Attributes included from ResponseCollector
Attributes included from MessagingService
Instance Method Summary collapse
-
#initialize(session, messaging_mode: :write) ⇒ TransportHandler
constructor
A new instance of TransportHandler.
- #send_pong(request_id) ⇒ Object
Methods included from ResponseCollector
#clear_collected_responses, #get_collected_responses, #get_last_response, #initialize_response_collector, #write_message
Methods included from Tasks
#send_task_status_notification, #send_tasks_cancel, #send_tasks_get, #send_tasks_list, #send_tasks_result
Methods included from Elicitation
#send_elicitation_complete_notification, #send_elicitation_create, #send_elicitation_create_url, #send_url_elicitation_required_error
Methods included from Roots
#refresh_roots_list, #send_roots_list
Methods included from Sampling
Methods included from Completions
Methods included from Resources
#send_resource_read, #send_resource_subscribe, #send_resource_templates_list, #send_resource_unsubscribe, #send_resources_list
Methods included from Prompts
#send_prompts_get, #send_prompts_list
Methods included from Tools
#send_tools_call, #send_tools_list
Methods included from Capabilities
Methods included from ClientNotifications
#receive_cancelled_notification, #receive_progress_notification, #receive_task_status_notification
Methods included from MessagingService
#send_jsonrpc_error, #send_jsonrpc_notification, #send_jsonrpc_request, #send_jsonrpc_response, #send_logging_message_notification, #send_progress_notification, #send_prompts_list_changed_notification, #send_resource_updated_notification, #send_resources_list_changed_notification, #send_tools_list_changed_notification
Methods included from Pagination
#paginate, #paginate_by_keyset
Constructor Details
#initialize(session, messaging_mode: :write) ⇒ TransportHandler
Returns a new instance of TransportHandler.
32 33 34 35 36 |
# File 'lib/action_mcp/server/transport_handler.rb', line 32 def initialize(session, messaging_mode: :write) @session = session @messaging_mode = messaging_mode initialize_response_collector if messaging_mode == :return end |
Instance Attribute Details
#session ⇒ Object (readonly)
Returns the value of attribute session.
11 12 13 |
# File 'lib/action_mcp/server/transport_handler.rb', line 11 def session @session end |
Instance Method Details
#send_pong(request_id) ⇒ Object
38 39 40 |
# File 'lib/action_mcp/server/transport_handler.rb', line 38 def send_pong(request_id) send_jsonrpc_response(request_id, result: {}) end |