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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e8a4bb93508ff8a9737b9b5b044e4b63e19ba87393490f10f522b9b63aee4396
|
|
4
|
+
data.tar.gz: 9e62dd726471fd718c2a234b9ea65bc90ca473c67d979e207b2702edd33b30b5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 50ef3954c1104ef512b757421bb0df10d3eb0be7f245c5a26c8641e815fa54d160a1d4d2c8369b9b41eb4b64affce206c584627650a5ce3446be09f88f2239b4
|
|
7
|
+
data.tar.gz: 0e505cd00fd0fef743dc1c047892db07b1ea4bf0999b3c0bff402fc10f73609a23fcbd4310b4a8deb7822fd06d8a64d1bab517426302004c205b3eee2972a104
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.0](https://github.com/bottrall/acp-sdk/compare/v0.8.0...v0.9.0) (2026-10-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* $/cancel_request in ACP::Transport::Stdio ([#82](https://github.com/bottrall/acp-sdk/issues/82)) ([8679883](https://github.com/bottrall/acp-sdk/commit/86798837ce9e35949c7cc3770e52f3191d81bc6f))
|
|
9
|
+
* opt-in types for the unstable schema ([#83](https://github.com/bottrall/acp-sdk/issues/83)) ([a49a5cc](https://github.com/bottrall/acp-sdk/commit/a49a5ccba84e599fc8fae95fe2336a4eb3169835))
|
|
10
|
+
|
|
3
11
|
## [0.8.0](https://github.com/bottrall/acp-sdk/compare/v0.7.0...v0.8.0) (2026-10-06)
|
|
4
12
|
|
|
5
13
|
|
data/README.md
CHANGED
|
@@ -111,6 +111,18 @@ connection = ACP::ClientConnection.new(
|
|
|
111
111
|
|
|
112
112
|
Extensions work the same way in both directions: `extension_requests` and `extension_notifications` are hashes keyed by the raw `_`-prefixed wire name, `ext_request` sends one to the agent and returns its result as-is, and `ext_notify` sends an extension notification. A handler name without the `_` prefix raises `ArgumentError`, and an extension request nothing answers gets `-32601`.
|
|
113
113
|
|
|
114
|
+
## Unstable types
|
|
115
|
+
|
|
116
|
+
Some protocol features are not part of the spec yet, so their schema lives in a separate unstable file: draft session updates (`plan_update`, `plan_removed`, `notice`, `compaction_update`, `compaction_summary_chunk`, `subagent_update`, `session_message`, `session_message_chunk`), `PromptResponse#usage`, the NE (next edit) and provider methods, and the matching capabilities. They are generated under `ACP::Types::Unstable` and load only when you opt in:
|
|
117
|
+
|
|
118
|
+
```ruby
|
|
119
|
+
require 'acp/types/unstable'
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Until then, referencing `ACP::Types::Unstable` is a `NameError`, and the stable `ACP::Types` namespace is byte-identical either way: types the unstable schema shares with the stable one resolve to the same generated classes, so opting in adds names without changing or duplicating any stable one.
|
|
123
|
+
|
|
124
|
+
These types are **unstable**: they are not part of the ACP spec, agents and clients must not rely on the peer supporting them, and any of them may change or disappear between releases without a major version bump. When a stable schema absorbs one of them, the unstable twin goes away and the stable name stays.
|
|
125
|
+
|
|
114
126
|
## Contributing
|
|
115
127
|
|
|
116
128
|
Bug reports and pull requests are welcome on [GitHub](https://github.com/bottrall/acp-sdk). See [CONTRIBUTING.md](CONTRIBUTING.md) for setup and workflow. Everyone interacting in the project is expected to follow the [code of conduct](CODE_OF_CONDUCT.md).
|
data/lib/acp/sdk.rb
CHANGED
|
@@ -9,5 +9,7 @@ root = __dir__ #: String
|
|
|
9
9
|
loader = Zeitwerk::Loader.new
|
|
10
10
|
loader.tag = 'acp-sdk'
|
|
11
11
|
loader.push_dir(root, namespace: ACP)
|
|
12
|
-
|
|
12
|
+
# The unstable types load only through `require 'acp/types/unstable'`, so
|
|
13
|
+
# Zeitwerk must not map them.
|
|
14
|
+
loader.ignore(__FILE__, "#{root}/version.rb", "#{root}/types/unstable.rb", "#{root}/types/unstable")
|
|
13
15
|
loader.setup
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
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
|
+
# @rbs @lock: Thread::Mutex
|
|
8
|
+
# @rbs @cancelled: bool
|
|
9
|
+
|
|
10
|
+
# @rbs return: void
|
|
11
|
+
def initialize
|
|
12
|
+
@lock = Mutex.new
|
|
13
|
+
@cancelled = false
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# @rbs return: void
|
|
17
|
+
def cancel
|
|
18
|
+
@lock.synchronize { @cancelled = true }
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# @rbs return: bool
|
|
22
|
+
def cancelled?
|
|
23
|
+
@lock.synchronize { @cancelled }
|
|
24
|
+
end
|
|
25
|
+
end
|
data/lib/acp/transport/stdio.rb
CHANGED
|
@@ -13,6 +13,7 @@ class ACP::Transport::Stdio
|
|
|
13
13
|
# @rbs @write_lock: Thread::Mutex
|
|
14
14
|
# @rbs @lock: Thread::Mutex
|
|
15
15
|
# @rbs @pending: Hash[untyped, Thread::Queue]
|
|
16
|
+
# @rbs @serving: Hash[untyped, ACP::Transport::Cancellation]
|
|
16
17
|
# @rbs @next_id: Integer
|
|
17
18
|
# @rbs @closed: bool
|
|
18
19
|
# @rbs @logger: ACP::Transport::_Logger
|
|
@@ -21,6 +22,9 @@ class ACP::Transport::Stdio
|
|
|
21
22
|
code: ACP::RequestError::INTERNAL_ERROR, message: 'Connection closed'
|
|
22
23
|
) #: ACP::RequestError
|
|
23
24
|
|
|
25
|
+
SERVING_CANCEL = :acp_serving_cancellation #: Symbol
|
|
26
|
+
private_constant :SERVING_CANCEL
|
|
27
|
+
|
|
24
28
|
# @rbs input: _Reader
|
|
25
29
|
# @rbs output: _Writer
|
|
26
30
|
# @rbs logger: ACP::Transport::_Logger
|
|
@@ -31,6 +35,7 @@ class ACP::Transport::Stdio
|
|
|
31
35
|
@write_lock = Mutex.new
|
|
32
36
|
@lock = Mutex.new
|
|
33
37
|
@pending = {}
|
|
38
|
+
@serving = {}
|
|
34
39
|
@next_id = 0
|
|
35
40
|
@closed = false
|
|
36
41
|
@logger = logger
|
|
@@ -70,6 +75,26 @@ class ACP::Transport::Stdio
|
|
|
70
75
|
write({ 'jsonrpc' => '2.0', 'method' => method, 'params' => params }.compact)
|
|
71
76
|
end
|
|
72
77
|
|
|
78
|
+
# The waiting caller is released only by the peer's answer, which the spec
|
|
79
|
+
# requires to be either a result or the -32800 error.
|
|
80
|
+
#
|
|
81
|
+
# @rbs id: untyped
|
|
82
|
+
# @rbs return: void
|
|
83
|
+
def cancel(id)
|
|
84
|
+
pending = @lock.synchronize { @pending.key?(id) }
|
|
85
|
+
notify('$/cancel_request', { 'requestId' => id }) if pending
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# The cancellation of the request the calling thread is serving, or nil off
|
|
89
|
+
# a serve thread. A handler observes the peer's $/cancel_request through it
|
|
90
|
+
# and can end early with ACP::RequestError.request_cancelled; whatever it
|
|
91
|
+
# returns, the transport sends exactly one response.
|
|
92
|
+
#
|
|
93
|
+
# @rbs return: ACP::Transport::Cancellation?
|
|
94
|
+
def cancellation
|
|
95
|
+
Thread.current[SERVING_CANCEL] #: ACP::Transport::Cancellation?
|
|
96
|
+
end
|
|
97
|
+
|
|
73
98
|
private
|
|
74
99
|
|
|
75
100
|
# @rbs line: String
|
|
@@ -91,7 +116,11 @@ class ACP::Transport::Stdio
|
|
|
91
116
|
def route(message, requests, notifications)
|
|
92
117
|
method = message['method']
|
|
93
118
|
error = message['error']
|
|
94
|
-
if method
|
|
119
|
+
if method == '$/cancel_request' && !message.key?('id')
|
|
120
|
+
# Cancellation is transport-owned: the notification targets a request
|
|
121
|
+
# the transport is serving, not application state.
|
|
122
|
+
cancel_request(message['params'])
|
|
123
|
+
elsif method.is_a?(String) && message.key?('id')
|
|
95
124
|
serve(requests[method], message['id'], message['params'], method)
|
|
96
125
|
elsif method.is_a?(String)
|
|
97
126
|
# Run on the reader thread so notifications (session/update) keep their
|
|
@@ -136,7 +165,9 @@ class ACP::Transport::Stdio
|
|
|
136
165
|
# @rbs method: String
|
|
137
166
|
# @rbs return: void
|
|
138
167
|
def serve(handler, id, params, method)
|
|
168
|
+
cancellation = register_serving(id)
|
|
139
169
|
Thread.new do
|
|
170
|
+
Thread.current[SERVING_CANCEL] = cancellation
|
|
140
171
|
outcome = handler ? invoke(handler, params) : ACP::RequestError.method_not_found(method)
|
|
141
172
|
case outcome
|
|
142
173
|
when ACP::Transport::Reply
|
|
@@ -144,9 +175,44 @@ class ACP::Transport::Stdio
|
|
|
144
175
|
quietly('reply after callback', &outcome.after)
|
|
145
176
|
else reply(id, outcome)
|
|
146
177
|
end
|
|
178
|
+
ensure
|
|
179
|
+
unregister_serving(id)
|
|
147
180
|
end
|
|
148
181
|
end
|
|
149
182
|
|
|
183
|
+
# Registered before the serve thread starts so a cancel racing the request
|
|
184
|
+
# cannot be missed, and dropped once the response is on the wire so later
|
|
185
|
+
# cancels for the id are ignored.
|
|
186
|
+
#
|
|
187
|
+
# @rbs id: untyped
|
|
188
|
+
# @rbs return: ACP::Transport::Cancellation
|
|
189
|
+
def register_serving(id)
|
|
190
|
+
cancellation = ACP::Transport::Cancellation.new
|
|
191
|
+
@lock.synchronize { @serving[id] = cancellation }
|
|
192
|
+
cancellation
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# @rbs id: untyped
|
|
196
|
+
# @rbs return: void
|
|
197
|
+
def unregister_serving(id)
|
|
198
|
+
@lock.synchronize { @serving.delete(id) }
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# A notification has no reply to carry a malformed params failure, so one
|
|
202
|
+
# is warned and dropped rather than answered.
|
|
203
|
+
#
|
|
204
|
+
# @rbs params: untyped
|
|
205
|
+
# @rbs return: void
|
|
206
|
+
def cancel_request(params)
|
|
207
|
+
id = params.is_a?(Hash) ? params['requestId'] : nil
|
|
208
|
+
unless id.is_a?(String) || id.is_a?(Integer)
|
|
209
|
+
return @logger.warn('dropped malformed $/cancel_request: missing requestId')
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
cancellation = @lock.synchronize { @serving[id] }
|
|
213
|
+
cancellation&.cancel
|
|
214
|
+
end
|
|
215
|
+
|
|
150
216
|
# For code with no reply to carry an error: a notification handler, or a
|
|
151
217
|
# Reply's after once the reply is on the wire. An exception must not kill
|
|
152
218
|
# the reader thread or print a thread report.
|
|
@@ -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::AcceptNesNotification
|
|
7
|
+
# @dynamic session_id
|
|
8
|
+
attr_reader :session_id #: String
|
|
9
|
+
|
|
10
|
+
# @dynamic id
|
|
11
|
+
attr_reader :id #: String
|
|
12
|
+
|
|
13
|
+
# @dynamic meta
|
|
14
|
+
attr_reader :meta #: Hash[String, untyped]?
|
|
15
|
+
|
|
16
|
+
# @rbs session_id: String
|
|
17
|
+
# @rbs id: String
|
|
18
|
+
# @rbs meta: Hash[String, untyped]?
|
|
19
|
+
# @rbs return: void
|
|
20
|
+
def initialize(session_id:, id:, meta: nil)
|
|
21
|
+
@session_id = session_id
|
|
22
|
+
@id = id
|
|
23
|
+
@meta = meta
|
|
24
|
+
freeze
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# @rbs hash: Hash[String, untyped]
|
|
28
|
+
# @rbs return: ACP::Types::Unstable::AcceptNesNotification
|
|
29
|
+
def self.from_h(hash)
|
|
30
|
+
new(
|
|
31
|
+
session_id: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'sessionId'), 'sessionId'),
|
|
32
|
+
id: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'id'), 'id'),
|
|
33
|
+
meta: hash['_meta']
|
|
34
|
+
)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# @rbs return: Hash[String, untyped]
|
|
38
|
+
def to_h
|
|
39
|
+
{ 'sessionId' => session_id, 'id' => id, '_meta' => meta }.compact
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,122 @@
|
|
|
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::AgentCapabilities
|
|
7
|
+
# @dynamic load_session
|
|
8
|
+
attr_reader :load_session #: bool?
|
|
9
|
+
|
|
10
|
+
# @dynamic prompt_capabilities
|
|
11
|
+
attr_reader :prompt_capabilities #: ACP::Types::PromptCapabilities?
|
|
12
|
+
|
|
13
|
+
# @dynamic mcp_capabilities
|
|
14
|
+
attr_reader :mcp_capabilities #: ACP::Types::Unstable::McpCapabilities?
|
|
15
|
+
|
|
16
|
+
# @dynamic session_capabilities
|
|
17
|
+
attr_reader :session_capabilities #: ACP::Types::Unstable::SessionCapabilities?
|
|
18
|
+
|
|
19
|
+
# @dynamic auth
|
|
20
|
+
attr_reader :auth #: ACP::Types::AgentAuthCapabilities?
|
|
21
|
+
|
|
22
|
+
# @dynamic providers
|
|
23
|
+
attr_reader :providers #: ACP::Types::Unstable::ProvidersCapabilities?
|
|
24
|
+
|
|
25
|
+
# @dynamic nes
|
|
26
|
+
attr_reader :nes #: ACP::Types::Unstable::NesCapabilities?
|
|
27
|
+
|
|
28
|
+
# @dynamic position_encoding
|
|
29
|
+
attr_reader :position_encoding #: String?
|
|
30
|
+
|
|
31
|
+
# @dynamic meta
|
|
32
|
+
attr_reader :meta #: Hash[String, untyped]?
|
|
33
|
+
|
|
34
|
+
# @rbs load_session: bool?
|
|
35
|
+
# @rbs prompt_capabilities: ACP::Types::PromptCapabilities?
|
|
36
|
+
# @rbs mcp_capabilities: ACP::Types::Unstable::McpCapabilities?
|
|
37
|
+
# @rbs session_capabilities: ACP::Types::Unstable::SessionCapabilities?
|
|
38
|
+
# @rbs auth: ACP::Types::AgentAuthCapabilities?
|
|
39
|
+
# @rbs providers: ACP::Types::Unstable::ProvidersCapabilities?
|
|
40
|
+
# @rbs nes: ACP::Types::Unstable::NesCapabilities?
|
|
41
|
+
# @rbs position_encoding: String?
|
|
42
|
+
# @rbs meta: Hash[String, untyped]?
|
|
43
|
+
# @rbs return: void
|
|
44
|
+
def initialize(
|
|
45
|
+
load_session: nil,
|
|
46
|
+
prompt_capabilities: nil,
|
|
47
|
+
mcp_capabilities: nil,
|
|
48
|
+
session_capabilities: nil,
|
|
49
|
+
auth: nil,
|
|
50
|
+
providers: nil,
|
|
51
|
+
nes: nil,
|
|
52
|
+
position_encoding: nil,
|
|
53
|
+
meta: nil
|
|
54
|
+
)
|
|
55
|
+
@load_session = load_session
|
|
56
|
+
@prompt_capabilities = prompt_capabilities
|
|
57
|
+
@mcp_capabilities = mcp_capabilities
|
|
58
|
+
@session_capabilities = session_capabilities
|
|
59
|
+
@auth = auth
|
|
60
|
+
@providers = providers
|
|
61
|
+
@nes = nes
|
|
62
|
+
@position_encoding = position_encoding
|
|
63
|
+
@meta = meta
|
|
64
|
+
freeze
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# @rbs hash: Hash[String, untyped]
|
|
68
|
+
# @rbs return: ACP::Types::Unstable::AgentCapabilities
|
|
69
|
+
def self.from_h(hash)
|
|
70
|
+
new(
|
|
71
|
+
load_session: ACP::Types::Check.boolean(hash['loadSession'], 'loadSession', allow_nil: true),
|
|
72
|
+
prompt_capabilities: ACP::Types::Check.object(
|
|
73
|
+
hash['promptCapabilities'],
|
|
74
|
+
'promptCapabilities',
|
|
75
|
+
ACP::Types::PromptCapabilities,
|
|
76
|
+
allow_nil: true
|
|
77
|
+
),
|
|
78
|
+
mcp_capabilities: ACP::Types::Check.object(
|
|
79
|
+
hash['mcpCapabilities'],
|
|
80
|
+
'mcpCapabilities',
|
|
81
|
+
ACP::Types::Unstable::McpCapabilities,
|
|
82
|
+
allow_nil: true
|
|
83
|
+
),
|
|
84
|
+
session_capabilities: ACP::Types::Check.object(
|
|
85
|
+
hash['sessionCapabilities'],
|
|
86
|
+
'sessionCapabilities',
|
|
87
|
+
ACP::Types::Unstable::SessionCapabilities,
|
|
88
|
+
allow_nil: true
|
|
89
|
+
),
|
|
90
|
+
auth: ACP::Types::Check.object(hash['auth'], 'auth', ACP::Types::AgentAuthCapabilities, allow_nil: true),
|
|
91
|
+
providers: ACP::Types::Check.object(
|
|
92
|
+
hash['providers'],
|
|
93
|
+
'providers',
|
|
94
|
+
ACP::Types::Unstable::ProvidersCapabilities,
|
|
95
|
+
allow_nil: true
|
|
96
|
+
),
|
|
97
|
+
nes: ACP::Types::Check.object(hash['nes'], 'nes', ACP::Types::Unstable::NesCapabilities, allow_nil: true),
|
|
98
|
+
position_encoding: ACP::Types::Check.enum(
|
|
99
|
+
hash['positionEncoding'],
|
|
100
|
+
'positionEncoding',
|
|
101
|
+
%w[utf-16 utf-32 utf-8],
|
|
102
|
+
allow_nil: true
|
|
103
|
+
),
|
|
104
|
+
meta: hash['_meta']
|
|
105
|
+
)
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# @rbs return: Hash[String, untyped]
|
|
109
|
+
def to_h
|
|
110
|
+
{
|
|
111
|
+
'loadSession' => load_session,
|
|
112
|
+
'promptCapabilities' => prompt_capabilities&.to_h,
|
|
113
|
+
'mcpCapabilities' => mcp_capabilities&.to_h,
|
|
114
|
+
'sessionCapabilities' => session_capabilities&.to_h,
|
|
115
|
+
'auth' => auth&.to_h,
|
|
116
|
+
'providers' => providers&.to_h,
|
|
117
|
+
'nes' => nes&.to_h,
|
|
118
|
+
'positionEncoding' => position_encoding,
|
|
119
|
+
'_meta' => meta
|
|
120
|
+
}.compact
|
|
121
|
+
end
|
|
122
|
+
end
|
|
@@ -0,0 +1,127 @@
|
|
|
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::ClientCapabilities
|
|
7
|
+
# @dynamic fs
|
|
8
|
+
attr_reader :fs #: ACP::Types::FileSystemCapabilities?
|
|
9
|
+
|
|
10
|
+
# @dynamic terminal
|
|
11
|
+
attr_reader :terminal #: bool?
|
|
12
|
+
|
|
13
|
+
# @dynamic session
|
|
14
|
+
attr_reader :session #: ACP::Types::Unstable::ClientSessionCapabilities?
|
|
15
|
+
|
|
16
|
+
# @dynamic subagents
|
|
17
|
+
attr_reader :subagents #: ACP::Types::Unstable::SubagentCapabilities?
|
|
18
|
+
|
|
19
|
+
# @dynamic plan
|
|
20
|
+
attr_reader :plan #: ACP::Types::Unstable::PlanCapabilities?
|
|
21
|
+
|
|
22
|
+
# @dynamic auth
|
|
23
|
+
attr_reader :auth #: ACP::Types::AuthCapabilities?
|
|
24
|
+
|
|
25
|
+
# @dynamic elicitation
|
|
26
|
+
attr_reader :elicitation #: ACP::Types::ElicitationCapabilities?
|
|
27
|
+
|
|
28
|
+
# @dynamic nes
|
|
29
|
+
attr_reader :nes #: ACP::Types::Unstable::ClientNesCapabilities?
|
|
30
|
+
|
|
31
|
+
# @dynamic position_encodings
|
|
32
|
+
attr_reader :position_encodings #: Array[String]?
|
|
33
|
+
|
|
34
|
+
# @dynamic meta
|
|
35
|
+
attr_reader :meta #: Hash[String, untyped]?
|
|
36
|
+
|
|
37
|
+
# @rbs fs: ACP::Types::FileSystemCapabilities?
|
|
38
|
+
# @rbs terminal: bool?
|
|
39
|
+
# @rbs session: ACP::Types::Unstable::ClientSessionCapabilities?
|
|
40
|
+
# @rbs subagents: ACP::Types::Unstable::SubagentCapabilities?
|
|
41
|
+
# @rbs plan: ACP::Types::Unstable::PlanCapabilities?
|
|
42
|
+
# @rbs auth: ACP::Types::AuthCapabilities?
|
|
43
|
+
# @rbs elicitation: ACP::Types::ElicitationCapabilities?
|
|
44
|
+
# @rbs nes: ACP::Types::Unstable::ClientNesCapabilities?
|
|
45
|
+
# @rbs position_encodings: Array[String]?
|
|
46
|
+
# @rbs meta: Hash[String, untyped]?
|
|
47
|
+
# @rbs return: void
|
|
48
|
+
def initialize(
|
|
49
|
+
fs: nil,
|
|
50
|
+
terminal: nil,
|
|
51
|
+
session: nil,
|
|
52
|
+
subagents: nil,
|
|
53
|
+
plan: nil,
|
|
54
|
+
auth: nil,
|
|
55
|
+
elicitation: nil,
|
|
56
|
+
nes: nil,
|
|
57
|
+
position_encodings: nil,
|
|
58
|
+
meta: nil
|
|
59
|
+
)
|
|
60
|
+
@fs = fs
|
|
61
|
+
@terminal = terminal
|
|
62
|
+
@session = session
|
|
63
|
+
@subagents = subagents
|
|
64
|
+
@plan = plan
|
|
65
|
+
@auth = auth
|
|
66
|
+
@elicitation = elicitation
|
|
67
|
+
@nes = nes
|
|
68
|
+
@position_encodings = position_encodings
|
|
69
|
+
@meta = meta
|
|
70
|
+
freeze
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# @rbs hash: Hash[String, untyped]
|
|
74
|
+
# @rbs return: ACP::Types::Unstable::ClientCapabilities
|
|
75
|
+
def self.from_h(hash)
|
|
76
|
+
position_encodings = ACP::Types::Check.array(
|
|
77
|
+
hash['positionEncodings'],
|
|
78
|
+
'positionEncodings',
|
|
79
|
+
allow_nil: true
|
|
80
|
+
) do |item, path|
|
|
81
|
+
ACP::Types::Check.enum(item, path, %w[utf-16 utf-32 utf-8])
|
|
82
|
+
end
|
|
83
|
+
new(
|
|
84
|
+
fs: ACP::Types::Check.object(hash['fs'], 'fs', ACP::Types::FileSystemCapabilities, allow_nil: true),
|
|
85
|
+
terminal: ACP::Types::Check.boolean(hash['terminal'], 'terminal', allow_nil: true),
|
|
86
|
+
session: ACP::Types::Check.object(
|
|
87
|
+
hash['session'],
|
|
88
|
+
'session',
|
|
89
|
+
ACP::Types::Unstable::ClientSessionCapabilities,
|
|
90
|
+
allow_nil: true
|
|
91
|
+
),
|
|
92
|
+
subagents: ACP::Types::Check.object(
|
|
93
|
+
hash['subagents'],
|
|
94
|
+
'subagents',
|
|
95
|
+
ACP::Types::Unstable::SubagentCapabilities,
|
|
96
|
+
allow_nil: true
|
|
97
|
+
),
|
|
98
|
+
plan: ACP::Types::Check.object(hash['plan'], 'plan', ACP::Types::Unstable::PlanCapabilities, allow_nil: true),
|
|
99
|
+
auth: ACP::Types::Check.object(hash['auth'], 'auth', ACP::Types::AuthCapabilities, allow_nil: true),
|
|
100
|
+
elicitation: ACP::Types::Check.object(
|
|
101
|
+
hash['elicitation'],
|
|
102
|
+
'elicitation',
|
|
103
|
+
ACP::Types::ElicitationCapabilities,
|
|
104
|
+
allow_nil: true
|
|
105
|
+
),
|
|
106
|
+
nes: ACP::Types::Check.object(hash['nes'], 'nes', ACP::Types::Unstable::ClientNesCapabilities, allow_nil: true),
|
|
107
|
+
position_encodings:,
|
|
108
|
+
meta: hash['_meta']
|
|
109
|
+
)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# @rbs return: Hash[String, untyped]
|
|
113
|
+
def to_h
|
|
114
|
+
{
|
|
115
|
+
'fs' => fs&.to_h,
|
|
116
|
+
'terminal' => terminal,
|
|
117
|
+
'session' => session&.to_h,
|
|
118
|
+
'subagents' => subagents&.to_h,
|
|
119
|
+
'plan' => plan&.to_h,
|
|
120
|
+
'auth' => auth&.to_h,
|
|
121
|
+
'elicitation' => elicitation&.to_h,
|
|
122
|
+
'nes' => nes&.to_h,
|
|
123
|
+
'positionEncodings' => position_encodings,
|
|
124
|
+
'_meta' => meta
|
|
125
|
+
}.compact
|
|
126
|
+
end
|
|
127
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
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::ClientNesCapabilities
|
|
7
|
+
# @dynamic jump
|
|
8
|
+
attr_reader :jump #: ACP::Types::Unstable::NesJumpCapabilities?
|
|
9
|
+
|
|
10
|
+
# @dynamic rename
|
|
11
|
+
attr_reader :rename #: ACP::Types::Unstable::NesRenameCapabilities?
|
|
12
|
+
|
|
13
|
+
# @dynamic search_and_replace
|
|
14
|
+
attr_reader :search_and_replace #: ACP::Types::Unstable::NesSearchAndReplaceCapabilities?
|
|
15
|
+
|
|
16
|
+
# @dynamic meta
|
|
17
|
+
attr_reader :meta #: Hash[String, untyped]?
|
|
18
|
+
|
|
19
|
+
# @rbs jump: ACP::Types::Unstable::NesJumpCapabilities?
|
|
20
|
+
# @rbs rename: ACP::Types::Unstable::NesRenameCapabilities?
|
|
21
|
+
# @rbs search_and_replace: ACP::Types::Unstable::NesSearchAndReplaceCapabilities?
|
|
22
|
+
# @rbs meta: Hash[String, untyped]?
|
|
23
|
+
# @rbs return: void
|
|
24
|
+
def initialize(jump: nil, rename: nil, search_and_replace: nil, meta: nil)
|
|
25
|
+
@jump = jump
|
|
26
|
+
@rename = rename
|
|
27
|
+
@search_and_replace = search_and_replace
|
|
28
|
+
@meta = meta
|
|
29
|
+
freeze
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# @rbs hash: Hash[String, untyped]
|
|
33
|
+
# @rbs return: ACP::Types::Unstable::ClientNesCapabilities
|
|
34
|
+
def self.from_h(hash)
|
|
35
|
+
new(
|
|
36
|
+
jump: ACP::Types::Check.object(hash['jump'], 'jump', ACP::Types::Unstable::NesJumpCapabilities, allow_nil: true),
|
|
37
|
+
rename: ACP::Types::Check.object(
|
|
38
|
+
hash['rename'],
|
|
39
|
+
'rename',
|
|
40
|
+
ACP::Types::Unstable::NesRenameCapabilities,
|
|
41
|
+
allow_nil: true
|
|
42
|
+
),
|
|
43
|
+
search_and_replace: ACP::Types::Check.object(
|
|
44
|
+
hash['searchAndReplace'],
|
|
45
|
+
'searchAndReplace',
|
|
46
|
+
ACP::Types::Unstable::NesSearchAndReplaceCapabilities,
|
|
47
|
+
allow_nil: true
|
|
48
|
+
),
|
|
49
|
+
meta: hash['_meta']
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# @rbs return: Hash[String, untyped]
|
|
54
|
+
def to_h
|
|
55
|
+
{
|
|
56
|
+
'jump' => jump&.to_h,
|
|
57
|
+
'rename' => rename&.to_h,
|
|
58
|
+
'searchAndReplace' => search_and_replace&.to_h,
|
|
59
|
+
'_meta' => meta
|
|
60
|
+
}.compact
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
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::ClientSessionCapabilities
|
|
7
|
+
# @dynamic compaction
|
|
8
|
+
attr_reader :compaction #: Hash[String, untyped]?
|
|
9
|
+
|
|
10
|
+
# @dynamic config_options
|
|
11
|
+
attr_reader :config_options #: ACP::Types::SessionConfigOptionsCapabilities?
|
|
12
|
+
|
|
13
|
+
# @dynamic notices
|
|
14
|
+
attr_reader :notices #: Hash[String, untyped]?
|
|
15
|
+
|
|
16
|
+
# @dynamic meta
|
|
17
|
+
attr_reader :meta #: Hash[String, untyped]?
|
|
18
|
+
|
|
19
|
+
# @rbs compaction: Hash[String, untyped]?
|
|
20
|
+
# @rbs config_options: ACP::Types::SessionConfigOptionsCapabilities?
|
|
21
|
+
# @rbs notices: Hash[String, untyped]?
|
|
22
|
+
# @rbs meta: Hash[String, untyped]?
|
|
23
|
+
# @rbs return: void
|
|
24
|
+
def initialize(compaction: nil, config_options: nil, notices: nil, meta: nil)
|
|
25
|
+
@compaction = compaction
|
|
26
|
+
@config_options = config_options
|
|
27
|
+
@notices = notices
|
|
28
|
+
@meta = meta
|
|
29
|
+
freeze
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# @rbs hash: Hash[String, untyped]
|
|
33
|
+
# @rbs return: ACP::Types::Unstable::ClientSessionCapabilities
|
|
34
|
+
def self.from_h(hash)
|
|
35
|
+
new(
|
|
36
|
+
compaction: hash['compaction'],
|
|
37
|
+
config_options: ACP::Types::Check.object(
|
|
38
|
+
hash['configOptions'],
|
|
39
|
+
'configOptions',
|
|
40
|
+
ACP::Types::SessionConfigOptionsCapabilities,
|
|
41
|
+
allow_nil: true
|
|
42
|
+
),
|
|
43
|
+
notices: hash['notices'],
|
|
44
|
+
meta: hash['_meta']
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# @rbs return: Hash[String, untyped]
|
|
49
|
+
def to_h
|
|
50
|
+
{
|
|
51
|
+
'compaction' => compaction,
|
|
52
|
+
'configOptions' => config_options&.to_h,
|
|
53
|
+
'notices' => notices,
|
|
54
|
+
'_meta' => meta
|
|
55
|
+
}.compact
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
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::CloseNesRequest
|
|
7
|
+
# @dynamic session_id
|
|
8
|
+
attr_reader :session_id #: String
|
|
9
|
+
|
|
10
|
+
# @dynamic meta
|
|
11
|
+
attr_reader :meta #: Hash[String, untyped]?
|
|
12
|
+
|
|
13
|
+
# @rbs session_id: String
|
|
14
|
+
# @rbs meta: Hash[String, untyped]?
|
|
15
|
+
# @rbs return: void
|
|
16
|
+
def initialize(session_id:, meta: nil)
|
|
17
|
+
@session_id = session_id
|
|
18
|
+
@meta = meta
|
|
19
|
+
freeze
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# @rbs hash: Hash[String, untyped]
|
|
23
|
+
# @rbs return: ACP::Types::Unstable::CloseNesRequest
|
|
24
|
+
def self.from_h(hash)
|
|
25
|
+
new(
|
|
26
|
+
session_id: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'sessionId'), 'sessionId'),
|
|
27
|
+
meta: hash['_meta']
|
|
28
|
+
)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# @rbs return: Hash[String, untyped]
|
|
32
|
+
def to_h
|
|
33
|
+
{ 'sessionId' => session_id, '_meta' => meta }.compact
|
|
34
|
+
end
|
|
35
|
+
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::CloseNesResponse
|
|
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::CloseNesResponse
|
|
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,11 @@
|
|
|
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::CompactionStatus
|
|
7
|
+
IN_PROGRESS = 'in_progress'
|
|
8
|
+
COMPLETED = 'completed'
|
|
9
|
+
FAILED = 'failed'
|
|
10
|
+
CANCELLED = 'cancelled'
|
|
11
|
+
end
|