acp-sdk 0.8.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 +8 -0
- data/README.md +12 -0
- 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/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/version.rb +1 -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
- metadata +289 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Generated by bin/types from schema/schema.unstable.json. Do not edit.
|
|
4
|
+
# Unstable: not part of the ACP spec, may change or disappear at any point.
|
|
5
|
+
|
|
6
|
+
class ACP::Types::Unstable::TextDocumentContentChangeEvent
|
|
7
|
+
# @dynamic range
|
|
8
|
+
attr_reader :range #: ACP::Types::Unstable::Range?
|
|
9
|
+
|
|
10
|
+
# @dynamic text
|
|
11
|
+
attr_reader :text #: String
|
|
12
|
+
|
|
13
|
+
# @dynamic meta
|
|
14
|
+
attr_reader :meta #: Hash[String, untyped]?
|
|
15
|
+
|
|
16
|
+
# @rbs range: ACP::Types::Unstable::Range?
|
|
17
|
+
# @rbs text: String
|
|
18
|
+
# @rbs meta: Hash[String, untyped]?
|
|
19
|
+
# @rbs return: void
|
|
20
|
+
def initialize(text:, range: nil, meta: nil)
|
|
21
|
+
@range = range
|
|
22
|
+
@text = text
|
|
23
|
+
@meta = meta
|
|
24
|
+
freeze
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# @rbs hash: Hash[String, untyped]
|
|
28
|
+
# @rbs return: ACP::Types::Unstable::TextDocumentContentChangeEvent
|
|
29
|
+
def self.from_h(hash)
|
|
30
|
+
new(
|
|
31
|
+
range: ACP::Types::Check.object(hash['range'], 'range', ACP::Types::Unstable::Range, allow_nil: true),
|
|
32
|
+
text: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'text'), 'text'),
|
|
33
|
+
meta: hash['_meta']
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# @rbs return: Hash[String, untyped]
|
|
38
|
+
def to_h
|
|
39
|
+
{ 'text' => text, 'range' => range&.to_h, '_meta' => meta }.compact
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Generated by bin/types from schema/schema.unstable.json. Do not edit.
|
|
4
|
+
# Unstable: not part of the ACP spec, may change or disappear at any point.
|
|
5
|
+
|
|
6
|
+
module ACP::Types::Unstable::TextDocumentSyncKind
|
|
7
|
+
FULL = 'full'
|
|
8
|
+
INCREMENTAL = 'incremental'
|
|
9
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Generated by bin/types from schema/schema.unstable.json. Do not edit.
|
|
4
|
+
# Unstable: not part of the ACP spec, may change or disappear at any point.
|
|
5
|
+
|
|
6
|
+
class ACP::Types::Unstable::UnknownStateUpdate
|
|
7
|
+
# @dynamic meta
|
|
8
|
+
attr_reader :meta #: Hash[String, untyped]?
|
|
9
|
+
|
|
10
|
+
# @rbs meta: Hash[String, untyped]?
|
|
11
|
+
# @rbs return: void
|
|
12
|
+
def initialize(meta: nil)
|
|
13
|
+
@meta = meta
|
|
14
|
+
freeze
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# @rbs hash: Hash[String, untyped]
|
|
18
|
+
# @rbs return: ACP::Types::Unstable::UnknownStateUpdate
|
|
19
|
+
def self.from_h(hash)
|
|
20
|
+
new(meta: hash['_meta'])
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# @rbs return: Hash[String, untyped]
|
|
24
|
+
def to_h
|
|
25
|
+
{ '_meta' => meta }.compact
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Generated by bin/types from schema/schema.unstable.json. Do not edit.
|
|
4
|
+
# Unstable: not part of the ACP spec, may change or disappear at any point.
|
|
5
|
+
|
|
6
|
+
class ACP::Types::Unstable::Usage
|
|
7
|
+
# @dynamic total_tokens
|
|
8
|
+
attr_reader :total_tokens #: Integer
|
|
9
|
+
|
|
10
|
+
# @dynamic input_tokens
|
|
11
|
+
attr_reader :input_tokens #: Integer
|
|
12
|
+
|
|
13
|
+
# @dynamic output_tokens
|
|
14
|
+
attr_reader :output_tokens #: Integer
|
|
15
|
+
|
|
16
|
+
# @dynamic thought_tokens
|
|
17
|
+
attr_reader :thought_tokens #: Integer?
|
|
18
|
+
|
|
19
|
+
# @dynamic cached_read_tokens
|
|
20
|
+
attr_reader :cached_read_tokens #: Integer?
|
|
21
|
+
|
|
22
|
+
# @dynamic cached_write_tokens
|
|
23
|
+
attr_reader :cached_write_tokens #: Integer?
|
|
24
|
+
|
|
25
|
+
# @dynamic meta
|
|
26
|
+
attr_reader :meta #: Hash[String, untyped]?
|
|
27
|
+
|
|
28
|
+
# @rbs total_tokens: Integer
|
|
29
|
+
# @rbs input_tokens: Integer
|
|
30
|
+
# @rbs output_tokens: Integer
|
|
31
|
+
# @rbs thought_tokens: Integer?
|
|
32
|
+
# @rbs cached_read_tokens: Integer?
|
|
33
|
+
# @rbs cached_write_tokens: Integer?
|
|
34
|
+
# @rbs meta: Hash[String, untyped]?
|
|
35
|
+
# @rbs return: void
|
|
36
|
+
def initialize(
|
|
37
|
+
total_tokens:,
|
|
38
|
+
input_tokens:,
|
|
39
|
+
output_tokens:,
|
|
40
|
+
thought_tokens: nil,
|
|
41
|
+
cached_read_tokens: nil,
|
|
42
|
+
cached_write_tokens: nil,
|
|
43
|
+
meta: nil
|
|
44
|
+
)
|
|
45
|
+
@total_tokens = total_tokens
|
|
46
|
+
@input_tokens = input_tokens
|
|
47
|
+
@output_tokens = output_tokens
|
|
48
|
+
@thought_tokens = thought_tokens
|
|
49
|
+
@cached_read_tokens = cached_read_tokens
|
|
50
|
+
@cached_write_tokens = cached_write_tokens
|
|
51
|
+
@meta = meta
|
|
52
|
+
freeze
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# @rbs hash: Hash[String, untyped]
|
|
56
|
+
# @rbs return: ACP::Types::Unstable::Usage
|
|
57
|
+
def self.from_h(hash)
|
|
58
|
+
new(
|
|
59
|
+
total_tokens: ACP::Types::Check.integer(ACP::Types::Check.key(hash, 'totalTokens'), 'totalTokens', min: 0),
|
|
60
|
+
input_tokens: ACP::Types::Check.integer(ACP::Types::Check.key(hash, 'inputTokens'), 'inputTokens', min: 0),
|
|
61
|
+
output_tokens: ACP::Types::Check.integer(ACP::Types::Check.key(hash, 'outputTokens'), 'outputTokens', min: 0),
|
|
62
|
+
thought_tokens: ACP::Types::Check.integer(hash['thoughtTokens'], 'thoughtTokens', min: 0, allow_nil: true),
|
|
63
|
+
cached_read_tokens: ACP::Types::Check.integer(
|
|
64
|
+
hash['cachedReadTokens'],
|
|
65
|
+
'cachedReadTokens',
|
|
66
|
+
min: 0,
|
|
67
|
+
allow_nil: true
|
|
68
|
+
),
|
|
69
|
+
cached_write_tokens: ACP::Types::Check.integer(
|
|
70
|
+
hash['cachedWriteTokens'],
|
|
71
|
+
'cachedWriteTokens',
|
|
72
|
+
min: 0,
|
|
73
|
+
allow_nil: true
|
|
74
|
+
),
|
|
75
|
+
meta: hash['_meta']
|
|
76
|
+
)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# @rbs return: Hash[String, untyped]
|
|
80
|
+
def to_h
|
|
81
|
+
{
|
|
82
|
+
'totalTokens' => total_tokens,
|
|
83
|
+
'inputTokens' => input_tokens,
|
|
84
|
+
'outputTokens' => output_tokens,
|
|
85
|
+
'thoughtTokens' => thought_tokens,
|
|
86
|
+
'cachedReadTokens' => cached_read_tokens,
|
|
87
|
+
'cachedWriteTokens' => cached_write_tokens,
|
|
88
|
+
'_meta' => meta
|
|
89
|
+
}.compact
|
|
90
|
+
end
|
|
91
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Generated by bin/types from schema/schema.unstable.json. Do not edit.
|
|
4
|
+
# Unstable: not part of the ACP spec, may change or disappear at any point.
|
|
5
|
+
|
|
6
|
+
class ACP::Types::Unstable::WorkspaceFolder
|
|
7
|
+
# @dynamic uri
|
|
8
|
+
attr_reader :uri #: String
|
|
9
|
+
|
|
10
|
+
# @dynamic name
|
|
11
|
+
attr_reader :name #: String
|
|
12
|
+
|
|
13
|
+
# @dynamic meta
|
|
14
|
+
attr_reader :meta #: Hash[String, untyped]?
|
|
15
|
+
|
|
16
|
+
# @rbs uri: String
|
|
17
|
+
# @rbs name: String
|
|
18
|
+
# @rbs meta: Hash[String, untyped]?
|
|
19
|
+
# @rbs return: void
|
|
20
|
+
def initialize(uri:, name:, meta: nil)
|
|
21
|
+
@uri = uri
|
|
22
|
+
@name = name
|
|
23
|
+
@meta = meta
|
|
24
|
+
freeze
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# @rbs hash: Hash[String, untyped]
|
|
28
|
+
# @rbs return: ACP::Types::Unstable::WorkspaceFolder
|
|
29
|
+
def self.from_h(hash)
|
|
30
|
+
new(
|
|
31
|
+
uri: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'uri'), 'uri'),
|
|
32
|
+
name: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'name'), 'name'),
|
|
33
|
+
meta: hash['_meta']
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# @rbs return: Hash[String, untyped]
|
|
38
|
+
def to_h
|
|
39
|
+
{ 'uri' => uri, 'name' => name, '_meta' => meta }.compact
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Generated by bin/types from schema/schema.unstable.json. Do not edit.
|
|
4
|
+
#
|
|
5
|
+
# Callers opt into the unstable types with `require 'acp/types/unstable'`.
|
|
6
|
+
# Zeitwerk ignores lib/acp/types/unstable, so referencing
|
|
7
|
+
# ACP::Types::Unstable without this require raises NameError.
|
|
8
|
+
# These types are not part of the ACP spec and may change or disappear at
|
|
9
|
+
# any point; the stable ACP::Types namespace is unaffected.
|
|
10
|
+
|
|
11
|
+
module ACP::Types::Unstable
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
require_relative 'unstable/accept_nes_notification'
|
|
15
|
+
require_relative 'unstable/agent_capabilities'
|
|
16
|
+
require_relative 'unstable/client_capabilities'
|
|
17
|
+
require_relative 'unstable/client_nes_capabilities'
|
|
18
|
+
require_relative 'unstable/client_session_capabilities'
|
|
19
|
+
require_relative 'unstable/close_nes_request'
|
|
20
|
+
require_relative 'unstable/close_nes_response'
|
|
21
|
+
require_relative 'unstable/compaction_status'
|
|
22
|
+
require_relative 'unstable/compaction_summary_chunk'
|
|
23
|
+
require_relative 'unstable/compaction_update'
|
|
24
|
+
require_relative 'unstable/did_change_document_notification'
|
|
25
|
+
require_relative 'unstable/did_close_document_notification'
|
|
26
|
+
require_relative 'unstable/did_focus_document_notification'
|
|
27
|
+
require_relative 'unstable/did_open_document_notification'
|
|
28
|
+
require_relative 'unstable/did_save_document_notification'
|
|
29
|
+
require_relative 'unstable/disable_provider_request'
|
|
30
|
+
require_relative 'unstable/disable_provider_response'
|
|
31
|
+
require_relative 'unstable/fork_session_request'
|
|
32
|
+
require_relative 'unstable/fork_session_response'
|
|
33
|
+
require_relative 'unstable/idle_state_update'
|
|
34
|
+
require_relative 'unstable/initialize_response'
|
|
35
|
+
require_relative 'unstable/list_providers_request'
|
|
36
|
+
require_relative 'unstable/list_providers_response'
|
|
37
|
+
require_relative 'unstable/llm_protocol'
|
|
38
|
+
require_relative 'unstable/mcp_capabilities'
|
|
39
|
+
require_relative 'unstable/mcp_error'
|
|
40
|
+
require_relative 'unstable/mcp_server'
|
|
41
|
+
require_relative 'unstable/mcp_server/acp'
|
|
42
|
+
require_relative 'unstable/mcp_server/http'
|
|
43
|
+
require_relative 'unstable/mcp_server/sse'
|
|
44
|
+
require_relative 'unstable/mcp_server_acp'
|
|
45
|
+
require_relative 'unstable/message_mcp_notification'
|
|
46
|
+
require_relative 'unstable/message_mcp_request'
|
|
47
|
+
require_relative 'unstable/message_mcp_response'
|
|
48
|
+
require_relative 'unstable/message_mcp_response/error'
|
|
49
|
+
require_relative 'unstable/message_mcp_response/result'
|
|
50
|
+
require_relative 'unstable/nes_capabilities'
|
|
51
|
+
require_relative 'unstable/nes_context_capabilities'
|
|
52
|
+
require_relative 'unstable/nes_diagnostic'
|
|
53
|
+
require_relative 'unstable/nes_diagnostic_severity'
|
|
54
|
+
require_relative 'unstable/nes_diagnostics_capabilities'
|
|
55
|
+
require_relative 'unstable/nes_document_did_change_capabilities'
|
|
56
|
+
require_relative 'unstable/nes_document_did_close_capabilities'
|
|
57
|
+
require_relative 'unstable/nes_document_did_focus_capabilities'
|
|
58
|
+
require_relative 'unstable/nes_document_did_open_capabilities'
|
|
59
|
+
require_relative 'unstable/nes_document_did_save_capabilities'
|
|
60
|
+
require_relative 'unstable/nes_document_event_capabilities'
|
|
61
|
+
require_relative 'unstable/nes_edit_history_capabilities'
|
|
62
|
+
require_relative 'unstable/nes_edit_history_entry'
|
|
63
|
+
require_relative 'unstable/nes_edit_suggestion'
|
|
64
|
+
require_relative 'unstable/nes_event_capabilities'
|
|
65
|
+
require_relative 'unstable/nes_excerpt'
|
|
66
|
+
require_relative 'unstable/nes_jump_capabilities'
|
|
67
|
+
require_relative 'unstable/nes_jump_suggestion'
|
|
68
|
+
require_relative 'unstable/nes_open_file'
|
|
69
|
+
require_relative 'unstable/nes_open_files_capabilities'
|
|
70
|
+
require_relative 'unstable/nes_recent_file'
|
|
71
|
+
require_relative 'unstable/nes_recent_files_capabilities'
|
|
72
|
+
require_relative 'unstable/nes_reject_reason'
|
|
73
|
+
require_relative 'unstable/nes_related_snippet'
|
|
74
|
+
require_relative 'unstable/nes_related_snippets_capabilities'
|
|
75
|
+
require_relative 'unstable/nes_rename_capabilities'
|
|
76
|
+
require_relative 'unstable/nes_rename_suggestion'
|
|
77
|
+
require_relative 'unstable/nes_repository'
|
|
78
|
+
require_relative 'unstable/nes_search_and_replace_capabilities'
|
|
79
|
+
require_relative 'unstable/nes_search_and_replace_suggestion'
|
|
80
|
+
require_relative 'unstable/nes_suggest_context'
|
|
81
|
+
require_relative 'unstable/nes_suggestion'
|
|
82
|
+
require_relative 'unstable/nes_suggestion/edit'
|
|
83
|
+
require_relative 'unstable/nes_suggestion/jump'
|
|
84
|
+
require_relative 'unstable/nes_suggestion/rename'
|
|
85
|
+
require_relative 'unstable/nes_suggestion/searchandreplace'
|
|
86
|
+
require_relative 'unstable/nes_text_edit'
|
|
87
|
+
require_relative 'unstable/nes_trigger_kind'
|
|
88
|
+
require_relative 'unstable/nes_user_action'
|
|
89
|
+
require_relative 'unstable/nes_user_actions_capabilities'
|
|
90
|
+
require_relative 'unstable/notice'
|
|
91
|
+
require_relative 'unstable/notice_severity'
|
|
92
|
+
require_relative 'unstable/plan_capabilities'
|
|
93
|
+
require_relative 'unstable/plan_file'
|
|
94
|
+
require_relative 'unstable/plan_items'
|
|
95
|
+
require_relative 'unstable/plan_markdown'
|
|
96
|
+
require_relative 'unstable/plan_removed'
|
|
97
|
+
require_relative 'unstable/plan_update'
|
|
98
|
+
require_relative 'unstable/plan_update_content'
|
|
99
|
+
require_relative 'unstable/plan_update_content/file'
|
|
100
|
+
require_relative 'unstable/plan_update_content/items'
|
|
101
|
+
require_relative 'unstable/plan_update_content/markdown'
|
|
102
|
+
require_relative 'unstable/position'
|
|
103
|
+
require_relative 'unstable/position_encoding_kind'
|
|
104
|
+
require_relative 'unstable/prompt_response'
|
|
105
|
+
require_relative 'unstable/provider_current_config'
|
|
106
|
+
require_relative 'unstable/provider_info'
|
|
107
|
+
require_relative 'unstable/providers_capabilities'
|
|
108
|
+
require_relative 'unstable/range'
|
|
109
|
+
require_relative 'unstable/reject_nes_notification'
|
|
110
|
+
require_relative 'unstable/requires_action_state_update'
|
|
111
|
+
require_relative 'unstable/running_state_update'
|
|
112
|
+
require_relative 'unstable/session_cancel_capabilities'
|
|
113
|
+
require_relative 'unstable/session_capabilities'
|
|
114
|
+
require_relative 'unstable/session_fork_capabilities'
|
|
115
|
+
require_relative 'unstable/session_message'
|
|
116
|
+
require_relative 'unstable/session_message_chunk'
|
|
117
|
+
require_relative 'unstable/session_update'
|
|
118
|
+
require_relative 'unstable/session_update/agent_message_chunk'
|
|
119
|
+
require_relative 'unstable/session_update/agent_thought_chunk'
|
|
120
|
+
require_relative 'unstable/session_update/available_commands_update'
|
|
121
|
+
require_relative 'unstable/session_update/compaction_summary_chunk'
|
|
122
|
+
require_relative 'unstable/session_update/compaction_update'
|
|
123
|
+
require_relative 'unstable/session_update/config_option_update'
|
|
124
|
+
require_relative 'unstable/session_update/current_mode_update'
|
|
125
|
+
require_relative 'unstable/session_update/notice'
|
|
126
|
+
require_relative 'unstable/session_update/plan'
|
|
127
|
+
require_relative 'unstable/session_update/plan_removed'
|
|
128
|
+
require_relative 'unstable/session_update/plan_update'
|
|
129
|
+
require_relative 'unstable/session_update/session_info_update'
|
|
130
|
+
require_relative 'unstable/session_update/session_message'
|
|
131
|
+
require_relative 'unstable/session_update/session_message_chunk'
|
|
132
|
+
require_relative 'unstable/session_update/subagent_update'
|
|
133
|
+
require_relative 'unstable/session_update/tool_call'
|
|
134
|
+
require_relative 'unstable/session_update/tool_call_update'
|
|
135
|
+
require_relative 'unstable/session_update/usage_update'
|
|
136
|
+
require_relative 'unstable/session_update/user_message_chunk'
|
|
137
|
+
require_relative 'unstable/set_provider_request'
|
|
138
|
+
require_relative 'unstable/set_provider_response'
|
|
139
|
+
require_relative 'unstable/start_nes_request'
|
|
140
|
+
require_relative 'unstable/start_nes_response'
|
|
141
|
+
require_relative 'unstable/state_update'
|
|
142
|
+
require_relative 'unstable/state_update/idle'
|
|
143
|
+
require_relative 'unstable/state_update/requires_action'
|
|
144
|
+
require_relative 'unstable/state_update/running'
|
|
145
|
+
require_relative 'unstable/state_update/unknown'
|
|
146
|
+
require_relative 'unstable/subagent_capabilities'
|
|
147
|
+
require_relative 'unstable/subagent_session_capabilities'
|
|
148
|
+
require_relative 'unstable/subagent_update'
|
|
149
|
+
require_relative 'unstable/suggest_nes_request'
|
|
150
|
+
require_relative 'unstable/suggest_nes_response'
|
|
151
|
+
require_relative 'unstable/text_document_content_change_event'
|
|
152
|
+
require_relative 'unstable/text_document_sync_kind'
|
|
153
|
+
require_relative 'unstable/unknown_state_update'
|
|
154
|
+
require_relative 'unstable/usage'
|
|
155
|
+
require_relative 'unstable/workspace_folder'
|
data/lib/acp/version.rb
CHANGED
|
@@ -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
|