acp-sdk 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/README.md +14 -1
- data/lib/acp/agent_connection/client.rb +1 -1
- data/lib/acp/agent_connection.rb +3 -1
- data/lib/acp/client_connection.rb +93 -4
- data/lib/acp/request_error.rb +15 -2
- data/lib/acp/sdk.rb +3 -1
- data/lib/acp/transport/cancellation.rb +25 -0
- data/lib/acp/transport/stdio.rb +67 -1
- data/lib/acp/types/agent_auth_capabilities.rb +4 -1
- data/lib/acp/types/agent_capabilities.rb +20 -5
- data/lib/acp/types/annotations.rb +6 -3
- data/lib/acp/types/audio_content.rb +8 -3
- data/lib/acp/types/auth_capabilities.rb +1 -1
- data/lib/acp/types/auth_method/terminal.rb +11 -5
- data/lib/acp/types/auth_method_agent.rb +6 -1
- data/lib/acp/types/auth_method_terminal.rb +11 -5
- data/lib/acp/types/authenticate_request.rb +1 -1
- data/lib/acp/types/available_command.rb +3 -3
- data/lib/acp/types/available_commands_update.rb +7 -4
- data/lib/acp/types/blob_resource_contents.rb +6 -1
- data/lib/acp/types/boolean_property_schema.rb +6 -1
- data/lib/acp/types/cancel_notification.rb +4 -1
- data/lib/acp/types/cancel_request_notification.rb +9 -1
- data/lib/acp/types/client_capabilities.rb +15 -5
- data/lib/acp/types/client_session_capabilities.rb +6 -3
- data/lib/acp/types/close_session_request.rb +4 -1
- data/lib/acp/types/complete_elicitation_notification.rb +4 -1
- data/lib/acp/types/config_option_update.rb +7 -4
- data/lib/acp/types/content.rb +4 -1
- data/lib/acp/types/content_block/audio.rb +8 -3
- data/lib/acp/types/content_block/image.rb +9 -4
- data/lib/acp/types/content_block/resource.rb +11 -2
- data/lib/acp/types/content_block/resource_link.rb +12 -7
- data/lib/acp/types/content_block/text.rb +7 -2
- data/lib/acp/types/content_chunk.rb +2 -2
- data/lib/acp/types/cost.rb +5 -1
- data/lib/acp/types/create_elicitation_request/mode/form.rb +5 -1
- data/lib/acp/types/create_elicitation_request/mode/url.rb +2 -2
- data/lib/acp/types/create_elicitation_request.rb +1 -1
- data/lib/acp/types/create_elicitation_response/action/accept.rb +6 -1
- data/lib/acp/types/create_terminal_request.rb +12 -6
- data/lib/acp/types/create_terminal_response.rb +4 -1
- data/lib/acp/types/current_mode_update.rb +4 -1
- data/lib/acp/types/delete_session_request.rb +4 -1
- data/lib/acp/types/diff.rb +6 -1
- data/lib/acp/types/elicitation_accept_action.rb +6 -1
- data/lib/acp/types/elicitation_capabilities.rb +2 -2
- data/lib/acp/types/elicitation_form_mode.rb +5 -1
- data/lib/acp/types/elicitation_property_schema/boolean_property_schema.rb +6 -1
- data/lib/acp/types/elicitation_property_schema/integer_property_schema.rb +5 -5
- data/lib/acp/types/elicitation_property_schema/multi_select_property_schema.rb +9 -6
- data/lib/acp/types/elicitation_property_schema/number_property_schema.rb +5 -5
- data/lib/acp/types/elicitation_property_schema/string_property_schema.rb +15 -9
- data/lib/acp/types/elicitation_request_scope.rb +8 -1
- data/lib/acp/types/elicitation_schema.rb +11 -5
- data/lib/acp/types/elicitation_session_scope.rb +4 -1
- data/lib/acp/types/elicitation_url_mode.rb +2 -2
- data/lib/acp/types/embedded_resource.rb +11 -2
- data/lib/acp/types/enum_option.rb +6 -1
- data/lib/acp/types/env_variable.rb +5 -1
- data/lib/acp/types/file_system_capabilities.rb +5 -1
- data/lib/acp/types/http_header.rb +5 -1
- data/lib/acp/types/image_content.rb +9 -4
- data/lib/acp/types/implementation.rb +6 -1
- data/lib/acp/types/initialize_request.rb +18 -3
- data/lib/acp/types/initialize_response.rb +17 -4
- data/lib/acp/types/integer_property_schema.rb +5 -5
- data/lib/acp/types/kill_terminal_request.rb +5 -1
- data/lib/acp/types/list_sessions_request.rb +5 -1
- data/lib/acp/types/list_sessions_response.rb +5 -2
- data/lib/acp/types/load_session_request.rb +14 -4
- data/lib/acp/types/load_session_response.rb +5 -2
- data/lib/acp/types/mcp_capabilities.rb +5 -1
- data/lib/acp/types/mcp_server/http.rb +6 -3
- data/lib/acp/types/mcp_server/sse.rb +6 -3
- data/lib/acp/types/mcp_server_http.rb +6 -3
- data/lib/acp/types/mcp_server_sse.rb +6 -3
- data/lib/acp/types/mcp_server_stdio.rb +10 -4
- data/lib/acp/types/multi_select_items/string_multi_select_items.rb +4 -1
- data/lib/acp/types/multi_select_property_schema.rb +9 -6
- data/lib/acp/types/new_session_request.rb +13 -3
- data/lib/acp/types/new_session_response.rb +6 -3
- data/lib/acp/types/number_property_schema.rb +5 -5
- data/lib/acp/types/permission_option.rb +10 -1
- data/lib/acp/types/plan.rb +4 -1
- data/lib/acp/types/plan_entry.rb +7 -3
- data/lib/acp/types/prompt_capabilities.rb +6 -1
- data/lib/acp/types/prompt_request.rb +5 -2
- data/lib/acp/types/prompt_response.rb +8 -1
- data/lib/acp/types/read_text_file_request.rb +4 -4
- data/lib/acp/types/read_text_file_response.rb +1 -1
- data/lib/acp/types/release_terminal_request.rb +5 -1
- data/lib/acp/types/request_permission_outcome/selected.rb +1 -1
- data/lib/acp/types/request_permission_request.rb +10 -3
- data/lib/acp/types/request_permission_response.rb +8 -1
- data/lib/acp/types/resource_link.rb +12 -7
- data/lib/acp/types/resume_session_request.rb +14 -4
- data/lib/acp/types/resume_session_response.rb +5 -2
- data/lib/acp/types/selected_permission_outcome.rb +1 -1
- data/lib/acp/types/session_capabilities.rb +20 -7
- data/lib/acp/types/session_config_boolean.rb +1 -1
- data/lib/acp/types/session_config_option/kind/boolean.rb +1 -1
- data/lib/acp/types/session_config_option/kind/select.rb +6 -2
- data/lib/acp/types/session_config_option.rb +3 -3
- data/lib/acp/types/session_config_options_capabilities.rb +6 -1
- data/lib/acp/types/session_config_select.rb +6 -2
- data/lib/acp/types/session_config_select_group.rb +6 -3
- data/lib/acp/types/session_config_select_option.rb +6 -1
- data/lib/acp/types/session_config_select_options.rb +6 -2
- data/lib/acp/types/session_info.rb +12 -5
- data/lib/acp/types/session_info_update.rb +10 -1
- data/lib/acp/types/session_mode.rb +6 -1
- data/lib/acp/types/session_mode_state.rb +8 -2
- data/lib/acp/types/session_notification.rb +2 -2
- data/lib/acp/types/session_update/agent_message_chunk.rb +2 -2
- data/lib/acp/types/session_update/agent_thought_chunk.rb +2 -2
- data/lib/acp/types/session_update/available_commands_update.rb +7 -4
- data/lib/acp/types/session_update/config_option_update.rb +7 -4
- data/lib/acp/types/session_update/current_mode_update.rb +4 -1
- data/lib/acp/types/session_update/plan.rb +4 -1
- data/lib/acp/types/session_update/session_info_update.rb +10 -1
- data/lib/acp/types/session_update/tool_call.rb +23 -7
- data/lib/acp/types/session_update/tool_call_update.rb +23 -7
- data/lib/acp/types/session_update/usage_update.rb +3 -3
- data/lib/acp/types/session_update/user_message_chunk.rb +2 -2
- data/lib/acp/types/set_session_config_option_request/value/boolean.rb +1 -1
- data/lib/acp/types/set_session_config_option_request/value/value_id.rb +1 -1
- data/lib/acp/types/set_session_config_option_request.rb +2 -2
- data/lib/acp/types/set_session_config_option_response.rb +7 -4
- data/lib/acp/types/set_session_mode_request.rb +5 -1
- data/lib/acp/types/string_multi_select_items.rb +4 -1
- data/lib/acp/types/string_property_schema.rb +15 -9
- data/lib/acp/types/terminal.rb +4 -1
- data/lib/acp/types/terminal_exit_status.rb +5 -1
- data/lib/acp/types/terminal_output_request.rb +5 -1
- data/lib/acp/types/terminal_output_response.rb +8 -3
- data/lib/acp/types/text_content.rb +7 -2
- data/lib/acp/types/text_resource_contents.rb +6 -1
- data/lib/acp/types/titled_multi_select_items.rb +4 -1
- data/lib/acp/types/tool_call.rb +23 -7
- data/lib/acp/types/tool_call_content/content.rb +4 -1
- data/lib/acp/types/tool_call_content/diff.rb +6 -1
- data/lib/acp/types/tool_call_content/terminal.rb +4 -1
- data/lib/acp/types/tool_call_location.rb +5 -1
- data/lib/acp/types/tool_call_update.rb +23 -7
- data/lib/acp/types/unstable/accept_nes_notification.rb +41 -0
- data/lib/acp/types/unstable/agent_capabilities.rb +122 -0
- data/lib/acp/types/unstable/client_capabilities.rb +127 -0
- data/lib/acp/types/unstable/client_nes_capabilities.rb +62 -0
- data/lib/acp/types/unstable/client_session_capabilities.rb +57 -0
- data/lib/acp/types/unstable/close_nes_request.rb +35 -0
- data/lib/acp/types/unstable/close_nes_response.rb +27 -0
- data/lib/acp/types/unstable/compaction_status.rb +11 -0
- data/lib/acp/types/unstable/compaction_summary_chunk.rb +41 -0
- data/lib/acp/types/unstable/compaction_update.rb +62 -0
- data/lib/acp/types/unstable/did_change_document_notification.rb +65 -0
- data/lib/acp/types/unstable/did_close_document_notification.rb +41 -0
- data/lib/acp/types/unstable/did_focus_document_notification.rb +74 -0
- data/lib/acp/types/unstable/did_open_document_notification.rb +66 -0
- data/lib/acp/types/unstable/did_save_document_notification.rb +41 -0
- data/lib/acp/types/unstable/disable_provider_request.rb +35 -0
- data/lib/acp/types/unstable/disable_provider_response.rb +27 -0
- data/lib/acp/types/unstable/fork_session_request.rb +69 -0
- data/lib/acp/types/unstable/fork_session_response.rb +55 -0
- data/lib/acp/types/unstable/idle_state_update.rb +46 -0
- data/lib/acp/types/unstable/initialize_response.rb +72 -0
- data/lib/acp/types/unstable/list_providers_request.rb +27 -0
- data/lib/acp/types/unstable/list_providers_response.rb +35 -0
- data/lib/acp/types/unstable/llm_protocol.rb +12 -0
- data/lib/acp/types/unstable/mcp_capabilities.rb +47 -0
- data/lib/acp/types/unstable/mcp_error.rb +41 -0
- data/lib/acp/types/unstable/mcp_server/acp.rb +41 -0
- data/lib/acp/types/unstable/mcp_server/http.rb +50 -0
- data/lib/acp/types/unstable/mcp_server/sse.rb +50 -0
- data/lib/acp/types/unstable/mcp_server.rb +25 -0
- data/lib/acp/types/unstable/mcp_server_acp.rb +41 -0
- data/lib/acp/types/unstable/message_mcp_notification.rb +59 -0
- data/lib/acp/types/unstable/message_mcp_request.rb +59 -0
- data/lib/acp/types/unstable/message_mcp_response/error.rb +35 -0
- data/lib/acp/types/unstable/message_mcp_response/result.rb +32 -0
- data/lib/acp/types/unstable/message_mcp_response.rb +23 -0
- data/lib/acp/types/unstable/nes_capabilities.rb +51 -0
- data/lib/acp/types/unstable/nes_context_capabilities.rb +111 -0
- data/lib/acp/types/unstable/nes_diagnostic.rb +57 -0
- data/lib/acp/types/unstable/nes_diagnostic_severity.rb +11 -0
- data/lib/acp/types/unstable/nes_diagnostics_capabilities.rb +27 -0
- data/lib/acp/types/unstable/nes_document_did_change_capabilities.rb +35 -0
- data/lib/acp/types/unstable/nes_document_did_close_capabilities.rb +27 -0
- data/lib/acp/types/unstable/nes_document_did_focus_capabilities.rb +27 -0
- data/lib/acp/types/unstable/nes_document_did_open_capabilities.rb +27 -0
- data/lib/acp/types/unstable/nes_document_did_save_capabilities.rb +27 -0
- data/lib/acp/types/unstable/nes_document_event_capabilities.rb +91 -0
- data/lib/acp/types/unstable/nes_edit_history_capabilities.rb +35 -0
- data/lib/acp/types/unstable/nes_edit_history_entry.rb +41 -0
- data/lib/acp/types/unstable/nes_edit_suggestion.rb +67 -0
- data/lib/acp/types/unstable/nes_event_capabilities.rb +40 -0
- data/lib/acp/types/unstable/nes_excerpt.rb +47 -0
- data/lib/acp/types/unstable/nes_jump_capabilities.rb +27 -0
- data/lib/acp/types/unstable/nes_jump_suggestion.rb +51 -0
- data/lib/acp/types/unstable/nes_open_file.rb +64 -0
- data/lib/acp/types/unstable/nes_open_files_capabilities.rb +27 -0
- data/lib/acp/types/unstable/nes_recent_file.rb +47 -0
- data/lib/acp/types/unstable/nes_recent_files_capabilities.rb +35 -0
- data/lib/acp/types/unstable/nes_reject_reason.rb +11 -0
- data/lib/acp/types/unstable/nes_related_snippet.rb +40 -0
- data/lib/acp/types/unstable/nes_related_snippets_capabilities.rb +27 -0
- data/lib/acp/types/unstable/nes_rename_capabilities.rb +27 -0
- data/lib/acp/types/unstable/nes_rename_suggestion.rb +57 -0
- data/lib/acp/types/unstable/nes_repository.rb +47 -0
- data/lib/acp/types/unstable/nes_search_and_replace_capabilities.rb +27 -0
- data/lib/acp/types/unstable/nes_search_and_replace_suggestion.rb +66 -0
- data/lib/acp/types/unstable/nes_suggest_context.rb +95 -0
- data/lib/acp/types/unstable/nes_suggestion/edit.rb +68 -0
- data/lib/acp/types/unstable/nes_suggestion/jump.rb +51 -0
- data/lib/acp/types/unstable/nes_suggestion/rename.rb +64 -0
- data/lib/acp/types/unstable/nes_suggestion/searchandreplace.rb +67 -0
- data/lib/acp/types/unstable/nes_suggestion.rb +25 -0
- data/lib/acp/types/unstable/nes_text_edit.rb +41 -0
- data/lib/acp/types/unstable/nes_trigger_kind.rb +10 -0
- data/lib/acp/types/unstable/nes_user_action.rb +63 -0
- data/lib/acp/types/unstable/nes_user_actions_capabilities.rb +35 -0
- data/lib/acp/types/unstable/notice.rb +47 -0
- data/lib/acp/types/unstable/notice_severity.rb +10 -0
- data/lib/acp/types/unstable/plan_capabilities.rb +27 -0
- data/lib/acp/types/unstable/plan_file.rb +41 -0
- data/lib/acp/types/unstable/plan_items.rb +44 -0
- data/lib/acp/types/unstable/plan_markdown.rb +41 -0
- data/lib/acp/types/unstable/plan_removed.rb +32 -0
- data/lib/acp/types/unstable/plan_update.rb +39 -0
- data/lib/acp/types/unstable/plan_update_content/file.rb +41 -0
- data/lib/acp/types/unstable/plan_update_content/items.rb +44 -0
- data/lib/acp/types/unstable/plan_update_content/markdown.rb +41 -0
- data/lib/acp/types/unstable/plan_update_content.rb +23 -0
- data/lib/acp/types/unstable/position.rb +41 -0
- data/lib/acp/types/unstable/position_encoding_kind.rb +10 -0
- data/lib/acp/types/unstable/prompt_response.rb +45 -0
- data/lib/acp/types/unstable/provider_current_config.rb +41 -0
- data/lib/acp/types/unstable/provider_info.rb +64 -0
- data/lib/acp/types/unstable/providers_capabilities.rb +27 -0
- data/lib/acp/types/unstable/range.rb +41 -0
- data/lib/acp/types/unstable/reject_nes_notification.rb +52 -0
- data/lib/acp/types/unstable/requires_action_state_update.rb +27 -0
- data/lib/acp/types/unstable/running_state_update.rb +27 -0
- data/lib/acp/types/unstable/session_cancel_capabilities.rb +27 -0
- data/lib/acp/types/unstable/session_capabilities.rb +93 -0
- data/lib/acp/types/unstable/session_fork_capabilities.rb +27 -0
- data/lib/acp/types/unstable/session_message.rb +62 -0
- data/lib/acp/types/unstable/session_message_chunk.rb +59 -0
- data/lib/acp/types/unstable/session_update/agent_message_chunk.rb +46 -0
- data/lib/acp/types/unstable/session_update/agent_thought_chunk.rb +46 -0
- data/lib/acp/types/unstable/session_update/available_commands_update.rb +42 -0
- data/lib/acp/types/unstable/session_update/compaction_summary_chunk.rb +46 -0
- data/lib/acp/types/unstable/session_update/compaction_update.rb +63 -0
- data/lib/acp/types/unstable/session_update/config_option_update.rb +42 -0
- data/lib/acp/types/unstable/session_update/current_mode_update.rb +35 -0
- data/lib/acp/types/unstable/session_update/notice.rb +53 -0
- data/lib/acp/types/unstable/session_update/plan.rb +35 -0
- data/lib/acp/types/unstable/session_update/plan_removed.rb +32 -0
- data/lib/acp/types/unstable/session_update/plan_update.rb +39 -0
- data/lib/acp/types/unstable/session_update/session_info_update.rb +49 -0
- data/lib/acp/types/unstable/session_update/session_message.rb +63 -0
- data/lib/acp/types/unstable/session_update/session_message_chunk.rb +60 -0
- data/lib/acp/types/unstable/session_update/subagent_update.rb +72 -0
- data/lib/acp/types/unstable/session_update/tool_call.rb +122 -0
- data/lib/acp/types/unstable/session_update/tool_call_update.rb +122 -0
- data/lib/acp/types/unstable/session_update/usage_update.rb +47 -0
- data/lib/acp/types/unstable/session_update/user_message_chunk.rb +46 -0
- data/lib/acp/types/unstable/session_update.rb +55 -0
- data/lib/acp/types/unstable/set_provider_request.rb +62 -0
- data/lib/acp/types/unstable/set_provider_response.rb +27 -0
- data/lib/acp/types/unstable/start_nes_request.rb +64 -0
- data/lib/acp/types/unstable/start_nes_response.rb +35 -0
- data/lib/acp/types/unstable/state_update/idle.rb +46 -0
- data/lib/acp/types/unstable/state_update/requires_action.rb +27 -0
- data/lib/acp/types/unstable/state_update/running.rb +27 -0
- data/lib/acp/types/unstable/state_update/unknown.rb +27 -0
- data/lib/acp/types/unstable/state_update.rb +25 -0
- data/lib/acp/types/unstable/subagent_capabilities.rb +27 -0
- data/lib/acp/types/unstable/subagent_session_capabilities.rb +40 -0
- data/lib/acp/types/unstable/subagent_update.rb +71 -0
- data/lib/acp/types/unstable/suggest_nes_request.rb +93 -0
- data/lib/acp/types/unstable/suggest_nes_response.rb +35 -0
- data/lib/acp/types/unstable/text_document_content_change_event.rb +41 -0
- data/lib/acp/types/unstable/text_document_sync_kind.rb +9 -0
- data/lib/acp/types/unstable/unknown_state_update.rb +27 -0
- data/lib/acp/types/unstable/usage.rb +91 -0
- data/lib/acp/types/unstable/workspace_folder.rb +41 -0
- data/lib/acp/types/unstable.rb +155 -0
- data/lib/acp/types/unstructured_command_input.rb +1 -1
- data/lib/acp/types/usage_update.rb +3 -3
- data/lib/acp/types/wait_for_terminal_exit_request.rb +5 -1
- data/lib/acp/types/wait_for_terminal_exit_response.rb +5 -1
- data/lib/acp/types/write_text_file_request.rb +3 -3
- data/lib/acp/types.rb +247 -0
- data/lib/acp/version.rb +1 -1
- data/sig/generated/acp/client_connection.rbs +39 -1
- data/sig/generated/acp/request_error.rbs +12 -1
- data/sig/generated/acp/transport/cancellation.rbs +19 -0
- data/sig/generated/acp/transport/stdio.rbs +38 -0
- data/sig/generated/acp/types/unstable/accept_nes_notification.rbs +25 -0
- data/sig/generated/acp/types/unstable/agent_capabilities.rbs +49 -0
- data/sig/generated/acp/types/unstable/client_capabilities.rbs +53 -0
- data/sig/generated/acp/types/unstable/client_nes_capabilities.rbs +29 -0
- data/sig/generated/acp/types/unstable/client_session_capabilities.rbs +29 -0
- data/sig/generated/acp/types/unstable/close_nes_request.rbs +21 -0
- data/sig/generated/acp/types/unstable/close_nes_response.rbs +17 -0
- data/sig/generated/acp/types/unstable/compaction_status.rbs +11 -0
- data/sig/generated/acp/types/unstable/compaction_summary_chunk.rbs +25 -0
- data/sig/generated/acp/types/unstable/compaction_update.rbs +33 -0
- data/sig/generated/acp/types/unstable/did_change_document_notification.rbs +33 -0
- data/sig/generated/acp/types/unstable/did_close_document_notification.rbs +25 -0
- data/sig/generated/acp/types/unstable/did_focus_document_notification.rbs +37 -0
- data/sig/generated/acp/types/unstable/did_open_document_notification.rbs +37 -0
- data/sig/generated/acp/types/unstable/did_save_document_notification.rbs +25 -0
- data/sig/generated/acp/types/unstable/disable_provider_request.rbs +21 -0
- data/sig/generated/acp/types/unstable/disable_provider_response.rbs +17 -0
- data/sig/generated/acp/types/unstable/fork_session_request.rbs +33 -0
- data/sig/generated/acp/types/unstable/fork_session_response.rbs +29 -0
- data/sig/generated/acp/types/unstable/idle_state_update.rbs +25 -0
- data/sig/generated/acp/types/unstable/initialize_response.rbs +33 -0
- data/sig/generated/acp/types/unstable/list_providers_request.rbs +17 -0
- data/sig/generated/acp/types/unstable/list_providers_response.rbs +21 -0
- data/sig/generated/acp/types/unstable/llm_protocol.rbs +13 -0
- data/sig/generated/acp/types/unstable/mcp_capabilities.rbs +29 -0
- data/sig/generated/acp/types/unstable/mcp_error.rbs +25 -0
- data/sig/generated/acp/types/unstable/mcp_server/acp.rbs +25 -0
- data/sig/generated/acp/types/unstable/mcp_server/http.rbs +29 -0
- data/sig/generated/acp/types/unstable/mcp_server/sse.rbs +29 -0
- data/sig/generated/acp/types/unstable/mcp_server.rbs +9 -0
- data/sig/generated/acp/types/unstable/mcp_server_acp.rbs +25 -0
- data/sig/generated/acp/types/unstable/message_mcp_notification.rbs +33 -0
- data/sig/generated/acp/types/unstable/message_mcp_request.rbs +33 -0
- data/sig/generated/acp/types/unstable/message_mcp_response/error.rbs +21 -0
- data/sig/generated/acp/types/unstable/message_mcp_response/result.rbs +21 -0
- data/sig/generated/acp/types/unstable/message_mcp_response.rbs +9 -0
- data/sig/generated/acp/types/unstable/nes_capabilities.rbs +25 -0
- data/sig/generated/acp/types/unstable/nes_context_capabilities.rbs +41 -0
- data/sig/generated/acp/types/unstable/nes_diagnostic.rbs +33 -0
- data/sig/generated/acp/types/unstable/nes_diagnostic_severity.rbs +11 -0
- data/sig/generated/acp/types/unstable/nes_diagnostics_capabilities.rbs +17 -0
- data/sig/generated/acp/types/unstable/nes_document_did_change_capabilities.rbs +21 -0
- data/sig/generated/acp/types/unstable/nes_document_did_close_capabilities.rbs +17 -0
- data/sig/generated/acp/types/unstable/nes_document_did_focus_capabilities.rbs +17 -0
- data/sig/generated/acp/types/unstable/nes_document_did_open_capabilities.rbs +17 -0
- data/sig/generated/acp/types/unstable/nes_document_did_save_capabilities.rbs +17 -0
- data/sig/generated/acp/types/unstable/nes_document_event_capabilities.rbs +37 -0
- data/sig/generated/acp/types/unstable/nes_edit_history_capabilities.rbs +21 -0
- data/sig/generated/acp/types/unstable/nes_edit_history_entry.rbs +25 -0
- data/sig/generated/acp/types/unstable/nes_edit_suggestion.rbs +33 -0
- data/sig/generated/acp/types/unstable/nes_event_capabilities.rbs +21 -0
- data/sig/generated/acp/types/unstable/nes_excerpt.rbs +29 -0
- data/sig/generated/acp/types/unstable/nes_jump_capabilities.rbs +17 -0
- data/sig/generated/acp/types/unstable/nes_jump_suggestion.rbs +29 -0
- data/sig/generated/acp/types/unstable/nes_open_file.rbs +33 -0
- data/sig/generated/acp/types/unstable/nes_open_files_capabilities.rbs +17 -0
- data/sig/generated/acp/types/unstable/nes_recent_file.rbs +29 -0
- data/sig/generated/acp/types/unstable/nes_recent_files_capabilities.rbs +21 -0
- data/sig/generated/acp/types/unstable/nes_reject_reason.rbs +11 -0
- data/sig/generated/acp/types/unstable/nes_related_snippet.rbs +25 -0
- data/sig/generated/acp/types/unstable/nes_related_snippets_capabilities.rbs +17 -0
- data/sig/generated/acp/types/unstable/nes_rename_capabilities.rbs +17 -0
- data/sig/generated/acp/types/unstable/nes_rename_suggestion.rbs +33 -0
- data/sig/generated/acp/types/unstable/nes_repository.rbs +29 -0
- data/sig/generated/acp/types/unstable/nes_search_and_replace_capabilities.rbs +17 -0
- data/sig/generated/acp/types/unstable/nes_search_and_replace_suggestion.rbs +37 -0
- data/sig/generated/acp/types/unstable/nes_suggest_context.rbs +41 -0
- data/sig/generated/acp/types/unstable/nes_suggestion/edit.rbs +33 -0
- data/sig/generated/acp/types/unstable/nes_suggestion/jump.rbs +29 -0
- data/sig/generated/acp/types/unstable/nes_suggestion/rename.rbs +33 -0
- data/sig/generated/acp/types/unstable/nes_suggestion/searchandreplace.rbs +37 -0
- data/sig/generated/acp/types/unstable/nes_suggestion.rbs +9 -0
- data/sig/generated/acp/types/unstable/nes_text_edit.rbs +25 -0
- data/sig/generated/acp/types/unstable/nes_trigger_kind.rbs +9 -0
- data/sig/generated/acp/types/unstable/nes_user_action.rbs +33 -0
- data/sig/generated/acp/types/unstable/nes_user_actions_capabilities.rbs +21 -0
- data/sig/generated/acp/types/unstable/notice.rbs +29 -0
- data/sig/generated/acp/types/unstable/notice_severity.rbs +9 -0
- data/sig/generated/acp/types/unstable/plan_capabilities.rbs +17 -0
- data/sig/generated/acp/types/unstable/plan_file.rbs +25 -0
- data/sig/generated/acp/types/unstable/plan_items.rbs +25 -0
- data/sig/generated/acp/types/unstable/plan_markdown.rbs +25 -0
- data/sig/generated/acp/types/unstable/plan_removed.rbs +21 -0
- data/sig/generated/acp/types/unstable/plan_update.rbs +21 -0
- data/sig/generated/acp/types/unstable/plan_update_content/file.rbs +25 -0
- data/sig/generated/acp/types/unstable/plan_update_content/items.rbs +25 -0
- data/sig/generated/acp/types/unstable/plan_update_content/markdown.rbs +25 -0
- data/sig/generated/acp/types/unstable/plan_update_content.rbs +9 -0
- data/sig/generated/acp/types/unstable/position.rbs +25 -0
- data/sig/generated/acp/types/unstable/position_encoding_kind.rbs +9 -0
- data/sig/generated/acp/types/unstable/prompt_response.rbs +25 -0
- data/sig/generated/acp/types/unstable/provider_current_config.rbs +25 -0
- data/sig/generated/acp/types/unstable/provider_info.rbs +33 -0
- data/sig/generated/acp/types/unstable/providers_capabilities.rbs +17 -0
- data/sig/generated/acp/types/unstable/range.rbs +25 -0
- data/sig/generated/acp/types/unstable/reject_nes_notification.rbs +29 -0
- data/sig/generated/acp/types/unstable/requires_action_state_update.rbs +17 -0
- data/sig/generated/acp/types/unstable/running_state_update.rbs +17 -0
- data/sig/generated/acp/types/unstable/session_cancel_capabilities.rbs +17 -0
- data/sig/generated/acp/types/unstable/session_capabilities.rbs +41 -0
- data/sig/generated/acp/types/unstable/session_fork_capabilities.rbs +17 -0
- data/sig/generated/acp/types/unstable/session_message.rbs +33 -0
- data/sig/generated/acp/types/unstable/session_message_chunk.rbs +33 -0
- data/sig/generated/acp/types/unstable/session_update/agent_message_chunk.rbs +25 -0
- data/sig/generated/acp/types/unstable/session_update/agent_thought_chunk.rbs +25 -0
- data/sig/generated/acp/types/unstable/session_update/available_commands_update.rbs +21 -0
- data/sig/generated/acp/types/unstable/session_update/compaction_summary_chunk.rbs +25 -0
- data/sig/generated/acp/types/unstable/session_update/compaction_update.rbs +33 -0
- data/sig/generated/acp/types/unstable/session_update/config_option_update.rbs +21 -0
- data/sig/generated/acp/types/unstable/session_update/current_mode_update.rbs +21 -0
- data/sig/generated/acp/types/unstable/session_update/notice.rbs +29 -0
- data/sig/generated/acp/types/unstable/session_update/plan.rbs +21 -0
- data/sig/generated/acp/types/unstable/session_update/plan_removed.rbs +21 -0
- data/sig/generated/acp/types/unstable/session_update/plan_update.rbs +21 -0
- data/sig/generated/acp/types/unstable/session_update/session_info_update.rbs +25 -0
- data/sig/generated/acp/types/unstable/session_update/session_message.rbs +33 -0
- data/sig/generated/acp/types/unstable/session_update/session_message_chunk.rbs +33 -0
- data/sig/generated/acp/types/unstable/session_update/subagent_update.rbs +37 -0
- data/sig/generated/acp/types/unstable/session_update/tool_call.rbs +53 -0
- data/sig/generated/acp/types/unstable/session_update/tool_call_update.rbs +53 -0
- data/sig/generated/acp/types/unstable/session_update/usage_update.rbs +29 -0
- data/sig/generated/acp/types/unstable/session_update/user_message_chunk.rbs +25 -0
- data/sig/generated/acp/types/unstable/session_update.rbs +9 -0
- data/sig/generated/acp/types/unstable/set_provider_request.rbs +33 -0
- data/sig/generated/acp/types/unstable/set_provider_response.rbs +17 -0
- data/sig/generated/acp/types/unstable/start_nes_request.rbs +29 -0
- data/sig/generated/acp/types/unstable/start_nes_response.rbs +21 -0
- data/sig/generated/acp/types/unstable/state_update/idle.rbs +25 -0
- data/sig/generated/acp/types/unstable/state_update/requires_action.rbs +17 -0
- data/sig/generated/acp/types/unstable/state_update/running.rbs +17 -0
- data/sig/generated/acp/types/unstable/state_update/unknown.rbs +17 -0
- data/sig/generated/acp/types/unstable/state_update.rbs +9 -0
- data/sig/generated/acp/types/unstable/subagent_capabilities.rbs +17 -0
- data/sig/generated/acp/types/unstable/subagent_session_capabilities.rbs +21 -0
- data/sig/generated/acp/types/unstable/subagent_update.rbs +37 -0
- data/sig/generated/acp/types/unstable/suggest_nes_request.rbs +45 -0
- data/sig/generated/acp/types/unstable/suggest_nes_response.rbs +21 -0
- data/sig/generated/acp/types/unstable/text_document_content_change_event.rbs +25 -0
- data/sig/generated/acp/types/unstable/text_document_sync_kind.rbs +7 -0
- data/sig/generated/acp/types/unstable/unknown_state_update.rbs +17 -0
- data/sig/generated/acp/types/unstable/usage.rbs +41 -0
- data/sig/generated/acp/types/unstable/workspace_folder.rbs +25 -0
- data/sig/generated/acp/types/unstable.rbs +4 -0
- data/sig/generated/acp/types.rbs +143 -0
- metadata +289 -1
data/lib/acp/types.rb
CHANGED
|
@@ -1,4 +1,251 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module ACP::Types
|
|
4
|
+
# Raised by the generated from_h when a param does not match its schema
|
|
5
|
+
# type; the connection boundaries rescue it into an invalid-params reply
|
|
6
|
+
# that names the failing path.
|
|
7
|
+
class ParseError < StandardError
|
|
8
|
+
# @rbs @segments: Array[String | Integer]
|
|
9
|
+
# @rbs @detail: String
|
|
10
|
+
|
|
11
|
+
# @rbs segments: Array[String | Integer]
|
|
12
|
+
# @rbs detail: String
|
|
13
|
+
# @rbs return: void
|
|
14
|
+
def initialize(segments, detail)
|
|
15
|
+
@segments = segments.freeze
|
|
16
|
+
@detail = detail
|
|
17
|
+
super("#{path}: #{detail}")
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# @dynamic segments
|
|
21
|
+
attr_reader :segments #: Array[String | Integer]
|
|
22
|
+
|
|
23
|
+
# @rbs return: String
|
|
24
|
+
def path
|
|
25
|
+
segments.each_with_index.map do |segment, index|
|
|
26
|
+
if segment.is_a?(Integer) then "[#{segment}]"
|
|
27
|
+
elsif index.zero? then segment
|
|
28
|
+
else ".#{segment}"
|
|
29
|
+
end
|
|
30
|
+
end.join
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Prepends a container's segments so nested failures report an absolute path.
|
|
34
|
+
#
|
|
35
|
+
# @rbs *segments: (String | Integer)
|
|
36
|
+
# @rbs return: ACP::Types::ParseError
|
|
37
|
+
def prefix(*segments)
|
|
38
|
+
ParseError.new([*segments, *@segments], @detail)
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# The guards the generated from_h methods call. Each takes the fetched value
|
|
43
|
+
# and the path to it, and raises ParseError naming that path when the value
|
|
44
|
+
# does not match the schema type. Nested from_h failures come back with the
|
|
45
|
+
# field path prepended, so the reported path is absolute.
|
|
46
|
+
module Check
|
|
47
|
+
# @rbs hash: Hash[String, untyped]
|
|
48
|
+
# @rbs key: String
|
|
49
|
+
# @rbs return: untyped
|
|
50
|
+
def self.key(hash, key)
|
|
51
|
+
hash.fetch(key)
|
|
52
|
+
rescue KeyError
|
|
53
|
+
raise ParseError.new([key], 'is required')
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# @rbs value: untyped
|
|
57
|
+
# @rbs path: String | Array[String | Integer]
|
|
58
|
+
# @rbs allow_nil: bool
|
|
59
|
+
# @rbs allow_unset: bool
|
|
60
|
+
# @rbs return: untyped
|
|
61
|
+
def self.string(value, path, allow_nil: false, allow_unset: false)
|
|
62
|
+
return value if value.is_a?(String) || skipped?(value, allow_nil, allow_unset)
|
|
63
|
+
|
|
64
|
+
raise ParseError.new(segments(path), "expected String, got #{describe(value)}")
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# @rbs value: untyped
|
|
68
|
+
# @rbs path: String | Array[String | Integer]
|
|
69
|
+
# @rbs allow_nil: bool
|
|
70
|
+
# @rbs allow_unset: bool
|
|
71
|
+
# @rbs return: untyped
|
|
72
|
+
def self.boolean(value, path, allow_nil: false, allow_unset: false)
|
|
73
|
+
return value if value == true || value == false || skipped?(value, allow_nil, allow_unset)
|
|
74
|
+
|
|
75
|
+
raise ParseError.new(segments(path), "expected boolean, got #{describe(value)}")
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# @rbs value: untyped
|
|
79
|
+
# @rbs path: String | Array[String | Integer]
|
|
80
|
+
# @rbs min: Integer?
|
|
81
|
+
# @rbs max: Integer?
|
|
82
|
+
# @rbs allow_nil: bool
|
|
83
|
+
# @rbs allow_unset: bool
|
|
84
|
+
# @rbs return: untyped
|
|
85
|
+
def self.integer(value, path, min: nil, max: nil, allow_nil: false, allow_unset: false)
|
|
86
|
+
return value if (value.is_a?(Integer) && within?(value, min, max)) || skipped?(value, allow_nil, allow_unset)
|
|
87
|
+
|
|
88
|
+
raise ParseError.new(segments(path), "expected #{bounded('Integer', min, max)}, got #{describe(value)}")
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# @rbs value: untyped
|
|
92
|
+
# @rbs path: String | Array[String | Integer]
|
|
93
|
+
# @rbs min: Integer?
|
|
94
|
+
# @rbs max: Integer?
|
|
95
|
+
# @rbs allow_nil: bool
|
|
96
|
+
# @rbs allow_unset: bool
|
|
97
|
+
# @rbs return: untyped
|
|
98
|
+
def self.number(value, path, min: nil, max: nil, allow_nil: false, allow_unset: false)
|
|
99
|
+
return value if (value.is_a?(Numeric) && within?(value, min, max)) || skipped?(value, allow_nil, allow_unset)
|
|
100
|
+
|
|
101
|
+
raise ParseError.new(segments(path), "expected #{bounded('Numeric', min, max)}, got #{describe(value)}")
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @rbs value: untyped
|
|
105
|
+
# @rbs path: String | Array[String | Integer]
|
|
106
|
+
# @rbs values: Array[untyped]
|
|
107
|
+
# @rbs allow_nil: bool
|
|
108
|
+
# @rbs allow_unset: bool
|
|
109
|
+
# @rbs return: untyped
|
|
110
|
+
def self.enum(value, path, values, allow_nil: false, allow_unset: false)
|
|
111
|
+
return value if values.include?(value) || skipped?(value, allow_nil, allow_unset)
|
|
112
|
+
|
|
113
|
+
expected = values.map(&:inspect).join(', ')
|
|
114
|
+
raise ParseError.new(segments(path), "expected one of #{expected}, got #{describe(value)}")
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# @rbs value: untyped
|
|
118
|
+
# @rbs path: String | Array[String | Integer]
|
|
119
|
+
# @rbs classes: Array[untyped]
|
|
120
|
+
# @rbs allow_nil: bool
|
|
121
|
+
# @rbs allow_unset: bool
|
|
122
|
+
# @rbs ?&items: (untyped, Array[String | Integer]) -> void
|
|
123
|
+
# @rbs return: untyped
|
|
124
|
+
def self.one_of(value, path, classes, allow_nil: false, allow_unset: false, &items)
|
|
125
|
+
return value if skipped?(value, allow_nil, allow_unset)
|
|
126
|
+
|
|
127
|
+
matched = classes.any? { |klass| value.is_a?(klass) }
|
|
128
|
+
unless matched
|
|
129
|
+
raise ParseError.new(segments(path), "expected #{classes.map(&:name).join(' | ')}, got #{describe(value)}")
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
return value unless value.is_a?(Array) && items
|
|
133
|
+
|
|
134
|
+
value.each_with_index { |item, index| yield(item, [*segments(path), index]) }
|
|
135
|
+
value
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# @rbs value: untyped
|
|
139
|
+
# @rbs path: String | Array[String | Integer]
|
|
140
|
+
# @rbs allow_nil: bool
|
|
141
|
+
# @rbs allow_unset: bool
|
|
142
|
+
# @rbs &check: (untyped, Array[String | Integer]) -> void
|
|
143
|
+
# @rbs return: untyped
|
|
144
|
+
def self.hash(value, path, allow_nil: false, allow_unset: false, &check)
|
|
145
|
+
return value if skipped?(value, allow_nil, allow_unset)
|
|
146
|
+
raise ParseError.new(segments(path), "expected object, got #{describe(value)}") unless value.is_a?(Hash)
|
|
147
|
+
|
|
148
|
+
parsed = {} #: Hash[String, untyped]
|
|
149
|
+
value.each { |key, item| parsed[key] = yield(item, [*segments(path), key]) }
|
|
150
|
+
parsed
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# @rbs value: untyped
|
|
154
|
+
# @rbs path: String | Array[String | Integer]
|
|
155
|
+
# @rbs allow_nil: bool
|
|
156
|
+
# @rbs allow_unset: bool
|
|
157
|
+
# @rbs &check: (untyped, Array[String | Integer]) -> void
|
|
158
|
+
# @rbs return: untyped
|
|
159
|
+
def self.array(value, path, allow_nil: false, allow_unset: false, &check)
|
|
160
|
+
return value if skipped?(value, allow_nil, allow_unset)
|
|
161
|
+
raise ParseError.new(segments(path), "expected array, got #{describe(value)}") unless value.is_a?(Array)
|
|
162
|
+
|
|
163
|
+
value.each_with_index.map { |item, index| yield(item, [*segments(path), index]) }
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# @rbs value: untyped
|
|
167
|
+
# @rbs path: String | Array[String | Integer]
|
|
168
|
+
# @rbs klass: untyped
|
|
169
|
+
# @rbs allow_nil: bool
|
|
170
|
+
# @rbs allow_unset: bool
|
|
171
|
+
# @rbs return: untyped
|
|
172
|
+
def self.object(value, path, klass, allow_nil: false, allow_unset: false)
|
|
173
|
+
return value if skipped?(value, allow_nil, allow_unset)
|
|
174
|
+
raise ParseError.new(segments(path), "expected object, got #{describe(value)}") unless value.is_a?(Hash)
|
|
175
|
+
|
|
176
|
+
begin
|
|
177
|
+
klass.from_h(value)
|
|
178
|
+
rescue ParseError => e
|
|
179
|
+
raise e.prefix(*segments(path))
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# @rbs value: untyped
|
|
184
|
+
# @rbs path: String | Array[String | Integer]
|
|
185
|
+
# @rbs klass: untyped
|
|
186
|
+
# @rbs allow_nil: bool
|
|
187
|
+
# @rbs allow_unset: bool
|
|
188
|
+
# @rbs return: untyped
|
|
189
|
+
def self.objects(value, path, klass, allow_nil: false, allow_unset: false)
|
|
190
|
+
return value if skipped?(value, allow_nil, allow_unset)
|
|
191
|
+
raise ParseError.new(segments(path), "expected array, got #{describe(value)}") unless value.is_a?(Array)
|
|
192
|
+
|
|
193
|
+
value.each_with_index do |item, index|
|
|
194
|
+
next if item.is_a?(Hash)
|
|
195
|
+
|
|
196
|
+
raise ParseError.new([*segments(path), index], "expected object, got #{describe(item)}")
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
begin
|
|
200
|
+
klass.from_a(value)
|
|
201
|
+
rescue ParseError => e
|
|
202
|
+
raise e.prefix(*segments(path))
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# @rbs value: untyped
|
|
207
|
+
# @rbs allow_nil: bool
|
|
208
|
+
# @rbs allow_unset: bool
|
|
209
|
+
# @rbs return: bool
|
|
210
|
+
def self.skipped?(value, allow_nil, allow_unset)
|
|
211
|
+
(value.nil? && allow_nil) || (allow_unset && value.equal?(:unset))
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# @rbs path: String | Array[String | Integer]
|
|
215
|
+
# @rbs return: Array[String | Integer]
|
|
216
|
+
def self.segments(path)
|
|
217
|
+
path.is_a?(Array) ? path : [path]
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# @rbs value: untyped
|
|
221
|
+
# @rbs return: String
|
|
222
|
+
def self.describe(value)
|
|
223
|
+
case value
|
|
224
|
+
when nil then 'null'
|
|
225
|
+
when true then 'true'
|
|
226
|
+
when false then 'false'
|
|
227
|
+
else value.class.name
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# @rbs value: Numeric
|
|
232
|
+
# @rbs min: Integer?
|
|
233
|
+
# @rbs max: Integer?
|
|
234
|
+
# @rbs return: bool
|
|
235
|
+
def self.within?(value, min, max)
|
|
236
|
+
(min.nil? || value >= min) && (max.nil? || value <= max)
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# @rbs name: String
|
|
240
|
+
# @rbs min: Integer?
|
|
241
|
+
# @rbs max: Integer?
|
|
242
|
+
# @rbs return: String
|
|
243
|
+
def self.bounded(name, min, max)
|
|
244
|
+
if min && max then "#{name} between #{min} and #{max}"
|
|
245
|
+
elsif min then "#{name} >= #{min}"
|
|
246
|
+
elsif max then "#{name} <= #{max}"
|
|
247
|
+
else name
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
end
|
|
4
251
|
end
|
data/lib/acp/version.rb
CHANGED
|
@@ -19,12 +19,18 @@ class ACP::ClientConnection
|
|
|
19
19
|
|
|
20
20
|
@release_terminal: (^(ACP::Types::ReleaseTerminalRequest) -> (ACP::Types::ReleaseTerminalResponse | ACP::RequestError))?
|
|
21
21
|
|
|
22
|
+
@elicitation: (^(ACP::Types::CreateElicitationRequest) -> (ACP::Types::CreateElicitationResponse | ACP::RequestError))?
|
|
23
|
+
|
|
24
|
+
@complete_elicitation: (^(ACP::Types::CompleteElicitationNotification) -> void)?
|
|
25
|
+
|
|
22
26
|
@updates: ACP::ClientConnection::_UpdateHandler
|
|
23
27
|
|
|
24
28
|
@fs_capabilities: ACP::Types::FileSystemCapabilities?
|
|
25
29
|
|
|
26
30
|
@terminal: bool?
|
|
27
31
|
|
|
32
|
+
@elicitation_capabilities: ACP::Types::ElicitationCapabilities?
|
|
33
|
+
|
|
28
34
|
@extension_requests: Hash[String, ^(untyped) -> untyped]
|
|
29
35
|
|
|
30
36
|
@extension_notifications: Hash[String, ^(untyped) -> void]
|
|
@@ -35,6 +41,8 @@ class ACP::ClientConnection
|
|
|
35
41
|
|
|
36
42
|
@pending_permissions: Hash[String, Array[Thread::Queue]]
|
|
37
43
|
|
|
44
|
+
@outstanding_elicitations: Hash[String, bool]
|
|
45
|
+
|
|
38
46
|
@logger: ACP::Transport::_Logger
|
|
39
47
|
|
|
40
48
|
PROTOCOL_VERSION: Integer
|
|
@@ -53,12 +61,15 @@ class ACP::ClientConnection
|
|
|
53
61
|
# (ACP::Types::WaitForTerminalExitResponse | ACP::RequestError))?
|
|
54
62
|
# @rbs kill_terminal: (^(ACP::Types::KillTerminalRequest) -> (ACP::Types::KillTerminalResponse | ACP::RequestError))?
|
|
55
63
|
# @rbs release_terminal: (^(ACP::Types::ReleaseTerminalRequest) -> (ACP::Types::ReleaseTerminalResponse | ACP::RequestError))?
|
|
64
|
+
# @rbs elicitation: (^(ACP::Types::CreateElicitationRequest) ->
|
|
65
|
+
# (ACP::Types::CreateElicitationResponse | ACP::RequestError))?
|
|
66
|
+
# @rbs complete_elicitation: (^(ACP::Types::CompleteElicitationNotification) -> void)?
|
|
56
67
|
# @rbs updates: ACP::ClientConnection::_UpdateHandler
|
|
57
68
|
# @rbs extension_requests: Hash[String, ^(untyped) -> untyped]
|
|
58
69
|
# @rbs extension_notifications: Hash[String, ^(untyped) -> void]
|
|
59
70
|
# @rbs logger: ACP::Transport::_Logger
|
|
60
71
|
# @rbs return: void
|
|
61
|
-
def initialize: (transport: ACP::AgentConnection::_Transport, permission: ACP::ClientConnection::_PermissionHandler, ?read_text_file: (^(ACP::Types::ReadTextFileRequest) -> (ACP::Types::ReadTextFileResponse | ACP::RequestError))?, ?write_text_file: (^(ACP::Types::WriteTextFileRequest) -> (ACP::Types::WriteTextFileResponse | ACP::RequestError))?, ?create_terminal: (^(ACP::Types::CreateTerminalRequest) -> (ACP::Types::CreateTerminalResponse | ACP::RequestError))?, ?terminal_output: (^(ACP::Types::TerminalOutputRequest) -> (ACP::Types::TerminalOutputResponse | ACP::RequestError))?, ?wait_for_terminal_exit: (^(ACP::Types::WaitForTerminalExitRequest) -> (ACP::Types::WaitForTerminalExitResponse | ACP::RequestError))?, ?kill_terminal: (^(ACP::Types::KillTerminalRequest) -> (ACP::Types::KillTerminalResponse | ACP::RequestError))?, ?release_terminal: (^(ACP::Types::ReleaseTerminalRequest) -> (ACP::Types::ReleaseTerminalResponse | ACP::RequestError))?, ?updates: ACP::ClientConnection::_UpdateHandler, ?extension_requests: Hash[String, ^(untyped) -> untyped], ?extension_notifications: Hash[String, ^(untyped) -> void], ?logger: ACP::Transport::_Logger) -> void
|
|
72
|
+
def initialize: (transport: ACP::AgentConnection::_Transport, permission: ACP::ClientConnection::_PermissionHandler, ?read_text_file: (^(ACP::Types::ReadTextFileRequest) -> (ACP::Types::ReadTextFileResponse | ACP::RequestError))?, ?write_text_file: (^(ACP::Types::WriteTextFileRequest) -> (ACP::Types::WriteTextFileResponse | ACP::RequestError))?, ?create_terminal: (^(ACP::Types::CreateTerminalRequest) -> (ACP::Types::CreateTerminalResponse | ACP::RequestError))?, ?terminal_output: (^(ACP::Types::TerminalOutputRequest) -> (ACP::Types::TerminalOutputResponse | ACP::RequestError))?, ?wait_for_terminal_exit: (^(ACP::Types::WaitForTerminalExitRequest) -> (ACP::Types::WaitForTerminalExitResponse | ACP::RequestError))?, ?kill_terminal: (^(ACP::Types::KillTerminalRequest) -> (ACP::Types::KillTerminalResponse | ACP::RequestError))?, ?release_terminal: (^(ACP::Types::ReleaseTerminalRequest) -> (ACP::Types::ReleaseTerminalResponse | ACP::RequestError))?, ?elicitation: (^(ACP::Types::CreateElicitationRequest) -> (ACP::Types::CreateElicitationResponse | ACP::RequestError))?, ?complete_elicitation: (^(ACP::Types::CompleteElicitationNotification) -> void)?, ?updates: ACP::ClientConnection::_UpdateHandler, ?extension_requests: Hash[String, ^(untyped) -> untyped], ?extension_notifications: Hash[String, ^(untyped) -> void], ?logger: ACP::Transport::_Logger) -> void
|
|
62
73
|
|
|
63
74
|
# @rbs return: Thread
|
|
64
75
|
def start: () -> Thread
|
|
@@ -226,6 +237,26 @@ class ACP::ClientConnection
|
|
|
226
237
|
# @rbs return: (ACP::Types::ReleaseTerminalResponse | ACP::RequestError)
|
|
227
238
|
def release_terminal: (untyped params) -> (ACP::Types::ReleaseTerminalResponse | ACP::RequestError)
|
|
228
239
|
|
|
240
|
+
# The routes are registered at start, before connect records the advertised
|
|
241
|
+
# capabilities, so a request for an unadvertised mode answers -32602.
|
|
242
|
+
#
|
|
243
|
+
# @rbs params: untyped
|
|
244
|
+
# @rbs return: (ACP::Types::CreateElicitationResponse | ACP::RequestError)
|
|
245
|
+
def create_elicitation: (untyped params) -> (ACP::Types::CreateElicitationResponse | ACP::RequestError)
|
|
246
|
+
|
|
247
|
+
# The spec requires a completion for an unknown or already-completed
|
|
248
|
+
# elicitation id to be ignored, so only an id registered by a served
|
|
249
|
+
# url-mode request reaches the handler. It runs on the transport's reader
|
|
250
|
+
# thread, so it must return quickly.
|
|
251
|
+
#
|
|
252
|
+
# @rbs params: untyped
|
|
253
|
+
# @rbs return: void
|
|
254
|
+
def complete_elicitation: (untyped params) -> void
|
|
255
|
+
|
|
256
|
+
# @rbs elicitation_id: String
|
|
257
|
+
# @rbs return: void
|
|
258
|
+
def register_elicitation: (String elicitation_id) -> void
|
|
259
|
+
|
|
229
260
|
# The fs capabilities initialize advertises that no injected handler serves.
|
|
230
261
|
#
|
|
231
262
|
# @rbs capabilities: ACP::Types::FileSystemCapabilities?
|
|
@@ -238,4 +269,11 @@ class ACP::ClientConnection
|
|
|
238
269
|
# @rbs capabilities: bool?
|
|
239
270
|
# @rbs return: Array[String]
|
|
240
271
|
def unserved_terminal_methods: (bool? capabilities) -> Array[String]
|
|
272
|
+
|
|
273
|
+
# The elicitation capabilities initialize advertises that no injected
|
|
274
|
+
# handler serves.
|
|
275
|
+
#
|
|
276
|
+
# @rbs capabilities: ACP::Types::ElicitationCapabilities?
|
|
277
|
+
# @rbs return: Array[String]
|
|
278
|
+
def unserved_elicitation_modes: (ACP::Types::ElicitationCapabilities? capabilities) -> Array[String]
|
|
241
279
|
end
|
|
@@ -48,8 +48,9 @@ class ACP::RequestError
|
|
|
48
48
|
# @rbs return: ACP::RequestError
|
|
49
49
|
def self.method_not_found: (?String? method) -> ACP::RequestError
|
|
50
50
|
|
|
51
|
+
# @rbs errors: Array[String]?
|
|
51
52
|
# @rbs return: ACP::RequestError
|
|
52
|
-
def self.invalid_params: () -> ACP::RequestError
|
|
53
|
+
def self.invalid_params: (?Array[String]? errors) -> ACP::RequestError
|
|
53
54
|
|
|
54
55
|
# The method-not-found code for a method the client's capabilities do not
|
|
55
56
|
# advertise, with a message that names the capability so it can be told
|
|
@@ -59,6 +60,16 @@ class ACP::RequestError
|
|
|
59
60
|
# @rbs return: ACP::RequestError
|
|
60
61
|
def self.unadvertised: (String capability) -> ACP::RequestError
|
|
61
62
|
|
|
63
|
+
# The invalid-params code for a request whose mode the client's
|
|
64
|
+
# capabilities do not advertise, with a message that names the mode so it
|
|
65
|
+
# can be told apart from malformed params. The spec gives elicitation a
|
|
66
|
+
# mode in its params, so an unadvertised one is invalid params rather than
|
|
67
|
+
# method not found.
|
|
68
|
+
#
|
|
69
|
+
# @rbs mode: String
|
|
70
|
+
# @rbs return: ACP::RequestError
|
|
71
|
+
def self.unadvertised_mode: (String mode) -> ACP::RequestError
|
|
72
|
+
|
|
62
73
|
# @rbs return: ACP::RequestError
|
|
63
74
|
def self.internal_error: () -> ACP::RequestError
|
|
64
75
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Generated from lib/acp/transport/cancellation.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
# Whether the peer cancelled one request. The transport creates one per served
|
|
4
|
+
# request, marks it when the peer's $/cancel_request arrives, and hands it to
|
|
5
|
+
# the serving thread, whose handler can observe it and end the request early.
|
|
6
|
+
class ACP::Transport::Cancellation
|
|
7
|
+
@lock: Thread::Mutex
|
|
8
|
+
|
|
9
|
+
@cancelled: bool
|
|
10
|
+
|
|
11
|
+
# @rbs return: void
|
|
12
|
+
def initialize: () -> void
|
|
13
|
+
|
|
14
|
+
# @rbs return: void
|
|
15
|
+
def cancel: () -> void
|
|
16
|
+
|
|
17
|
+
# @rbs return: bool
|
|
18
|
+
def cancelled?: () -> bool
|
|
19
|
+
end
|
|
@@ -12,6 +12,8 @@ class ACP::Transport::Stdio
|
|
|
12
12
|
|
|
13
13
|
@next_id: Integer
|
|
14
14
|
|
|
15
|
+
@serving: Hash[untyped, ACP::Transport::Cancellation]
|
|
16
|
+
|
|
15
17
|
@pending: Hash[untyped, Thread::Queue]
|
|
16
18
|
|
|
17
19
|
@lock: Thread::Mutex
|
|
@@ -24,6 +26,8 @@ class ACP::Transport::Stdio
|
|
|
24
26
|
|
|
25
27
|
CONNECTION_CLOSED: ACP::RequestError
|
|
26
28
|
|
|
29
|
+
SERVING_CANCEL: Symbol
|
|
30
|
+
|
|
27
31
|
# @rbs input: _Reader
|
|
28
32
|
# @rbs output: _Writer
|
|
29
33
|
# @rbs logger: ACP::Transport::_Logger
|
|
@@ -48,6 +52,21 @@ class ACP::Transport::Stdio
|
|
|
48
52
|
# @rbs return: void
|
|
49
53
|
def notify: (String method, ?untyped params) -> void
|
|
50
54
|
|
|
55
|
+
# The waiting caller is released only by the peer's answer, which the spec
|
|
56
|
+
# requires to be either a result or the -32800 error.
|
|
57
|
+
#
|
|
58
|
+
# @rbs id: untyped
|
|
59
|
+
# @rbs return: void
|
|
60
|
+
def cancel: (untyped id) -> void
|
|
61
|
+
|
|
62
|
+
# The cancellation of the request the calling thread is serving, or nil off
|
|
63
|
+
# a serve thread. A handler observes the peer's $/cancel_request through it
|
|
64
|
+
# and can end early with ACP::RequestError.request_cancelled; whatever it
|
|
65
|
+
# returns, the transport sends exactly one response.
|
|
66
|
+
#
|
|
67
|
+
# @rbs return: ACP::Transport::Cancellation?
|
|
68
|
+
def cancellation: () -> ACP::Transport::Cancellation?
|
|
69
|
+
|
|
51
70
|
private
|
|
52
71
|
|
|
53
72
|
# @rbs line: String
|
|
@@ -81,6 +100,25 @@ class ACP::Transport::Stdio
|
|
|
81
100
|
# @rbs return: void
|
|
82
101
|
def serve: (_Handler? handler, untyped id, untyped params, String method) -> void
|
|
83
102
|
|
|
103
|
+
# Registered before the serve thread starts so a cancel racing the request
|
|
104
|
+
# cannot be missed, and dropped once the response is on the wire so later
|
|
105
|
+
# cancels for the id are ignored.
|
|
106
|
+
#
|
|
107
|
+
# @rbs id: untyped
|
|
108
|
+
# @rbs return: ACP::Transport::Cancellation
|
|
109
|
+
def register_serving: (untyped id) -> ACP::Transport::Cancellation
|
|
110
|
+
|
|
111
|
+
# @rbs id: untyped
|
|
112
|
+
# @rbs return: void
|
|
113
|
+
def unregister_serving: (untyped id) -> void
|
|
114
|
+
|
|
115
|
+
# A notification has no reply to carry a malformed params failure, so one
|
|
116
|
+
# is warned and dropped rather than answered.
|
|
117
|
+
#
|
|
118
|
+
# @rbs params: untyped
|
|
119
|
+
# @rbs return: void
|
|
120
|
+
def cancel_request: (untyped params) -> void
|
|
121
|
+
|
|
84
122
|
# For code with no reply to carry an error: a notification handler, or a
|
|
85
123
|
# Reply's after once the reply is on the wire. An exception must not kill
|
|
86
124
|
# the reader thread or print a thread report.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Generated from lib/acp/types/unstable/accept_nes_notification.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
class ACP::Types::Unstable::AcceptNesNotification
|
|
4
|
+
# @dynamic session_id
|
|
5
|
+
attr_reader session_id: String
|
|
6
|
+
|
|
7
|
+
# @dynamic id
|
|
8
|
+
attr_reader id: String
|
|
9
|
+
|
|
10
|
+
# @dynamic meta
|
|
11
|
+
attr_reader meta: Hash[String, untyped]?
|
|
12
|
+
|
|
13
|
+
# @rbs session_id: String
|
|
14
|
+
# @rbs id: String
|
|
15
|
+
# @rbs meta: Hash[String, untyped]?
|
|
16
|
+
# @rbs return: void
|
|
17
|
+
def initialize: (session_id: String, id: String, ?meta: Hash[String, untyped]?) -> void
|
|
18
|
+
|
|
19
|
+
# @rbs hash: Hash[String, untyped]
|
|
20
|
+
# @rbs return: ACP::Types::Unstable::AcceptNesNotification
|
|
21
|
+
def self.from_h: (Hash[String, untyped] hash) -> ACP::Types::Unstable::AcceptNesNotification
|
|
22
|
+
|
|
23
|
+
# @rbs return: Hash[String, untyped]
|
|
24
|
+
def to_h: () -> Hash[String, untyped]
|
|
25
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Generated from lib/acp/types/unstable/agent_capabilities.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
class ACP::Types::Unstable::AgentCapabilities
|
|
4
|
+
# @dynamic load_session
|
|
5
|
+
attr_reader load_session: bool?
|
|
6
|
+
|
|
7
|
+
# @dynamic prompt_capabilities
|
|
8
|
+
attr_reader prompt_capabilities: ACP::Types::PromptCapabilities?
|
|
9
|
+
|
|
10
|
+
# @dynamic mcp_capabilities
|
|
11
|
+
attr_reader mcp_capabilities: ACP::Types::Unstable::McpCapabilities?
|
|
12
|
+
|
|
13
|
+
# @dynamic session_capabilities
|
|
14
|
+
attr_reader session_capabilities: ACP::Types::Unstable::SessionCapabilities?
|
|
15
|
+
|
|
16
|
+
# @dynamic auth
|
|
17
|
+
attr_reader auth: ACP::Types::AgentAuthCapabilities?
|
|
18
|
+
|
|
19
|
+
# @dynamic providers
|
|
20
|
+
attr_reader providers: ACP::Types::Unstable::ProvidersCapabilities?
|
|
21
|
+
|
|
22
|
+
# @dynamic nes
|
|
23
|
+
attr_reader nes: ACP::Types::Unstable::NesCapabilities?
|
|
24
|
+
|
|
25
|
+
# @dynamic position_encoding
|
|
26
|
+
attr_reader position_encoding: String?
|
|
27
|
+
|
|
28
|
+
# @dynamic meta
|
|
29
|
+
attr_reader meta: Hash[String, untyped]?
|
|
30
|
+
|
|
31
|
+
# @rbs load_session: bool?
|
|
32
|
+
# @rbs prompt_capabilities: ACP::Types::PromptCapabilities?
|
|
33
|
+
# @rbs mcp_capabilities: ACP::Types::Unstable::McpCapabilities?
|
|
34
|
+
# @rbs session_capabilities: ACP::Types::Unstable::SessionCapabilities?
|
|
35
|
+
# @rbs auth: ACP::Types::AgentAuthCapabilities?
|
|
36
|
+
# @rbs providers: ACP::Types::Unstable::ProvidersCapabilities?
|
|
37
|
+
# @rbs nes: ACP::Types::Unstable::NesCapabilities?
|
|
38
|
+
# @rbs position_encoding: String?
|
|
39
|
+
# @rbs meta: Hash[String, untyped]?
|
|
40
|
+
# @rbs return: void
|
|
41
|
+
def initialize: (?load_session: bool?, ?prompt_capabilities: ACP::Types::PromptCapabilities?, ?mcp_capabilities: ACP::Types::Unstable::McpCapabilities?, ?session_capabilities: ACP::Types::Unstable::SessionCapabilities?, ?auth: ACP::Types::AgentAuthCapabilities?, ?providers: ACP::Types::Unstable::ProvidersCapabilities?, ?nes: ACP::Types::Unstable::NesCapabilities?, ?position_encoding: String?, ?meta: Hash[String, untyped]?) -> void
|
|
42
|
+
|
|
43
|
+
# @rbs hash: Hash[String, untyped]
|
|
44
|
+
# @rbs return: ACP::Types::Unstable::AgentCapabilities
|
|
45
|
+
def self.from_h: (Hash[String, untyped] hash) -> ACP::Types::Unstable::AgentCapabilities
|
|
46
|
+
|
|
47
|
+
# @rbs return: Hash[String, untyped]
|
|
48
|
+
def to_h: () -> Hash[String, untyped]
|
|
49
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Generated from lib/acp/types/unstable/client_capabilities.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
class ACP::Types::Unstable::ClientCapabilities
|
|
4
|
+
# @dynamic fs
|
|
5
|
+
attr_reader fs: ACP::Types::FileSystemCapabilities?
|
|
6
|
+
|
|
7
|
+
# @dynamic terminal
|
|
8
|
+
attr_reader terminal: bool?
|
|
9
|
+
|
|
10
|
+
# @dynamic session
|
|
11
|
+
attr_reader session: ACP::Types::Unstable::ClientSessionCapabilities?
|
|
12
|
+
|
|
13
|
+
# @dynamic subagents
|
|
14
|
+
attr_reader subagents: ACP::Types::Unstable::SubagentCapabilities?
|
|
15
|
+
|
|
16
|
+
# @dynamic plan
|
|
17
|
+
attr_reader plan: ACP::Types::Unstable::PlanCapabilities?
|
|
18
|
+
|
|
19
|
+
# @dynamic auth
|
|
20
|
+
attr_reader auth: ACP::Types::AuthCapabilities?
|
|
21
|
+
|
|
22
|
+
# @dynamic elicitation
|
|
23
|
+
attr_reader elicitation: ACP::Types::ElicitationCapabilities?
|
|
24
|
+
|
|
25
|
+
# @dynamic nes
|
|
26
|
+
attr_reader nes: ACP::Types::Unstable::ClientNesCapabilities?
|
|
27
|
+
|
|
28
|
+
# @dynamic position_encodings
|
|
29
|
+
attr_reader position_encodings: Array[String]?
|
|
30
|
+
|
|
31
|
+
# @dynamic meta
|
|
32
|
+
attr_reader meta: Hash[String, untyped]?
|
|
33
|
+
|
|
34
|
+
# @rbs fs: ACP::Types::FileSystemCapabilities?
|
|
35
|
+
# @rbs terminal: bool?
|
|
36
|
+
# @rbs session: ACP::Types::Unstable::ClientSessionCapabilities?
|
|
37
|
+
# @rbs subagents: ACP::Types::Unstable::SubagentCapabilities?
|
|
38
|
+
# @rbs plan: ACP::Types::Unstable::PlanCapabilities?
|
|
39
|
+
# @rbs auth: ACP::Types::AuthCapabilities?
|
|
40
|
+
# @rbs elicitation: ACP::Types::ElicitationCapabilities?
|
|
41
|
+
# @rbs nes: ACP::Types::Unstable::ClientNesCapabilities?
|
|
42
|
+
# @rbs position_encodings: Array[String]?
|
|
43
|
+
# @rbs meta: Hash[String, untyped]?
|
|
44
|
+
# @rbs return: void
|
|
45
|
+
def initialize: (?fs: ACP::Types::FileSystemCapabilities?, ?terminal: bool?, ?session: ACP::Types::Unstable::ClientSessionCapabilities?, ?subagents: ACP::Types::Unstable::SubagentCapabilities?, ?plan: ACP::Types::Unstable::PlanCapabilities?, ?auth: ACP::Types::AuthCapabilities?, ?elicitation: ACP::Types::ElicitationCapabilities?, ?nes: ACP::Types::Unstable::ClientNesCapabilities?, ?position_encodings: Array[String]?, ?meta: Hash[String, untyped]?) -> void
|
|
46
|
+
|
|
47
|
+
# @rbs hash: Hash[String, untyped]
|
|
48
|
+
# @rbs return: ACP::Types::Unstable::ClientCapabilities
|
|
49
|
+
def self.from_h: (Hash[String, untyped] hash) -> ACP::Types::Unstable::ClientCapabilities
|
|
50
|
+
|
|
51
|
+
# @rbs return: Hash[String, untyped]
|
|
52
|
+
def to_h: () -> Hash[String, untyped]
|
|
53
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Generated from lib/acp/types/unstable/client_nes_capabilities.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
class ACP::Types::Unstable::ClientNesCapabilities
|
|
4
|
+
# @dynamic jump
|
|
5
|
+
attr_reader jump: ACP::Types::Unstable::NesJumpCapabilities?
|
|
6
|
+
|
|
7
|
+
# @dynamic rename
|
|
8
|
+
attr_reader rename: ACP::Types::Unstable::NesRenameCapabilities?
|
|
9
|
+
|
|
10
|
+
# @dynamic search_and_replace
|
|
11
|
+
attr_reader search_and_replace: ACP::Types::Unstable::NesSearchAndReplaceCapabilities?
|
|
12
|
+
|
|
13
|
+
# @dynamic meta
|
|
14
|
+
attr_reader meta: Hash[String, untyped]?
|
|
15
|
+
|
|
16
|
+
# @rbs jump: ACP::Types::Unstable::NesJumpCapabilities?
|
|
17
|
+
# @rbs rename: ACP::Types::Unstable::NesRenameCapabilities?
|
|
18
|
+
# @rbs search_and_replace: ACP::Types::Unstable::NesSearchAndReplaceCapabilities?
|
|
19
|
+
# @rbs meta: Hash[String, untyped]?
|
|
20
|
+
# @rbs return: void
|
|
21
|
+
def initialize: (?jump: ACP::Types::Unstable::NesJumpCapabilities?, ?rename: ACP::Types::Unstable::NesRenameCapabilities?, ?search_and_replace: ACP::Types::Unstable::NesSearchAndReplaceCapabilities?, ?meta: Hash[String, untyped]?) -> void
|
|
22
|
+
|
|
23
|
+
# @rbs hash: Hash[String, untyped]
|
|
24
|
+
# @rbs return: ACP::Types::Unstable::ClientNesCapabilities
|
|
25
|
+
def self.from_h: (Hash[String, untyped] hash) -> ACP::Types::Unstable::ClientNesCapabilities
|
|
26
|
+
|
|
27
|
+
# @rbs return: Hash[String, untyped]
|
|
28
|
+
def to_h: () -> Hash[String, untyped]
|
|
29
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Generated from lib/acp/types/unstable/client_session_capabilities.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
class ACP::Types::Unstable::ClientSessionCapabilities
|
|
4
|
+
# @dynamic compaction
|
|
5
|
+
attr_reader compaction: Hash[String, untyped]?
|
|
6
|
+
|
|
7
|
+
# @dynamic config_options
|
|
8
|
+
attr_reader config_options: ACP::Types::SessionConfigOptionsCapabilities?
|
|
9
|
+
|
|
10
|
+
# @dynamic notices
|
|
11
|
+
attr_reader notices: Hash[String, untyped]?
|
|
12
|
+
|
|
13
|
+
# @dynamic meta
|
|
14
|
+
attr_reader meta: Hash[String, untyped]?
|
|
15
|
+
|
|
16
|
+
# @rbs compaction: Hash[String, untyped]?
|
|
17
|
+
# @rbs config_options: ACP::Types::SessionConfigOptionsCapabilities?
|
|
18
|
+
# @rbs notices: Hash[String, untyped]?
|
|
19
|
+
# @rbs meta: Hash[String, untyped]?
|
|
20
|
+
# @rbs return: void
|
|
21
|
+
def initialize: (?compaction: Hash[String, untyped]?, ?config_options: ACP::Types::SessionConfigOptionsCapabilities?, ?notices: Hash[String, untyped]?, ?meta: Hash[String, untyped]?) -> void
|
|
22
|
+
|
|
23
|
+
# @rbs hash: Hash[String, untyped]
|
|
24
|
+
# @rbs return: ACP::Types::Unstable::ClientSessionCapabilities
|
|
25
|
+
def self.from_h: (Hash[String, untyped] hash) -> ACP::Types::Unstable::ClientSessionCapabilities
|
|
26
|
+
|
|
27
|
+
# @rbs return: Hash[String, untyped]
|
|
28
|
+
def to_h: () -> Hash[String, untyped]
|
|
29
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Generated from lib/acp/types/unstable/close_nes_request.rb with RBS::Inline
|
|
2
|
+
|
|
3
|
+
class ACP::Types::Unstable::CloseNesRequest
|
|
4
|
+
# @dynamic session_id
|
|
5
|
+
attr_reader session_id: String
|
|
6
|
+
|
|
7
|
+
# @dynamic meta
|
|
8
|
+
attr_reader meta: Hash[String, untyped]?
|
|
9
|
+
|
|
10
|
+
# @rbs session_id: String
|
|
11
|
+
# @rbs meta: Hash[String, untyped]?
|
|
12
|
+
# @rbs return: void
|
|
13
|
+
def initialize: (session_id: String, ?meta: Hash[String, untyped]?) -> void
|
|
14
|
+
|
|
15
|
+
# @rbs hash: Hash[String, untyped]
|
|
16
|
+
# @rbs return: ACP::Types::Unstable::CloseNesRequest
|
|
17
|
+
def self.from_h: (Hash[String, untyped] hash) -> ACP::Types::Unstable::CloseNesRequest
|
|
18
|
+
|
|
19
|
+
# @rbs return: Hash[String, untyped]
|
|
20
|
+
def to_h: () -> Hash[String, untyped]
|
|
21
|
+
end
|